Pages: [1]   Go Down
Author Topic: Display multiple analog inputs over USB  (Read 1092 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings,

I am new to the Arduino family and am looking for a kickstart in the right direction.

What I am trying to do is have multiple analog inputs into the arduino, have the ardunio send those to a computer, and show the value of the inputs separately with a gui.  

What I need help with is a method to send the data from the ardunio to the computer and be able to tell which analog signal it is from.

Thanks much for the help!
Logged

UK
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2883
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you look at the tutorials and the playground, you'll find everything you need to know.
Logged

Per Arduino ad Astra

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31452
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need another program on the PC to catch the data sent down the serial port from the arduino. Many people use processing for this.

Sending data is simply a matter of using the Serial.print() function. Then you have to catch it at the other end, there are lots of different techniques you can use.
Logged

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

Groove:  What is the playground?

Grumpy Mike:  which techniques are you referring to?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2883
Gorm deficient
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

www.arduino.cc/playground
Logged

Per Arduino ad Astra

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 5
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

one method is to prefix your data with something that identifies the analog input. You could for instance send soemthing like:

AN1 Analog 1 data here , AN2 analog 2 data here etc. etc.

Then on the recieving side you could look for the prefix or header and you would now which analog data you are recieving.

Another method is to put all your analog readings in one commaseparated string like this

value1,value2,value3,....last value then send the string followed by a linefeed. (use serial.println to do that)

on the recieving end you would read an entire line from the serial input and split it up in individual values using the commas as ddelimiters.

It all depends on what programming language / environment you decide to use to recieve / display the data on the PC side.
Logged

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

Ohh I see.  I might have to try a combination of these.

Thanks for the help smiley  It should help me get started.
Logged

Pages: [1]   Go Up
Jump to: