diff --git a/docs/assignments/week08.md b/docs/assignments/week08.md index 6d73a7bef3d4b1804cf60940b0175ab2cb4b9ed8..f811e471912f7774255d7001785c4111f325651d 100644 --- a/docs/assignments/week08.md +++ b/docs/assignments/week08.md @@ -111,8 +111,31 @@ digitalWrite(signal_pin, HIGH); //turn the Led on ## **ATTINY 85** +I followed this tutorial to program my ATtiny: [How to Program an Attiny85 From an Arduino Uno](https://www.instructables.com/How-to-Program-an-Attiny85-From-an-Arduino-Uno/) + + + <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/884248390?badge=0&autopause=0&quality_selector=1&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="IMG_2291"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script> +``` +// the setup function runs once when you press reset or power the board +void setup() { + // initialize digital pin LED_BUILTIN as an output. + pinMode(LED_BUILTIN, OUTPUT); +} + +// the loop function runs over and over again forever +void loop() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(1000); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(1000); // wait for a second +} + +``` + +**Testing the circuit by connecting it to a 3v battery** + <div style="padding:64.14% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/884249196?badge=0&autopause=0&quality_selector=1&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="ATTINY"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>