Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int sensorValue = 0;
- int sensorPin = A0;
- int ELPin = 0;
- int pulse = 0;
- void setup()
- {
- }
- void loop()
- {
- int x = 1;
- int Aread = analogRead(sensorPin)/128;
- int z = x * Aread;
- for (int i = 0; i > -1; i = i + z)
- {
- analogWrite(ELPin, i);
- if (i == 255) x = -1;
- delay(10);
- }
- }
Add Comment
Please, Sign In to add comment