Pages: [1]   Go Down
Author Topic: Arduino usb connection + console creation  (Read 475 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, i'm new to Arduino, but from the features it can support, we would like to use it for our thesis. I would ask help, though.

Just a brief background, I am planning to create a console (like the cmd command for windows) using C language. It will provide the commands, which will then be interpreted by the arduino microcontroller (that is, if this is actually possible).

1) The arduino board I bought already has a usb connection. How can I get input from the usb (ie what are the ports to be accessed, is it parallel or serial communication)?

2) Is it possible to create a console (like cmd for windows) using C so that the arduino accepts 3 commands? Or do i have to use hyperterminal instead?

Any ideas on how to achieve this is very much appreciated. Thank you.
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bitlash ( http://bitlash.net ) may be worth a look for the Arduino side of your project.  It is an open source command interpreter that listens on the virtual serial port which is brought up when you plug the Arduino in via USB.

On the PC side, you can drive Bitlash (or any sketch on Arduino) by opening and writing to the serial port in your PC-side language of choice.  You could develop your own a terminal emulator if the available ones don't suit your needs.

Happy hacking,

-br
http://bitlash.net
http://entropymouse.com



Logged

Chester, UK
Offline Offline
Sr. Member
****
Karma: 2
Posts: 489
Trying to return the love to none logic level MOSFETS
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When you say console are you thinking of something like commands like:
Lightbulb 1 - 100%
Lightbulb 2 - 80%

That the arduino interprets as:
AnalogWrite(9,255)
AnalogWrite(10,204)

if so - this is very common and very possible.
Logged

If your system involves lethal voltages/life critical/flamable elements - you probably shouldn't need to ask.
The Arduino != PC.

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

@billroy: thanks, i will take a look at it.

@daveg360: yes, something like that, however, i am new to arduino, and not sure how to get that input from the usb. So i will take a look at what billroy suggested, it might be the thing i'm looking for.

Thanks guys.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16490
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Well just to expand on the point, the Arduino (using the hardware FTDI serial convertor chip) looks to a PC as a simple serial comm port. So any PC application or programming language that can work with comm ports can send and receive characters to/from an Arduino. Keep in mind that this is a one character at a time interface, so any protocol or parsing of the serial data has to be programmed in the Arduino sketch.

Lefty
Logged

Pages: [1]   Go Up
Jump to: