用于将位流闪烁到AVR微控制器的最小工具集。

avr_helpers的Python项目详细描述


#AVR_帮助程序

此包提供用于与[avr][1]交互的帮助程序类。 工具链。它包括一个windows版的avrdude和linux版的副本(32位 以及[Arduino 1.0.5]中的avrdude.conf文件 IDE][2]。这允许单独刷新compile.hex固件文件

[1]:http://en.wikipedia.org/wiki/Atmel_AVR [2]:http://arduino.cc/en/main/software

###avrdudeAPI##

avrdude类实现了一个api,用于:

  • Scanning available serial ports for a connected device.
  • Flashing a .hex bit-stream file to an AVR device.

###avrdudeapi用法

>>> from avr_helpers import AvrDude
>>> AvrDude?
Type:            type
String form:     <class ‘avr_helpers.AvrDude’>
File:            ...
Init definition: AvrDude(self, protocol, microcontroller, baud_rate, conf_path=None, port=None)
Docstring:       ...
>>> avr_dude = AvrDude(‘arduino’, ‘atmega168’, ‘19200’)
>>> # `-D` disables erase cycle to speed up programming.
>>> stdout, stderr = avr_dude.flash(‘blink.hex’, [‘-D’])
>>> print stdout
>>> print stderr

avrdude-x64: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude-x64: Device signature = 0x1e9406 avrdude-x64: reading input file “blink.hex” avrdude-x64: writing flash (1056 bytes):

Writing | ################################################## | 100% 0.76s

avrdude-x64: 1056 bytes of flash written avrdude-x64: verifying flash memory against blink.hex: avrdude-x64: load data flash data from input file blink.hex: avrdude-x64: input file blink.hex contains 1056 bytes avrdude-x64: reading on-chip flash data:

Reading | ################################################## | 100% 0.68s

avrdude-x64: verifying … avrdude-x64: 1056 bytes of flash verified

avrdude-x64 done. Thank you.

注意,由于ArduinoIDE中的avrdude.conf文件包含在 avr_helpers包,可以使用arduino协议,使 将预编译的.hex文件闪烁到Arduino设备。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在TextView中对齐部分文本   带有iText和eTPKCS11的java PKCS#11签名。dll&SunPKCS11提供程序   java Intellij Idea找不到jar   java Chrome/Firefox和Jetty HTTPS   java我无法打包找不到的JavaFX应用程序模块   多线程Java:排序从异步任务检索的结果   java客户端/服务器socket不能与外部连接一起工作   java如何在单击“下一步”按钮时获取其他详细信息?   java组织。springframework。网状物客户RestTemplate应声明为@Bean,而plain@Autowired抛出错误   java如何绘制javax。摆动将ImageIcon转换为JavaFX。fxml呈现用户界面?   使用for循环的Java跟踪   java如何编码字符串以显示彩色文本(基于字符串中的前缀)   Java保存/打开文件对象   基于java复选框的搜索:使用尽可能多的“”动态生成准备好的语句作为选中复选框的计数   java为什么crawler4j随机挂起?