Go Down

Topic: Display multiple analog inputs over USB (Read 2130 times) previous topic - next topic



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!


If you look at the tutorials and the playground, you'll find everything you need to know.
Per Arduino ad Astra


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.


Groove:  What is the playground?

Grumpy Mike:  which techniques are you referring to?


Per Arduino ad Astra


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.


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

Thanks for the help :)  It should help me get started.

Go Up