Description
This article presents a procedure for reading the digital ports on the Arduino UNO R3 board , on which a Joystick shield was installed. The digital data are related to D3 , D4 , D5 , D6 buttons and can be monitored from the front panel of our program , for which we use serial communication.
More information on the shield for Arduino https://www.sparkfun.com/products/9760
Procedure
Work with Joystick Coat buttons , the buttons are discrete inputs whose values can range from 0 -5VDC for false and true respectively logic states (HIGH and LOW) . To read these digitalRead use the discrete inputs () function on the inputs D3 , D4 , D5 , D6 .
The declaration of functions is an automated manner and by readPin () function each entry declared under review, each die is stored in a variable and finally is concatenated and written to the serial arduino card port, then the program was discharged on the Arduino :
We will make a program in LabVIEW to test and verify the correct operation of our program in the Arduino , we will make the reading of data transmitted by the Arduino from the serial port on the card installed , proceed to read the COM port and under I received command will activate an LED for each down to be converted into an array of Boolean, D3 data button. D4 , D5 , D6, examined the IndexArray () function below code fragment
Front Panel program
Block Diagram
i can't to open , because my version labVIEW is defferent