Changes between Initial Version and Version 1 of wade/embedded/arduino/example/example_10_1_IR


Ignore:
Timestamp:
Apr 20, 2010, 11:33:49 PM (15 years ago)
Author:
wade
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • wade/embedded/arduino/example/example_10_1_IR

    v1 v1  
     1
     2{{{
     3#C
     4void setup()
     5{
     6  pinMode(9, OUTPUT);
     7  //pinMode(8, OUTPUT);
     8  pinMode(2, INPUT);
     9}
     10boolean val1 = 1;
     11//boolean val2 = 1;
     12void loop()
     13{
     14  digitalWrite(9, val1^=1);
     15  //digitalWrite(8, val2^=1);
     16  if (digitalRead(2) == LOW)
     17    digitalWrite(13, HIGH);
     18  else
     19    digitalWrite(13, LOW);
     20  //delayMicroseconds(1);
     21}
     22}}}