Getting Started with Noduino SDK on Linux

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(下载 Noduino SDK)
第1行: 第1行:
== 准备开发板和USB连接线 ==
+
== 准备 ==
  
 
准备一块 Noduino Falcon / nodemcu v1.0 开发板,一根 micro USB 连接线:
 
准备一块 Noduino Falcon / nodemcu v1.0 开发板,一根 micro USB 连接线:
  
 
[[文件:Nodemcu-v1.0-board.jpg | 600px]]
 
[[文件:Nodemcu-v1.0-board.jpg | 600px]]
 +
 +
 +
开发板使用 CP2102 这颗 USB 转串口芯片,Linux 系统下无需额外安装驱动,插上开发板后,系统自动将其识别为 /dev/ttyUSB0 这个串口设备:
 +
 +
<source lang=bash>
 +
comcat@jackslab:/work/xwifi/noduino$ dmesg|tail -n 6
 +
[254109.926619] usb 4-1: Product: CP2102 USB to UART Bridge Controller
 +
[254109.926625] usb 4-1: Manufacturer: Silicon Labs
 +
[254109.926630] usb 4-1: SerialNumber: 0001
 +
[254109.931456] cp210x 4-1:1.0: cp210x converter detected
 +
[254110.044391] usb 4-1: reset full-speed USB device number 22 using uhci_hcd
 +
[254110.192809] usb 4-1: cp210x converter now attached to ttyUSB0
 +
</source >
  
 
<br><br>
 
<br><br>
第22行: 第35行:
 
</source>
 
</source>
  
<br><br>
+
尝试点灯的例子
 
+
== 连接开发板 ==
+
 
+
Micro USB 线的 microUSB 口连接 nodemcu 开发板,USB 口接 PC 的 USB 口。
+
 
+
开发板从 USB 口取电,开发板带 USB 转串口功能
+
 
+
PC 可通过这个 USB 线与开发板交换数据
+
 
+
<br><br>
+
 
+
== 安装驱动程序 ==
+
 
+
开发板使用 CP2102 这颗 USB 转串口芯片,Linux 系统下无需额外安装驱动,插上开发板后,系统自动将其识别为 /dev/ttyUSB0 这个串口设备:
+
 
+
<source lang=bash>
+
comcat@jackslab:/work/xwifi/noduino$ dmesg|tail -n 6
+
[254109.926619] usb 4-1: Product: CP2102 USB to UART Bridge Controller
+
[254109.926625] usb 4-1: Manufacturer: Silicon Labs
+
[254109.926630] usb 4-1: SerialNumber: 0001
+
[254109.931456] cp210x 4-1:1.0: cp210x converter detected
+
[254110.044391] usb 4-1: reset full-speed USB device number 22 using uhci_hcd
+
[254110.192809] usb 4-1: cp210x converter now attached to ttyUSB0
+
</source >
+
 
+
<br><br>
+
 
+
== 尝试点灯的例子 ==
+
  
 
<source lang=bash>
 
<source lang=bash>
第60行: 第45行:
 
$ make flash
 
$ make flash
 
</source>
 
</source>
 
  
 
上传完之后,你会很快看到板子靠近 USB 口的 LED 开始在慢闪(大概 1s 间隔)
 
上传完之后,你会很快看到板子靠近 USB 口的 LED 开始在慢闪(大概 1s 间隔)
  
 
<br><br>
 
<br><br>
 
 
<br><br>
 
<br><br>
 
 
<br><br>
 
<br><br>
 
 
<br><br>
 
<br><br>

2015年11月11日 (三) 16:05的版本

1 准备

准备一块 Noduino Falcon / nodemcu v1.0 开发板,一根 micro USB 连接线:

Nodemcu-v1.0-board.jpg


开发板使用 CP2102 这颗 USB 转串口芯片,Linux 系统下无需额外安装驱动,插上开发板后,系统自动将其识别为 /dev/ttyUSB0 这个串口设备:

comcat@jackslab:/work/xwifi/noduino$ dmesg|tail -n 6
[254109.926619] usb 4-1: Product: CP2102 USB to UART Bridge Controller
[254109.926625] usb 4-1: Manufacturer: Silicon Labs
[254109.926630] usb 4-1: SerialNumber: 0001
[254109.931456] cp210x 4-1:1.0: cp210x converter detected
[254110.044391] usb 4-1: reset full-speed USB device number 22 using uhci_hcd
[254110.192809] usb 4-1: cp210x converter now attached to ttyUSB0



2 下载 Noduino SDK

# clone the whole sdk
$ git clone git://github.com/icamgo/noduino-sdk.git noduino-sdk

# fetch the toolchain of esp8266
$ cd noduino-sdk
$ git submodule init
$ git submodule update
$ cd toolchain
$ ./gen.py
# generate the toolchain (you need Python 2.7)

尝试点灯的例子

# try the first example
$ cd ../example/blink
$ make

# upload the example to dev board through serial
$ make flash

上传完之后,你会很快看到板子靠近 USB 口的 LED 开始在慢闪(大概 1s 间隔)









个人工具
名字空间

变换
操作
导航
工具箱