NI LabWindows/CVI interface to Arduino UNO with LCD Shield

7 Просмотры
I picked up an Arduino UNO and a couple of shields a couple of months back. After the requisite "Hello World" projects, I had nothing better to do with it in the immediate future.

So, I used it as an opportunity to refresh some of my skills with LabWindows/CVI.

Basically, the UNO's "main" loop checks for data available on the serial port (which is connected to a USB COM port). The UNO is also running a timer-based interrupt that checks 2 ADC inputs at an approximate 100Hz rate.

The PC runs a GUI to control and read back the status of the Arduino and LCD shield. This is done through the execution of three threads.

The first thread asks the Arduino for its status over and over - ad infinitum, unless it receives a "stop" or "quit" semaphore from elsewhere.

The second thread runs similarly, updating the controls on the GUI to match the UNO's status.

The 3rd thread is the main program, which acts on changes in GUI status.

Easy, huh?

A LabWindows distribution kit (which I believe contains source code) is available for download at my web site (85MB!):

Note: The LabWindows distribution kit appears to not contain the source code. The code is available here:

The Arduino code is also available here:
Комментариев нет.