2572|5

45

帖子

0

TA的资源

一粒金砂(中级)

楼主
 

[MicroPython]开发版之资料收集 [复制链接]

 
今天中午,收到圆通快递的信息和电话,想必是申请的开发版到了,就叫小Py吧,中午太忙了,所以现在才来论坛发贴。首先,先上图让大家看看吧
先来张远景,



近景,

焊好排针之后,




好了, 上电,第一就遇到了,驱动无法安装上,


先看看,不急,

选择手动更新驱动,定位到小Py的磁盘,然后下一步,哦列,装上了!
看图:

然后,接着就是开始烧写程序了
咦?好像也没有说怎么烧写程序嘛。。。。
有了,我就不翻译了
嘻嘻嘻

Now we are going to write our Python program, so open the main.py file in a text editor. On Windows you can use notepad, or any other editor. On Mac and Linux, use your favourite text editor. With the file open you will see it contains 1 line:

# main.py -- put your code here!

This line starts with a # character, which means that it is a comment. Such lines will not do anything, and are there for you to write notes about your program.

Let’s add 2 lines to this main.py file, to make it look like this:

# main.py -- put your code here!import pybpyb.LED(4).on()

The first line we wrote says that we want to use the pyb module. This module contains all the functions and classes to control the features of the pyboard.

The second line that we wrote turns the blue LED on: it first gets the LED class from the pybmodule, creates LED number 4 (the blue LED), and then turns it on.


2.4. Resetting the pyboard

To run this little script, you need to first save and close the main.py file, and then eject (or unmount) the pyboard USB drive. Do this like you would a normal USB flash drive.

When the drive is safely ejected/unmounted you can get to the fun part: press the RST switch on the pyboard to reset and run your script. The RST switch is the small black button just below the USB connector on the board, on the right edge.

When you press RST the green LED will flash quickly, and then the blue LED should turn on and stay on.

Congratulations! You have written and run your very first MicroPython program!

实验室管理大叔马上要来锁门了,回宿舍了,不然就走不了了。
明天再试试吧,
临走之前,下了一点资料,给大家分享分享。



IMG_20160414_141834.jpg (757.46 KB, 下载次数: 0)

IMG_20160414_141834.jpg

最新回复

nmg
[attach]236963[/attach]怎么把帖子中的部分内容又复制一遍  详情 回复 发表于 2016-4-15 10:05
点赞 关注
个人签名mo_正_pei
 
 

回复
举报

45

帖子

0

TA的资源

一粒金砂(中级)

沙发
 
Micro-Python-Windows-setup.pdf (603.01 KB, 下载次数: 19) Micro-Python-Windows-setup.pdf (603.01 KB, 下载次数: 19) Python The Complete Manual First Edition.pdf (11.83 MB, 下载次数: 56) Quick reference for the pyboard — MicroPython 1.pdf (484.46 KB, 下载次数: 18) 快速入门:十分钟学会Python.pdf (1.59 MB, 下载次数: 28)
个人签名mo_正_pei
 
 
 

回复

45

帖子

0

TA的资源

一粒金砂(中级)

板凳
 
Now we are going to write our Python program, so open the main.py file in a text editor. On Windows you can use notepad, or any other editor. On Mac and Linux, use your favourite text editor. With the file open you will see it contains 1 line:
# main.py -- put your code here!

This line starts with a # character, which means that it is a comment. Such lines will not do anything, and are there for you to write notes about your program.
Let’s add 2 lines to this main.py file, to make it look like this:
# main.py -- put your code here!

import pyb
pyb.LED(4).on()

The first line we wrote says that we want to use the pyb module. This module contains all the functions and classes to control the features of the pyboard.
The second line that we wrote turns the blue LED on: it first gets the LED class from the pybmodule, creates LED number 4 (the blue LED), and then turns it on.

2.4. Resetting the pyboard
To run this little script, you need to first save and close the main.py file, and then eject (or unmount) the pyboard USB drive. Do this like you would a normal USB flash drive.
When the drive is safely ejected/unmounted you can get to the fun part: press the RST switch on the pyboard to reset and run your script. The RST switch is the small black button just below the USB connector on the board, on the right edge.
When you press RST the green LED will flash quickly, and then the blue LED should turn on and stay on.
Congratulations! You have written and run your very first MicroPython program!

点评

nmg
[attachimg]236963[/attachimg]怎么把帖子中的部分内容又复制一遍  详情 回复 发表于 2016-4-15 10:05
个人签名mo_正_pei
 
 
 

回复

5260

帖子

239

TA的资源

管理员

4
 
mo_正_pei 发表于 2016-4-15 09:53
Now we are going to write our Python program, so open the main.py file in a text editor. On Windows  ...

怎么把帖子中的部分内容又复制一遍
加EE小助手好友,
入技术交流群
EE服务号
精彩活动e手掌握
EE订阅号
热门资讯e网打尽
聚焦汽车电子软硬件开发
认真关注技术本身

点评

中间有个地方容易引起误会,所以又复制了一份,嘻嘻嘻  详情 回复 发表于 2016-4-15 17:21
 
 
 

回复

45

帖子

0

TA的资源

一粒金砂(中级)

5
 
nmg 发表于 2016-4-15 10:05
怎么把帖子中的部分内容又复制一遍

中间有个地方容易引起误会,所以又复制了一份,嘻嘻嘻
个人签名mo_正_pei
 
 
 

回复

45

帖子

0

TA的资源

一粒金砂(中级)

6
 
原来我的板子的LED(4) 是坏的,,,,
个人签名mo_正_pei
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/9 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表