SHARE
TWEET

Untitled

a guest Feb 18th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const int photoPin =A2;
  2. int lightVal;
  3. void setup() {
  4.   // put your setup code here, to run once:
  5. pinMode (photoPin, INPUT);
  6. Serial.begin (9600);
  7. }
  8.  
  9. void loop() {
  10.   // put your main code here, to run repeatedly:
  11. lightVal = analogRead (photoPin);
  12. Serial.println (lightVal);
  13. //max is 143 and the min is 5
  14. //depends on how you use it
  15.  
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top