Our simple python server for the Pi bridges your existing LabVIEW LINX programs to your Arduino without having to changing any code. How to Do ItOn the Pi: Your Pi will need to be able to execute python code, in LXTerminal run: sudo apt-get install python-dev Enabling the serial port requires editing two files, cmdline and inittab: Cmdline sudo nano /boot/cmdline.txt remove all references to ttyAMA0 Change dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfs elevator=deadline rootwait To dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfs elevator=deadline rootwait ctrl+x -> y -> enter, to save Remove login prompt on serial port: Inittab sudo nano /etc/inittab Change T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 To #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 ctrl+x -> y -> enter, to save Reboot your Pi sudo reboot Hardware: A level shifter is required for the Pi’s 3.3 V to connect with the Arduino’s 5 V supply. (More Info) Run Your ProgramMake sure the LINX server is uploaded to the target arduino. Download our server to your Pi: LINXServer.py Identify you Pi’s local address by typing ‘ifconfig’ in LXTerminal, Replace HOST with that local address, adjust the PORT to your choosing Run the server on the Pi: sudo python LINXServer.py Run your LINX program, making sure to use the TCP option of the LINX init, and use the right Host and Port.
bonus: turn on DEBUG to see the LINX bits being transferred.
5 Comments
12/31/2014 01:52:50 am
I appreciate you taking the time to correct some of my misconceptions and provide a different perspective.
Reply
reza
6/19/2017 01:46:57 am
where i can get file LINXserver.py ?
Reply
Mustafa
10/19/2018 02:34:11 pm
Hi
Reply
Mustafa
12/28/2018 12:03:19 am
Hi I couldn't find the file in the video time 19s please let me know how to find it
Reply
Leave a Reply. |
Categories
All
|