Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm attempting to see if I can capture an incoming stream of data being transmitted remotely from an arduino device into Mathematica.

The plan is to connect some temperature probes to the Arduino, connect it to a Kamado Grill (i.e. Big Gren Egg). The Arduino has an XBEE modem that will be coupled via WiFi to my computer. By reading the temperature profile and output that will control the air intake I'll hope to play around with the control systems functionality of Mathematica, plot temperature profile of the grill/smoker and meat in real time, communicate back to the grill and change target temperature, all from the comfort of the living room.

In the picture below I have tested the connection between the Arduino and the computer and have succeeded in reading the data flow via a terminal connected 19200,N,8,1. Im reading in this case the distance read from an ultrasonic sensor, which is being transmitted back to the computer every 5 seconds.

What is the best way to capture the data stream? Is there a specific existing function to use?

XBEE Modem

share|improve this question
2  
3  
You might be interested in this Tech Conference talk: youtube.com/watch?v=W3P5JF4whgA (I haven't watched it, but I remembered seeing the title the other day). –  Szabolcs Dec 5 '12 at 0:20
    
I've had some thoughts along similar lines for using Arudino for EEG readings. I'd love to hear what you work out on this. –  Jagra Dec 5 '12 at 1:21
1  
Dear @s0rce, thanks for the links! Navigating through the different links found a potential solution to the serial port issue with library.wolfram.com/infocenter/Demos/5726 but Im having issues with the MacOSx and/or Mathematica 9. The Link is not successful (keeps running and never finishes loading). I'll try tomorrow with Win XP and MMA 9 and MacOSx with MMA 8 to see if I can make it work. –  PatoCriollo Dec 5 '12 at 4:22
    
@Szabolcs, fantastic video! I could make it work that way. Have several arduino boards so I can use one as the remote by the Smoker, and connect the other one as a bridge to the PC. The ArduinoLink' package that Wolfram's son uses to connect the arduino does not seem to be available yet. –  PatoCriollo Dec 5 '12 at 4:30
show 2 more comments

1 Answer 1

I was finally able to connect to the serial port by using the package SerialIO created by Rob Raguet-Schofield found here http://library.wolfram.com/infocenter/Demos/5726/ and then following the instructions and testing the Arduino program that William Turkel posted in his blog.

http://williamjturkel.net/2011/12/25/connecting-arduino-to-mathematica-on-mac-os-x-with-serialio/

Hope to see the package ArduinoLink being developed by Keshav Saharia being released soon.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.