“Digispark控制板使用”的版本间的差异

来自YFRobotwiki
跳转至: 导航搜索
(以“==连接并使用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 c...”为内容创建页面)
 
 
(未显示1个用户的1个中间版本)
第13行: 第13行:
  
 
====安装说明====
 
====安装说明====
=====windows=====
+
=====windows install=====
 
* 首先下载arduino IDE :http://www.arduino.cc/en/Main/Software (1.6.5以上版本)
 
* 首先下载arduino IDE :http://www.arduino.cc/en/Main/Software (1.6.5以上版本)
 
* 双击运行arduino IDE, file -> preferences  
 
* 双击运行arduino IDE, file -> preferences  
第36行: 第36行:
  
 
* 安装完成
 
* 安装完成
 +
 +
  
 
=====Linux Install=====
 
=====Linux Install=====
  
 
* If you haven't before - Install the udev rules found here:[http://digistump.com/wiki/digispark/tutorials/linuxtroubleshooting Troubleshooting section]
 
* If you haven't before - Install the udev rules found here:[http://digistump.com/wiki/digispark/tutorials/linuxtroubleshooting Troubleshooting section]
 +
  
  
第47行: 第50行:
  
 
* 板型选择:Tools -> Boards -> Digispark(Default - 16.5mhz) (Tools -> Programmer无需选择)
 
* 板型选择:Tools -> Boards -> Digispark(Default - 16.5mhz) (Tools -> Programmer无需选择)
* 打开例程代码:File -> Examples -> Digispark_Examples -> Start <font color="red" size="+1">无需连接控制板</font>,代码如下:
+
 
 +
* 打开例程代码:File -> Examples -> Digispark_Examples -> Start <font color="red" size="+1"> 无需连接控制板 </font>,代码如下:
 
<pre style="color:dimgray">
 
<pre style="color:dimgray">
 
// the setup routine runs once when you press reset:
 
// the setup routine runs once when you press reset:
第66行: 第70行:
 
}
 
}
 
</pre>
 
</pre>
* 点击"Upload"按钮,底部状态栏会提示要求连接digispark控制板,这时你需要将其插入
+
* 点击"Upload"按钮,底部状态栏会提示要求连接digispark控制板,这时你需要将其插入(你有60s的时间将其连接上,不用着急)
* 下载完成 ,底部状态栏提示,如下图:
+
<img src="http://image.yfrobot.com/digispark/InstallAndTest/downloading.png-yf" alt="等待插入控制板" />
 +
 
 +
 
 +
插上Digispark控制板后,等待 下载完成,底部状态栏 会有 提示,如下图:
 +
<img src="http://image.yfrobot.com/digispark/InstallAndTest/downloaded.png-yf" alt="完成下载" />
 +
 
 +
 
 +
* 程序下载完成后,它将立即运行代码
 +
<img src="http://image.yfrobot.com/digispark/InstallAndTest/Blink.gif-yf" alt="blink" />
  
* 下载完成后,它将立即运行代码
 
  
 
PS:如果你拔掉digispark并重新供电,程序将延时5秒运行。这5秒延时是确定你是否想要运行此程序。
 
PS:如果你拔掉digispark并重新供电,程序将延时5秒运行。这5秒延时是确定你是否想要运行此程序。
 +
 +
 +
----
 +
 +
 +
[[首页 | 返回首页]]
 +
 +
更多建议和问题欢迎反馈至 [http://www.yfrobot.com YFRobot论坛]
 +
 +
购买方式:[http://yfrobot.taobao.com/ YFRobot 电子工作室]

2016年11月14日 (一) 17:11的最后版本

连接并使用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 install

打开设置


  • 在 Additional Boards Manager URLs 输入框中填写:http://digistump.com/package_digistump_index.json,点击OK

设置链接


  • Tools -> Boad -> Boards Manager,type选择 "Contributed",之后选择"Digistump AVR Boards" 安装包,点击"Install"按钮进行安装

选择板型管理器下载安装


  • 等待下载安装完成后,会显示"Installed";完成后,Tools -> Boards ->Digispark(Default - 16.5mhz),新用户建议选择该项。

选择板型


  • 安装完成


Linux Install


下载程序测试

digispark 和其他arduino兼容产品不同,下面看看具体哪里不同?

  • 板型选择:Tools -> Boards -> Digispark(Default - 16.5mhz) (Tools -> Programmer无需选择)
  • 打开例程代码:File -> Examples -> Digispark_Examples -> Start (无需连接控制板),代码如下:
// 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
}
  • 点击"Upload"按钮,底部状态栏会提示要求连接digispark控制板,这时你需要将其插入(你有60s的时间将其连接上,不用着急)

等待插入控制板


  • 插上Digispark控制板后,等待下载完成,底部状态栏会有提示,如下图:

完成下载


  • 程序下载完成后,它将立即运行代码

blink


PS:如果你拔掉digispark并重新供电,程序将延时5秒运行。这5秒延时是确定你是否想要运行此程序。




返回首页

更多建议和问题欢迎反馈至 YFRobot论坛

购买方式:YFRobot 电子工作室