Guest User

Untitled

a guest
Jun 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int sensorValue = 0;
  2. int sensorPin = A0;
  3. int ELPin = 0;
  4. int pulse = 0;
  5. void setup()
  6. {
  7. }
  8. void loop()
  9. {
  10. int x = 1;
  11. int Aread = analogRead(sensorPin)/128;
  12. int z = x * Aread;
  13. for (int i = 0; i > -1; i = i + z)
  14. {
  15. analogWrite(ELPin, i);
  16. if (i == 255) x = -1;
  17. delay(10);
  18. }
  19. }
Add Comment
Please, Sign In to add comment