Visi-Genie Password Implementation With An Arduino Host: Document Date: Document Revision
Visi-Genie Password Implementation With An Arduino Host: Document Date: Document Revision
Visi-Genie Password Implementation With An Arduino Host: Document Date: Document Revision
W W W . 4 D S Y S T E M S . C O M . A U
APPLICATION NOTES 4D-AN-00188
Page 2 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
Page 3 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
ViSi Genie Getting Started – First Project for Picaso Displays (for Picaso)
or
ViSi Genie Getting Started – First Project for Diablo16 Displays (for
Diablo16).
ViSi Genie Getting Started – First Project for Picaso Displays (for Picaso)
or
ViSi Genie Getting Started – First Project for Diablo16 Displays (for
Diablo16).
Page 4 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
Keyboard
Object
Page 5 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
At the end of this section, the user will able to create a form with four Object Properties
objects. The final form will look like as shown below, with the labels
excluded. The images shown below are the properties of the objects that are used in
the project included in this application note.
Static
texts StaticText0 and Statictext2
String
Objects
Keyboard
Object
Page 6 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
StaticText1 Strings
Page 7 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
ViSi Genie Getting Started – First Project for Picaso Displays (for Picaso)
or
ViSi Genie Getting Started – First Project for Diablo16 Displays (for
Diablo16).
Page 8 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
Writing the Host Code The Main Loop – Writing Data to the Display
A thorough understanding of the application note ViSi-Genie Connecting a The data or message is received and queued by:
4D Display to an Arduino Host is required before attempting to proceed
further beyond this point. ViSi-Genie Connecting a 4D Display to an Arduino
Host provides all the basic information that a user needs to be able to get Another function (to be written by the user) is needed to process the
started with ViSi-Genie and Arduino. The following is a list of the topics received data. This function is the user's event handler, which was arbitrarily
discussed in ViSi-Genie Connecting a 4D Display to an Arduino Host. given the name myGenieEventHandler(). This function is called from inside
the function genie.DoEvents().
How to download and install the ViSi-Genie-Arduino library
How to open a serial port for communicating with the display and
how to set the baud rate
The genieAttachEventHandler() function Event Handler
How to reset the host and the display
How to set the screen contrast
How to send a text string
The main loop
Receiving data from the display
The use of a non-blocking delay in the main loop
How to change the status of an object
How to know the status of an object
The user’s event handler
This part of the code is the event handler. The image above checks if the
report message comes from a keyboard object.
Discussion of any of these topics is avoided in other ViSi-Genie-Arduino
application notes unless necessary. Users are encouraged to read ViSi-Genie
Connecting a 4D Display to an Arduino Host first.
Page 9 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
Keyboard Object 0 ASCII Code. This will write to FORM1 so the display will display FORM1
where keyboard1 exist and AUTHENTICATION starts.
Keyboard Object 1
If the Key is pressed in keyboard0 object this part of the program will
execute. This simply prints to the string objects the key that is pressed from
the keyboard while storing it in an array.
If the Key is pressed in keyboard1 object this part of the program will
execute. Same process with keyboard 1 if a key/number or Back is pressed.
If "Back" is pressed then the value that will be received from
Their difference is that when a key is pressed in keyboard2 the number will
"genie.GetEventData(&Event)" is 8, decumal value of backspace in ASCII
be printed on the string object and will be replaced by '*' asterisk after.
Code. The array Index will be decremented and NULL will be printed.
Page 10 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
Page 11 of 12 www.4dsystems.com.au
APPLICATION NOTES 4D-AN-00188
Proprietary Information
The information contained in this document is the property of 4D Systems Pty. Ltd. and may be the subject of patents pending or granted, and must not be
copied or disclosed without prior written permission.
4D Systems endeavours to ensure that the information in this document is correct and fairly stated but does not accept liability for any error or omission. The
development of 4D Systems products and services is continuous and published information may not be up to date. It is important to check the current position
with 4D Systems.
All trademarks belong to their respective owners and are recognised and acknowledged.
Page 12 of 12 www.4dsystems.com.au