查看“Microduino Lattice clock”的源代码
←
Microduino Lattice clock
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{| style="width: 800px;" |- | ==Outline== *Project:Microduino Double Color Matrix Cascading *Objective:We can realize electronic calendar by cascading four pieces of Microduino Double Color Matrix. At the same time, we can install DHT11 sensor on the matrix, which will be used to detect temperature and humidity. Besides, we can switch the display via Android phone. *Difficulty:High *Time-consuming:5 Hours *Maker:Microduino Studio-YLB ==Bill of Materials== *Microduino Equipments {|class="wikitable" |- |Modules||Number||Function |- |Microduino-Core||1|| Core board |- |Microduino-FT232R ||1||Program download |- |Microduino-RTC||1||Reading time |- |Microduino-BT||1||Communicating between the phone and Microduino-Core |} *Other Equipments {|class="wikitable" |- ||Microduino Double Color Matrix||4||Display |- |USB cable ||1||Power supply & download |- |Wire jumper||1||Circuit connection |} ==Documents== IIC Drive Library: Adafruit-LED-Backpack-Library:https://github.com/adafruit/Adafruit-LED-Backpack-Library Graphic Library: Adafruit-GFX-Library:https://github.com/adafruit/Adafruit-GFX-Library '''Notice:If you want to draw pictures, you must copy Adafruit-GFX-Library to libraries of IDE. ''' DHT11 Library: RTC Library: Program Test: ==Debugging== Building Hardware: *Step 1:How to cascade Microduino Double Color Matrix adopts IIC drive. Since each device on an I2C data bus must have a unique address, its important to avoid collisions or you'll get a lot of strange responses from your electronic devices. Luckily, the HT16K33 has 3 address adjust pins (A0, A1, A2), so that the address can be changed. And the HT16K33 driver chip on these LED backpacks has a default I2C address of 0x70. Changing Addresses: Look on the back to find three A0, A1 and A2 solder jumpers. Each one of these is used to hard code in the address. If a jumper is shorted with solder, that sets the address. A0 sets the lowest bit with a value of 1, A1 sets the middle bit with a value of 2 and A2 sets the high bit with a value of 4. The final address is 0x70 + A2 + A1 + A0. So for example if A2 is shorted and A0 is shorted, the address is 0x70 + 4 + 1 = 0x75. If only A1 is shorted, the address is 0x70 + 2 = 0x72. Therefore, the addresses you can set are 0x70, 0X71, 0x72, 0x73, 0x74, 0X75, 0x76, 0x77. The IIC addresses of our example program are 0x70, 0X71, 0x72, 0x73 respectively. How to realize the program: We need to set four special I2C addresses in begin() function, such as ”begin(0x70), begin(0x71), begin(0x72), begin(0x73)”. And we also need to acclaim different objects. eg: “Adafruit_BicolorMatrix matrix1= Adafruit_BicolorMatrix();”. *Step 2:Cascading the boards whose addresses have been changed, and then getting them plugged in order. [[File:DcolorMatrix1.jpg|600px|center|thumb]] *Step 3:Connecting the core modules(Microduino Core+Microduino FT232R+Microduino RTC+Microduino BT) Notice:Each control panel can only have two Microduino modules folded at most. We need to cascade 9,10 adopting soft serial port 9 and 10. [[File:DcolorMatrix2.jpg|600px|center|thumb]] *Step 4:Connection Method of DHT11Sensor Here, we will connect DATA to the D3 pin of Microduino and define it as “#define DHT11PIN 3 //DHT11 PIN 3”. Besides, you can also change pins if necessary. [[File:DHT11.jpg|600px|center|thumb]] *Fold matrix modules & mind pros and cons [[File:DcolorMatrix3.jpg|600px|center|thumb]] Software Debugging: *Step 1:Download libraries needed, decompress them into the folders of IDE libraries. *Step 2:Download the example program and open it. Directly download after successful compiling and choosing right board. [[File:DcolorMatrix4.jpg|600px|center|thumb]] *Step 3:Use phone to switch display interface *Open Bluetooth *Open application, search Bluetooth equipment and connect them. If the connection is successful, you can control the system. Otherwise, you need reconnect. *After the connection, you can control the system by the “button”. You need to long press the button and loose it when the interface switches. After that, it will return to the current time. [[File:DcolorMatrix5.jpg|600px|center|thumb]] [[File:DcolorMatrix6.jpg|600px|center|thumb]] *Principle of Program Realization **Principle of Bluetooth Control By serial port transmitting data, the button of the phone only can send fixed characters when it is pressed. If you loose the button, it will send “0”. If you don’t press the button, the time will be always displayed. **Clock Display By reading RTC time, the time will be displayed in the form of coordinate. The blinking of the second clock can be decided to display or not by judging whether it can be divided exactly by “2” . **Rollover We can see the effect of rollover by changing values of the displayed coordinate or through the function of vosetlcd(“char”, long, color, time). “char”:character string to be displayed long: string length*8 color:text color(LED_RED, LED_GREEN, LED_YEELOW) Time:movement speed **The temperature will be displayed through lcdtemphun(temp,color1,color2,"o","C"); Temp:Temperature color1:Color of the displayed temperature value Color2:Color of temperature symbol *The humidity can be displayed through lcdtemphun(hum,color1,color2,"%"," "); Hum:Humidity color1:Color of the displayed humidity value Color2:Color of humidity symbol ==Result== Through the experiment, we realize the presentation of electronic calendar as well as the detection and display of temperature and humidity. Besides, we can switch the display via Android phone. ==Notice== *IIC address change *DHT11 connection order *Matrix installation direction *Bluetooth serial port connection ==Video== |}
返回至
Microduino Lattice clock
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
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
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息