Application Example : Using TOPWAY Smart LCD (HMT050CC-C) to display QR code
Step 1: Create a project
①Open the Editor software and click on the menu bar to create a new project File --> New Project
②Enter the project nameProject Name : QR_Code_Demo
③Enter the project save locationCreate a Project Folder in: D:xxx
④Select the intelligent module display resolution Sreen Size: 800x480
⑤Click " OK" to complete
Step 2: Create a page and import the background image
①Right -click Pages in the Resource Window and select New Page to create the PG0000 page .
②Right -click Background Image in the Resource window and select Import Background Image
Step 3: Associate the page with the background image
①Click the work area , and the page properties will be displayed on the right.
② Select the background image of the page in Background Image in the properties
Step 4: Create a string VP address
① In the Resource window, right-click String Variables and select New VP
Step 5: Create touch keys and associate them with the CALL keyboard
①Click the touch key on the menu toolbar
②Drag a rectangular area in the page workspace to create a touch key element on the page
③ In the properties, select CALL : " KeyBoard English"
④Title /Value setting in the properties : " Input"
⑤ In the properties, select VP Address : 0x000080
Step 6: Create QR code elements and associated VPs
①Click the QR Code icon on the menu toolbar
②Drag out a rectangular area in the page workspace to create two QR code elements on the page
③In the properties, set the X/Y Pop Position to: 465 , 110
④ In the properties, select VP Address : 0x000080
⑤ Select Size in the properties : 37*37(106Byte)
⑥ In the properties, set the Scale to 4 and 7 respectively.
Step 7: Compile and download
Step 8 Power-on display
①Disconnect the USB connection from the module
② Provide 5V power to the module
③Power -on display
( Connect serial line, default baud rate: 115200,8,n,1)
④Press the touch key on the screen to pop up the keyboard
⑤ Input VP value
( You can also use the command: AA 42 00 00 00 80 53 48 45 4E 5A 48 45 4E 20 54 4F 50 57 41 59 00 cc 33 c3 3c
Complete the same input )
⑥Click " OK" and the 2D code will be successfully displayed on the page.
Note: 1. The built-in English Keyboard supports up to 35 ASCII characters. If longer characters are required, please use the PIP Keyboard ( supports 127 characters ) .
2. VP_STR can support up to 127 bytes of input. If longer is required, please use VP_N16 space and use 0x82, 0x83 instructions to read and write.
|