How to create look up table for ADC on bolt

Hi Rahul,

I want to utilize 4 channels at a time.
I will inject 0 to 5 v , 0 to 50 mv,4 to 20 mA, 0 to 5 v on these 4 chanels.

Now it will display the digital data based on my look up table ( ADC) on single web page.

Bolt has only one ADC pin so to connect 4 pins, I suggest you use an Arduino as an interface. You may use 4 pins of Arduino as the ADC and send data over UART. This instructable will be helpful: http://www.instructables.com/id/Interfacing-Bolt-With-Arduino-Bolt-UART/

Thanks for your reply.

Suppose I 'll use only only one analog channel of BOLT. Here, I’ll inject 0 to 5 v to Ao channel.
Now I want to create my own look up table.
0-volt= 0 degree
1 volt= 100 degree
2 volt= 200 degree
3 volt= 300 degree
4 volt= 400 degree
5 volt= 500 degree

Could I map this on BOLT without Arduino.
Please reply asap.

Hi, can you tell me are you using bolt version 1 (with SD card) or bolt version 2?

Hi,

If you are using the Bolt V1 with SD card. The ADC value to voltage mapping is as under

Voltage = ADC value x (5 /1023)

This is a formula inherent to a any 10bit ADC with a 5v reference voltage.

So if you want to create a look up table you can do so using if else conditions in Javascript code.

i.e. first convert ADC values to volatges , then using if , else if statements in JS code convert the voltage values into ur desired degree values

Ok.
Can you provide sample of code for ADC CONVERSION in js.
I am trying to build it. Still I need ur assistance.