查看Digispark控制板使用的源代码
←
Digispark控制板使用
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
你刚才请求的操作只对属于该用户组的用户开放:
用户
您可以查看并复制此页面的源代码:
==连接并使用digispark== ===Bootloader:=== The bootloader is the code that is pre-programmed on your Digispark and allows it to act as a USB device so that it can be programmed by the Arduino IDE. The Digispark runs the “micronucleus tiny85” bootloader version 1.02, an open source project: https://github.com/micronucleus/micronucleus originally written by Bluebie: https://github.com/Bluebie. CAUTION We are not at this point supporting upgrading the firmware, so if you decide to, you do so entirely at your own risk. ===Software:=== The Digispark uses the Arduino IDE 1.6.5+ (Arduino 1.6.5r2 - NOT 1.6.6 or 1.6.7 strongly recommended) ====安装说明==== =====windows===== * 首先下载arduino IDE :http://www.arduino.cc/en/Main/Software (1.6.5以上版本) * 双击运行arduino IDE, file -> preferences <img src="http://image.yfrobot.com/digispark/InstallAndTest/preferences.gif-yf" alt="打开设置" /> * 在 Additional Boards Manager URLs 输入框中填写:<font color="red"><nowiki>http://digistump.com/package_digistump_index.json</nowiki></font>,点击OK <img src="http://image.yfrobot.com/digispark/InstallAndTest/entry.jpg-yf" alt="设置链接" /> * Tools -> Boad -> Boards Manager,type选择 "Contributed",之后选择"Digistump AVR Boards" 安装包,点击"Install"按钮进行安装 <img src="http://image.yfrobot.com/digispark/InstallAndTest/digispark_install.gif-yf" alt="选择板型管理器下载安装" /> * 等待下载安装完成后,会显示"Installed";完成后,Tools -> Boards ->Digispark(Default - 16.5mhz),新用户建议选择该项。 <img src="http://image.yfrobot.com/digispark/InstallAndTest/pickdigispark.gif-yf" alt="选择板型" /> * 安装完成 =====Linux Install===== * If you haven't before - Install the udev rules found here:[http://digistump.com/wiki/digispark/tutorials/linuxtroubleshooting Troubleshooting section] ====下载程序测试==== digispark 和其他arduino兼容产品不同,下面看看具体哪里不同? * 板型选择:Tools -> Boards -> Digispark(Default - 16.5mhz) (Tools -> Programmer无需选择) * 打开例程代码:File -> Examples -> Digispark_Examples -> Start <font color="red" size="+1">无需连接控制板</font>,代码如下: <pre style="color:dimgray"> // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(0, OUTPUT); //LED on Model B pinMode(1, OUTPUT); //LED on Model A } // the loop routine runs over and over again forever: void loop() { digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(1, HIGH); delay(1000); // wait for a second digitalWrite(0, LOW); // turn the LED off by making the voltage LOW digitalWrite(1, LOW); delay(1000); // wait for a second } </pre> * 点击"Upload"按钮,底部状态栏会提示要求连接digispark控制板,这时你需要将其插入 * 下载完成后,底部状态栏提示,如下图: * 下载完成后,它将立即运行代码 PS:如果你拔掉digispark并重新供电,程序将延时5秒运行。这5秒延时是确定你是否想要运行此程序。
返回
Digispark控制板使用
。
导航菜单
个人工具
登录
名字空间
页面
讨论
不转换
变种
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
查看
阅读
查看源代码
操作
查看历史
搜索
导航
首页
YF-论坛提问
YFRobot-直营店
YFRobot-企业店
Arduino
Arduino之入门篇
Arduino入门教程
Arduino语法参考
Arduino库
Arduino核心代码
编程平台
Mixly库
Mind+库
MakeCode扩展
传感器系列
积木式传感器系列
黑板传感器系列
蓝板传感器系列
Micro:Bit
Micro:Bit 通用基础教程
Valon智能车
Valon-I
帮助
帮助
wiki语法参考
工具箱
链入页面
相关更改
特殊页面
页面信息