User Tools

Site Tools


arduino: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:basic_interaction [2012/09/13 06:04] mithatarduino:basic_interaction [2012/09/14 00:43] mithat
Line 12: Line 12:
  
 This example uses polling to determine the state of a switch. If the switch is pressed, Arduino will turn an LED on. If it is not pressed, it will turn the LED off. This example uses polling to determine the state of a switch. If the switch is pressed, Arduino will turn an LED on. If it is not pressed, it will turn the LED off.
 +
 +<WRAP center round important 60%>
 +The following examples will need switches with pullups or internal pullups turned on with 
 +
 +<code c>
 +digitalWrite(pushButtonPin, HIGH);       // turn on pullup resistors
 +</code>
 +
 +I suspect internal pullups is the better way to go but possibly harder to explain.
 +</WRAP>
 +
 +
  
 <file c LightSwitch.ino> <file c LightSwitch.ino>
arduino/basic_interaction.txt · Last modified: 2012/09/14 01:19 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki