查看“MWatch (Wi-Fi)”的源代码
←
MWatch (Wi-Fi)
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| mWatch (Wi-Fi)}} {| style="width: 800px;" |- | ==Objective== Here we use mCookie to build a simple watch, which can synchronize the time automatically in the WiFi environment. [[File:mWatch-ok.jpg|400px|center]] ==Principle== We add the WIFI module in the tutorial, which can connect to the pre-set network after the power-up of the mWatch. When it is connected, the mWatch will synchronize network time automatically. And then acquiring time through the RTC module and displaying it on the OLED screen. [[File: mWatch-wifi-sch.jpg|600px|center]] ==Equipment== {|class="wikitable" |- |Module||Number||Function |- |[[mCookie-CoreUSB]]||1||Core board |- |[[mCookie-RTC]]||1||Time clock module |- |[[mCookie-WiFi]]||1||Networking module |- | [[mCookie-OLED]]||1||OLED display |- | [[Microduino-BM]]||1||Battery management |} [[File: mWatch-wifi-module.jpg|600px|center]] ==Preparation== *Setup 1:Connect the CoreUSB to the PC/Mac with a USB cable and then open Arduino IDE. [[File:CoreUSB_Ble_pc.jpg|600px|center]] *Setup 2:Click Files > Examples > mCookie > _301_mWatch_WiFi, and download the program. [[File: l mWatch-wifi-ino.jpg|600px|center]] * Setup 3:Load the code and copy the program to IDE; Select the right board and COM port for program download; When it pops up "Done Uploading" notice, it means the program has been written into the CoreUSB. [[File: mWatch-wifi-com.jpg|600px|center]] ==Program Description== *Acquire network time function: " updateTimeData()"--Execute the statement to get the network time. *Acquire RTC time function: " getRTC()"--Execute the statement to get RTC time. *RTC time adjusting function: " setRTC()"--Execute the statement to re-set the RTC time. *Notice for network connection initializing can be displayed by the OLED screen. (Inside setup() function.) **Search for network: If successful, it'll pop up notice " softap ok " or it'll show " softap err ". **Join in network: If successful, it'll show notice " Join AP success " or it'll show " Join AP failure ". **Note for time acquiring: If successful, it'll be displayed on the OLED. ==Code Debugging == [[File: mWatch-wifi-ino.jpg|600px|center]] *Find this section of code above in the main program, enter WiFi user name and password in "". So it can connect to the internet and get precise time information. *Find this section of code above from the rtc.h program, modify it as your time zone; Load the program to the CoreUSB after modifying and get precise time under WiFi environment. [[File: mWatch-wifi-shiqu.jpg|600px|center]] ==Hardware Buildup == *Setup 1:Connect the activated battery box and BM module. [[File:CoreUSB_Ble_steup2.jpg|600px|center]] *Setup 2:Stack all modules together without fixed order and finish circuit buildup. [[File:mWatch_steup3.jpg|600px|center]] ==Result== Data and week is displayed on the first line; Time is displayed on the second line; Custom text is displayed on the third line. [[File:legao_mWatch.jpg|600px|center]] ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
MWatch (Wi-Fi)
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息