Étape 8: Il est vivant
Compiler et flash l’esquisse clin au Conseil d’administration, n’oubliez pas de changer le NIP de 13 à 1. Lorsque le système vous invite, appuyez sur RESET. Le voyant Start devrait commencer à clignoter.
- Dans la sélectionner IDE Arduino : Conseil d’administration : Digispark(Default-16.5mhz)
- Sélectionnez le programmeur « Micronucleus »
- Charger le Blink depuis les esquisses d’exemple
- Remplacez toutes les références pour épingler le 13 à 1
- Cliquez sur la compilation et de télécharger l’icône, quand la « en attendant... Branchez maintenant périphérique"s’affiche
- Appuyez sur le bouton de réinitialisation sur l’appareil de ATtiny85
- Le voyant de démarrage devrait maintenant commencent à clignoter
Croquis de cligner des yeux
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the Uno and Leonardo, it is attached to digital pin 13. If you're unsure what pin the on-board LED is connected to on your Arduino model, check the documentation at <a href="http://www.arduino.cc" rel="nofollow"> <a href="http://www.arduino.cc" rel="nofollow"> <a href="http://www.arduino.cc"> http://www.arduino.cc </a> </a> </a> This example code is in the public domain. modified 8 May 2014 by Scott Fitzgerald<br> Modified for use with the ATtiny85 project board (January 2016) Pin change to 1. */ // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 1 as an output. pinMode(1, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(1, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(1, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }