arduino-uno - LinuxCNC Driver pair
THIS IS BETA-SOFTWARE!
ethraw.tgz
Howto in german language
Files in this archive:
267 Feb 22 07:13 halcmd.hal example HAL-file (use "halrun")
7,2K Feb 22 13:07 etheraw.ino sourcecode for arduino-Uno
15K Feb 22 16:12 ethraw.comp linuxCNC component-driver
16K Feb 22 18:19 pcIOethRaw.c standalone PC-arduino I/O-test
6,6K Feb 21 17:23 func.c include-file
2,8K Feb 21 17:23 commandline.c include-file
2,8K Feb 21 18:08 defs.h include-file
10 output-pins
8 input-pins
TESTING
=======
Configure the MAC-adresses "myadr" and "radr" to your needs.
Compile programm, upload to arduino and start it.
Start tcpdump on the connected PC:
sudo tcpdump -i eno1 -s 2000 ether host af:fe:af:fe:af:fe or ether host 70:85:c2:89:68:b7
Whenever you change an arduino-input-pin, you should see packets like this
in your tcpdump:
11:22:06.902447 af:fe:af:fe:af:fe (oui Unknown) > 70:85:c2:89:68:b7 .... Unknown) Null Information, length 50
0x0000: 0000 003f 0000 0000 001b 1b21 0000 0000 ...?.......!....
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 1b00 2100 ..............!.
0x0030: 0000 ..
On the PC-side start
sudo ./pcIOethRaw -i eno1 -s af:fe:af:fe:af:fe -r 70:85:c2:89:68:b7
press "o" (for output-mode) - no echo
press number-keys 1-8.
each key toggles an output pin (A0 - A7) of the arduino.
press "+".
you will get: "IO-byte:1"
press key "1" or "2".
they will toggle output-pins "A9" and "A10".
more installation-hints: look into sourcecode -