AVR micro controller and IDE(Integrated Development Environment) • Aim to communicate with sensors or PCs • Easy to use as a prototyping ! • Open source hardware • We’re using Arduino compatible architecture • more freedom, less money :)
[Value]) • e.g.) setup(){ int ledPin = 8; //LED is connected to digital output pin #8 } loop(){ digitalWrite(ledPin, HIGH); //set the LED on delay(1000); // wait for a second digitalWrite(ledPin, LOW); //set the LED off delay(1000); // wait for a second }
LED connected to digital pin 13 int inPin = 7; // pushbutton connected to digital pin 7 int val = 0; // variable to store the read value ! void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin 13 as output pinMode(inPin, INPUT); // sets the digital pin 7 as input } ! void loop() { val = digitalRead(inPin); // read the input pin digitalWrite(ledPin, val); // sets the LED to the button's value }
to Wikipedia: • LED as light sensor: "A LED is simply a diode that has been doped specifically for efficient light emission and has been packaged in a transparent case. Therefore, if inserted into a circuit in the same way as a photodiode, which is essentially the same thing, the LED will perform the same function.” • Photodiode: "A photodiode is a type of photodetector capable of converting light into either current or voltage, depending upon the mode of operation."