Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the setup routine runs once when you press reset:
- void setup() {
- Serial.begin(9600);
- }
- void loop() {
- //photoresistor on A0 pin
- int photoresValue = analogRead(A0);
- photoresValue *= 0.25;
- Serial.print(photoresValue);
- Serial.print(",");
- //potentiometer on A1 pin
- int potValue = analogRead(A1);
- potValue *= 0.25;
- Serial.println(potValue);
- delay(1); // delay in between reads for stability
- }
Add Comment
Please, Sign In to add comment