03-14-2014 10:13 AM
Hi!
For a school project, I have to make an Arduino robot which can navigate it's way through a model city. It has to be able to read traffic lights, discern other robots etc.
The robot has to be able to act independantly, but in case of an emergency (i.e for example if he doesn't recognize the color of the traffic lights), I have to be able to interrupt
using LabView. I have to be able to control the Arduino manually with some buttons in LabView. So, I have a couple of methods programmed onto the Arduino, like GoForward(),
TurnRight() etc. My question is: is there any way I can call these methods from LabView? I don't want to rebuild them with a LabView block diagram, I just want to name the
method the Arduino has to run.
Thanks,
Wouter
03-14-2014 12:21 PM
You could send characters like a, b, c, d, and e, where each character specifies a unique function, to Arduino and then use a switch control structure to select the function. For an example see:
<http://arduino.cc/en/Tutorial/SwitchCase2#.UyM1fj9dU_o>
This method works with Labview but will not work with LIFA.
hrh1818
03-16-2014 03:54 PM
Why doesn't it work with LIFA?
03-16-2014 05:07 PM
I should have said it will not work with the present version of LIFA. LIFA uses a switch control structure to select which function to run. You could add more case statements to select your functions and create a packet for selecting your functions. Look at the LIFA source code and Documents > Labview Interface for Arduino Packets to see which approach you think will be easier to implement.
hrh1818