Page 1 of 1

Best way to get status and set vars via serial connection

Posted: Thu Aug 14, 2014 2:29 pm
by scurvyrat
I finally am getting sometime to play around with a spark core. As a first step, just want to connect it serial-serial with my RA+ and get the data off.

Is the easiest way to do that include the RA_Wifi.h and then send over serial the wifi commands (like /sr)?

I tried to do that interactively in the Arduino IDE but didn't get a response from the RA+.

I'm running the lastest 1.1 RA code.

Thanks!

Re: Best way to get status and set vars via serial connectio

Posted: Thu Aug 14, 2014 3:43 pm
by rimai
I just bought 2 spark cores yesterday :)
If you are using the Arduino IDE, you must open Serial Monitor in 57600 baud and send this command:

Code: Select all

GET /sr HTTP
Technically the HTTP is not needed, but I couldn't show the space in the above example. All you really need is a space after sr. Anything after the space is discarded by the controller.
The same thing would be if you are connecting with the core, you must send the same sequence through the serial port and don't forget the space after any command.

Re: Best way to get status and set vars via serial connectio

Posted: Thu Aug 14, 2014 8:32 pm
by scurvyrat
thanks Roberta. Works like a charm. Curious what you think of the spark cores.

Re: Best way to get status and set vars via serial connectio

Posted: Thu Aug 14, 2014 8:51 pm
by rimai
I have not got them yet. Just bought them yesterday and they have not been shipped yet.

Re: Best way to get status and set vars via serial connectio

Posted: Fri Aug 15, 2014 10:00 am
by scurvyrat
Sorry about the typo on your name!

Re: Best way to get status and set vars via serial connectio

Posted: Fri Aug 15, 2014 10:12 am
by rimai
:)