I'm trying to do my first test with XBee Zigbee Mesh Kit.(XB24c Family,Due I want to do a temperature sensors network).
My first test consist in a coordinator node and an end device node connecting by mean of Xbee Grove Development board, in API Mode and everything seems to work well.
So My second step was start reading ADC inputs, to do it, I have done a simple votage divider with resistors and I've connected 579 mvolt to diferent inputs (actually I've tested AD0, AD1, AD2 and AD3).
I know that 579 mvolts is the real value that I'm connecting because I'm also measuring with a multimeter and the teorical value is very similar.
But unfortunatelly the value that I'm getting is around 411 (analog read) that correspond with 482 mvolts (aprox), I've tested several inputs and the value is very similar in all of them (almost 100mvolts under the real value)... I suppose that I'm mistaking something,
May someone help me?
Thanks in advanced
Example of frame (only AD1 has a real voltage of 579mvolts connected, the rest of inputs aren't connected)
IO Data Sample RX Indicator (API 1)
7E 00 18 92 00 13 A2 00 41 5B FC 59 28 99 01 01 00 00 0F 02 0B 01 9B 02 0E 02 10 2A
Start delimiter: 7E
Length: 00 18 (24)
Frame type: 92 (IO Data Sample RX Indicator)
64-bit source address: 00 13 A2 00 41 5B FC 59
16-bit source address: 28 99
Receive options: 01
Number of samples: 01
Digital channel mask: 00 00
Analog channel mask: 0F
DIO0/AD0 analog value: 02 0B (523)
DIO1/AD1 analog value: 01 9B (411)
DIO2/AD2 analog value: 02 0E (526)
DIO3/AD3 analog value: 02 10 (528)