Go Down

Topic: Sending data to Arduino via USB? (Read 3068 times) previous topic - next topic

2entysix

I'm looking into making a USB device that can take commands issued from a normal desktop computer. Essentially, my idea is to have a program running on my desktop that periodically sends streams of data (essentially commands) to an external peripheral that processes them and does something (I'm intending to make a set of actuators that perform a number of actions based on the data sent from the program).

I know that the Arduino board can be programmed via USB, but I'm not sure if it can have data sent to it while it's actually operating. Can the Duemilanove do this, or does it require a USB host shield?

I'd like to use USB for this simply because it's so common, fairly high bandwidth, and the like. However, if it would be easier or better to use something else, perhaps another bus may be preferable? I know a lot of old-schoolers prefer RS-232, but I lack such a port on my desktop.

I know this is a pretty noob question, but I figure I might as well ask before shelling out the cash for an Arduino. Any input is greatly appreciated!

Coding Badly


A modern Arduino connects to a computer via USB and is presented to the computer as a standard serial port.  To send commands to the Arduino, you simply open the serial port and write.  On the Arduino, there are various serial port functions available to collect and process the data sent from the PC.  In other words, an Arduino is just what you need!

You did not say what you mean by "fairly high bandwidth".  Typically, you should keep the communication speed at or below 115,200 baud.  If you need to move data faster than that, a Teensy would be a good choice.

TBAr

#2
May 06, 2010, 03:55 pm Last Edit: May 06, 2010, 04:02 pm by TBAr Reason: 1
Quote
Essentially, my idea is to have a program running on my desktop that periodically sends streams of data (essentially commands) to an external peripheral that processes them and does something (I'm intending to make a set of actuators that perform a number of actions based on the data sent from the program).

My first thought is that this is an ideal use for Bitlash running on the Arduino. Use the USB connection from your PC to send bitlash commands to an Arduino to have it toggle pins that eventually control the actuators.

2entysix

Thanks for the info, I've got my Arduino ordered and on the way!

I'll take a look at bitlash to see if it'll do what I need, sounds like it could be very useful!

Go Up