Group Abstract Group Abstract

Message Boards Message Boards

0
|
10.2K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

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

Posted 11 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:

dev=DeviceOpen["Serial","/dev/ttyUSB0"]

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
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
Attachments
Remove
or Discard