Pages: [1]   Go Down
Author Topic: Using Arduino as dumb IO device  (Read 517 times)
0 Members and 1 Guest are viewing this topic.
Stockholm
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Silicon puppeteer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was wondering if anybody knows of a library or if there is any project underway to make the Arduino into a simple device for relaying  ita IO data to a PC.
What I would want is running Arduino code in the PC, against a library that would mimic the Arduino libraries but would talk to the Arduino though the serial in order to send/get data, instead of actually having the whole thing running in the Arduino.

So, e.g. analogRead(X) would ask the Arduino (through the serial) for the current data in X pin, and return it back to the PC.

The point is being able to develop most of the Arduino code in the PC (which means debugging, breakpoints, logging, etc) with all the development goodies that brings.

I guess I am looking into:
-a fake version of the Arduino libraries (that would emit serial commands instead)
-a piece of code that would run on the Arduino that would respond to those commands
-a convention on sending data over the serial bus (maybe something like: AnalogRead(1) == "AR,01", return value being "AR,01:12.2")

Thanks,
rod
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are simpler forms of this available (you can find them with some searching of these forums and/or the playground), but one of the more complete:

http://bitlash.net/wiki/start

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That is really also the gist of Firmata, which comes with the Arduino IDE.
Logged

Stockholm
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Silicon puppeteer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey!
Thanks guys, it does look like both will do the trick, though Bitlash feels somewhat more accessible... I'll just add a small PC-side Arduino-like library that uses one or the other to get communication running from the PC, it will be much easier now smiley
Seems like they both have issues with servos for some reason though...

Btw, would the sort of thing I am planning be of any use to the community?
Logged

Pages: [1]   Go Up
Jump to: