Message Boards Message Boards

2 Replies
0 Total Likes
View groups...
Share this post:

Wolfram language on RPi to talk over serial to Arduino running firmata?

Posted 10 years ago

I have a Raspberry Pi connected via USB cable to an Arduino Duemanilove. The Arduino is running the "firmata" sketch, so that it monitors the serial connection and waits for commands. When I run the Processing language on the RPi, I am able to send serial commands to the Arduino to turn on/off any of the Arduino's digital I/O lines.

I'd like to do the same thing from Wolfram Language on the RPi, but I am unable to figure out how to do this. I'd like to use DeviceOpen[ ] to open the serial port "/dev/ttyUSB0" with baud rate 57600, 8 data bits, 1 stop bit, no parity. But DeviceOpen[ ] seems to accept only 2 arguments. I can get this line to apparently work:


I am unsure what baud rate the serial port is being opened with. DeviceConfigure[ ] for some reason does not support serial ports.

POSTED BY: David DeBrota
2 Replies

I assume I can also set data bits, stop bits, parity by adding elements to the list.

Do you know of anyone who has used Wolfram Language to communicate with firmata? The protocol for doing so seems quite opaque to me, but obviously many people have figured out how to do it from other languages... see list of "client libraries" here:

POSTED BY: David DeBrota

This should work:

DeviceOpen[ "Serial", {"/dev/ttyUSB0", "BaudRate" -> 57600} ]
POSTED BY: Arnoud Buzing
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract