查看“Local Weather Station”的源代码
←
Local Weather Station
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| Local Weather Station }} {| style="width: 800px;" |- | ==Objective== To detect environment via a temperature & humidity sensor and light-sensitve senor, then display the data on OLED. Users can build a weather station and give yourself a real experiment of the "nature" around you. ==Principle== ==Equipment== {|class="wikitable" |- |Module||Number||Function |- |[[Microduino-CoreUSB]]||1||Core board |- |[[Microduino-Sensorhub]]||1||Sensor pin board |- | [[Microduino-BM]]||1||Battery management |- | [[Microduino-OLED]]||1||Display |- | [[Microduino-DUO-V]]||1||Extension board |- | [[Microduino-Temp&Hum]]||1||Temperature and humidity sensor |- | [[Microduino-Light]]||1||Light-sensitive sensor |} *Other Equipment: **A battery [[File: Local_weather_station.jpg|600px|center|thumb]] ==Hardware Buildup == *Setup 1:Connect CoreUSB to the computer, open program examples, select the right board and serial port and then download the program. *Setup 2:Stack all modules and use DUO-V as the extension board. Sensorhub and OLED can be only stacked on the top. [[File: Local_weather_station_setup_1.jpg|600px|center|thumb]] *Setup3:Connect temp&hum sensor to Sensorhub's A4 and A5 pins and the light-sensitive sensor to A0. [[file:Microduino-sensorhub_rule.JPG|thumb|800px|center]] [[file: Local_weather_station_setup_2.jpg |thumb|800px|center]] *Setup4:Connect the battery to BM. [[file: Local_weather_station_bm.JPG|thumb|800px|center]] ==Software Debugging== *Function Description: **" oled.h " controls the file displaying environment data. **" weather.h " File of environment data acquired by the sensors. *Calculate temp&hum and light values <source lang="cpp"> am2321.read(); sensor_tem = am2321.temperature / 10.0; sensor_hum = am2321.humidity / 10.0; sensor_light = map(analogRead(A0), 0, 1023, 0, 255); </source> *The led light on OLED goes on when temperature is above a certain value. <source lang="cpp"> if (sensor_tem > 30) { s_data = 1; digitalWrite(ledPin, HIGH); } else { s_data = 0; digitalWrite(ledPin, LOW); } </source> ==Result== Sensors can acquire temperature, humidity and light intensity data from the environment and display them on OLED. By changing the environment around you, you'll find corresponding change on the screen. For this project, you can get a beautiful shell with LEGO boards which can be easily stacked with mCookie. ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Local Weather Station
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
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
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息