找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1235|回复: 0

Plant manager exploited by Arduino&Bluetooth&App inventor2

[复制链接]

65

主题

214

帖子

1358

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1358
发表于 2016-5-27 23:55:40 | 显示全部楼层 |阅读模式
Using Arduino、Bluetooth and App inventor2 to exploit plant manager.
QQ截图20160527235833.png
Hardware needed:
Arduino Uno
Bluetooth module
Soil Humidity Sensor
QQ截图20160527235727.png
Principles:
By using Soil Humidity Sensor to determine whether plants need to be watered or not,then Bluetooth will send some data to mobile apps. While receiving the data, the mobile phone will make a reaction such as vibration so that we can water our plants timely and make our plants grow well.

Screenshots from designing pages:
Screenshots from designing pages.png

Blocks:
blocks.png
Arduino code:
  1. Int Sensor= 2;//传感器端口
  2. void setup() {
  3.    Serial.begin(9600);
  4.    PinMode(Sensor, INPUT);
  5. }
  6. void loop() {
  7.   int a=Serial.read();
  8.   if(a==49){
  9.    int SensorState = digital Read(Sensor);
  10. Serial.Printing (SensorState);
  11.    delay(500);
  12.   }
  13. }
复制代码







您需要登录后才可以回帖 登录 | 立即注册

本版积分规则