Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Britney Beatey
- * 6/7/2017
- * Version 3
- * Learning analog writing
- */
- const int pinButton = 2;
- const int pinLed = 6;
- boolean buttonDown = 0;
- boolean ledOn = 0;
- void setup()
- {
- // put your setup code here, to run once:
- pinMode (pinButton, INPUT);
- pinMode (pinLed, OUTPUT);
- Serial.begin (9600);
- digitalWrite (pinLed, HIGH);
- delay (100);
- digitalWrite (pinLed, LOW);
- for(int i = 0; i<= 200; i++)
- {
- analogWrite (pinLed, i);
- delay (80);
- }
- digitalWrite (pinLed, LOW);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Add Comment
Please, Sign In to add comment