some questions!

hi all!
i need to ask you some questions:
can arduino interact in real time with a software by usb? i need to control two stepping motor from software.

I’ll try to explain my problem:
i need to build a robotic arm with an antenna on the top, and i need that the antenna find itself the best position with the better signal strength, obiously by a software.

If aruino can work in real time by usb, can you post some example to show me how to use the usb port in C or C++ (or something else if needed)?

Thanks a lot, and sorry for my english!

P.S. i’ll use arduino under linux OS, if this can be a problem!

interesting project :slight_smile:

The USB port on the Arduino board is not USB. It is really a serial port in disguise. On the computer it will show up as a serial port. When you install the Arduino environment you install a special driver for the FTDI chip on the Arduino board this chip wil convert between USB and serial. This should be good news for you, because it’s much simpler to program the serial port than the USB port.

It is absolutely possible to send information from the PC to Arduino to control two stepper motors.

I don’t know how fast something has to be to be “real time” but you can communicate with Arduino over the serial line at speeds up to 115 Kb / s

if i see the arduino like a serial port is much better! i sayd usb because i don’t have a serial port on my notebook, however i thing that 115kb/s it’s enought!

i don’t need an immediate response by arduino! also 1 second can be good enought.
i must write a software, to move the antenna reading the signal strength of a specific wireless, i think i can do this, but i don’t really know how i can give the “move” command to the 2 motors (without the arduino programming language) and i don’t know very well arduino yet to know how to make all the wiring!

edit:
can you give me some example to give command by serial to arduino?
and some wiring example! tanks a lot!

The way you send serial data to Arduino depends on what programming language and environment you use, i don’t think that there is a “generel example”. I only have a little experience communicating with Arduino from VB 2005.

no please! not VB!!! i use linux, all the other programming language for an example can be good :smiley:
i really don’t know how arduino works, and i wish to know all it potential :smiley:

Well maybee someone else can chip in with info. on sending serial data from Linux to Arduino.
I know absolutely nothing about it.

no please! not VB!!! i use linux, all the other programming language for an example can be good :smiley:
i really don’t know how arduino works, and i wish to know all it potential :smiley:

I’m new to this forum but I have been using Processing to communicate successfully over the usb cable to my arduino for several months now.

Currently I am working on using 3 stepper motors to make a reprap. I send the number of steps for each stepper to take and the arduino’s code moves the steppers at different speeds so they stop at the same time. If you want to try my code the blog is at http://ar5in.tumblr.com/ and the code is stored at http://www.freewebs.com/adub/ .

Arvin

Its good you use Linux. It simplifies things greatly.

You can control it using Perl, PHP, Tcl, Python, C, C++, Bash or whatever the hell you want. :slight_smile:
If your desperate then you can even use echo (once the serial params have been set).

Just find your favorite language’s serial library and point it at /dev/ttyUSB0