如何给Digspark ATTINY85下载程序
当我们收到attiny85的板子后,会发现arduino IDE中并没有这个开发板相对应的选项,那么我们该如何烧录呢?
下面就跟着我们的步骤来操作吧:
1.首先打开IDE选择首选项。
2.接着我们在首选项的这个标黄位置输入第三方支持的地址库网址。
这个网址的地址为:
http://digistump.com/package_digistump_index.json
然后点击OK
3.到开发板管理处选择相应的开发板进行下载
4.等待一下,速度稍微有点儿慢。安装好后直接选择相应的单片机编译。
5.附上一段测试代码,看看是否顺利
// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(1, OUTPUT); //on board LED } // the loop routine 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 }
6.编译和重构的时候不要插USB线,这一点要记住。点击烧录的箭头,我们可以发现此时他会让你插入设备。
7.此时你再插入设备,就可以顺利下载程序了。