Getting Started with Noduino SDK on Mac OS X

来自Jack's Lab
跳转到: 导航, 搜索

目录

1 准备

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

Falcon-v1.0-1000.jpg

Falcon-v2.4-800-wiki.png


Falcon V1.0 的 FT232RL OSX 系统自带驱动,OSX 上只要打开一下串口,DTR 和 RTS 就变成 0,而且再改旧改不回 1 了,只能重新插拔。OS X 的默认驱动有问题,得卸载了,重新安装 FTDI 的官方驱动,用此脚本删去原系统驱动:https://cdn.sparkfun.com/assets/learn_tutorials/7/4/apple_vcp_unload.scpt


Falcon V2.4 and Nodemcu 开发板使用 CP2102 这颗 USB 转串口芯片,到芯片厂家官网下载 Mac OS X 版的驱动:http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx

下载后安装,插上开发板,就能发现:

$ sudo dmesg|tail -n 27
hfs: unmount initiated on Recovery HD on device disk0s3
USB (XHCI Root Hub USB 2.0 Simulation):Port 1 on bus 0xa connected or disconnected: portSC(0xe0206e1)
com_silabs_driver_CP210xVCPDriver: init
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::attach
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::probe
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::detach
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::attach
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::start - Registered for Power Management
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::start!
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::start - Found device at interface 0
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::setPowerState - Waking up
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::SelectInterfaces - BulkInput Pipe is 0xffffff8031e15480 on EP1
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::SelectInterfaces - BulkOutput Pipe is 0xffffff802bac6900 on EP1
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo - Part Number Found: 0x02
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo - UsbConfigurationDescriptor - 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .bLength = 9 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .bDescriptorType = 0x02 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .wTotalLength = 32 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .bNumInterfaces = 1 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .bConfigurationValue = 1 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .iConfiguration = 0 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .bmAttributes = 0x80 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::GetCP210xInfo     .MaxPower = 50 
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::start - Sucessfully loaded the driver
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::message
com_silabs_driver_CP210xVCPDriver(0xffffff8039194000)::message
com_silabs_driver_CP210xVCPDriver::setPowerState(0x193cbab37128ae0d, 0 -> 1) timed out after 10205 ms



2 环境准备

先安装必要的工具

Homebrew 是一款终端下的命令程序包管理器,类似 debian 的 apt ,安装很简单,复制如下命令在终端下运行,按回车并输入密码后等待安装成功:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装 git:

$ brew install git



3 尝试 Noduino SDK

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

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

尝试点灯的例子

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

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

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



4 扩展阅读

产品级开发建议使用我们的专业 SDK:


学习、研究、创客可以尝试:


更多问题参考:








个人工具
名字空间

变换
操作
导航
工具箱