User Tools

Site Tools


arduino:arduino_crash_course:basic_interaction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
arduino:arduino_crash_course:basic_interaction [2012/11/05 22:16] – [Using internal pullups] mithatarduino:arduino_crash_course:basic_interaction [2012/11/05 22:16] – [Using internal pullups] mithat
Line 161: Line 161:
   buttonState = digitalRead(pushButtonPin);  // read the input pin   buttonState = digitalRead(pushButtonPin);  // read the input pin
    
-  // Bbcasue we are using pullup resistors, the logic is inverted;+  // set LED state accordingly 
 +  // becasue we are using pullup resistors, the logic is inverted;
   // in other words, pressed produces LOW, un-pressed produces HIGH.   // in other words, pressed produces LOW, un-pressed produces HIGH.
   digitalWrite(ledPin, !buttonState);        // turn the LED on or off   digitalWrite(ledPin, !buttonState);        // turn the LED on or off
 } }
 </file> </file>
arduino/arduino_crash_course/basic_interaction.txt · Last modified: 2017/12/06 01:05 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki