what is the value that obtained from serial monitor in arduino?? ?

I working with my DIY sensor ( colour sensor) and i have no idea what the reading i obtained from the serial monitor in arduino software ? Anyone know? and how to change the value to voltage value? as i need to write down the voltage reading for my result part.

Picture of what is the value that obtained from serial monitor in arduino?? ?
sort by: active | newest | oldest
rickharris7 months ago

The analogue to digital converter (adc) will change an analogue value (voltage) into a digital number.

Depending on how many bits are involved it will split the max value up by that number of bits

So if you max value is 5 volts and your measuring it to 8 bit accuracy that means the 5 volts will be split into 255 (8 binary bits) sections each equal to 5/255 volts. simple maths will give you the value you need once you know how many bits your ADC uses.

OngE2 (author)  rickharris7 months ago

thankyou sir, do you know the way to connect my value to Visual Basic? i need to interface VB with arduino :)

Never written for it, but IIRC, you open a "file" to the "file" COM1 or whatever.

steveastrouk7 months ago

Looking at your numbers

Voltage = number received * 5/4095 where the 5 is the reference voltage to the ADC and 4095 is the number of bits in your number

Which arduino are you using ? The basic one had an output that would only go 0..1024

OngE2 (author)  steveastrouk7 months ago

the number received ... every time the number gt three readings which are Red , Blue and Green. which number should i take ?

All of them ! The colour is encoded in the return from all three channels.

Red volts= red number*5/4095 etc
OngE2 (author)  steveastrouk7 months ago

thank you very much . helped me alot :)