I have a XBee that is connected to the computer and I have grove current sensor which is connected to the AD2 pin of XBee . My question is can I able to use the following command for getting accurate current value of that sensor. I got this formula from the Grove wikki
amplitude_current = (float)(sensor_value / 1024 * grove_vcc / 800 * 2000000)
# Calculate effective value (mA) effective_value = amplitude_current / 1.414 # minimum_current = 1 / 1024 * grove_vcc / 800 * 2000000 / 1.414 = 8.6(mA) # Only for sinusoidal alternating current print "sensor_value", sensor_value print "The amplitude of the current is", amplitude_current, "mA" print "The effective value of the current is", effective_value, "mA"
Thanks in advanced