Pages: [1]   Go Down
Author Topic: Sending data to Arduino via USB?  (Read 2563 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 388
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: May 06, 2010, 09:02:37 am by TBAr » Logged

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

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!
Logged

Pages: [1]   Go Up
Jump to: