SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int analogIn = A2;
  2. int analogIn2 = A1;
  3. int digOut = 9;
  4. int digOut2 = 10;
  5.  
  6. void setup() {
  7. Serial.begin(9600);
  8. pinMode(digOut, OUTPUT);
  9. pinMode(digOut2, OUTPUT);
  10. }
  11.  
  12. void loop() {
  13. float y = map(analogRead(analogIn2), 0, 1023, 0, 255);
  14. analogWrite(digOut, y);
  15.  
  16. //Serial.println(analogRead(analogIn));
  17. float z = map(analogRead(analogIn), 350, 840, 0, 255);
  18. analogWrite(digOut2, z);
  19. }
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