Digistump Forums
The Digispark => Digispark Project Ideas => Topic started by: jaghvi on August 27, 2013, 10:32:22 pm
-
Received 2 Digispark yesterday . How about DS as multimeter ? Anyone who has implemented it ?
-
I did a quick voltage logger to eeprom some time ago, it should be fairly easy to display a voltage on a LCD screen.
-
This should be very simple - and quite useful - for the voltage reading just
int reading = analogRead(PinNumber);
double result = doubleMap(reading,0,1024,0,5);
with this function to do the doubleMap since the map function is just for integers
double doubleMap(double x, double in_min, double in_max, double out_min, double out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}