Commit ce0a9ddf authored by MakerRobotics's avatar MakerRobotics

Update maker_lightSensor.cpp

parent bbad9574
......@@ -13,11 +13,13 @@
#include "stdint.h"
#include "maker_lightSensor.h"
/* Returns the analog value */
uint8_t maker_getLight(uint8_t pin)
return analogRead(pin);
/* Returns the calculated percentage */
double maker_getLight_P(uint8_t pin)
return (double)analogRead(pin)/1024*100;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment