250 likes | 261 Views
Use the Greenhouse Web Control App Inventor 2 to design your app's UI, program behavior, and integrate sensors and equipment for your greenhouse. Learn how to read and display sensor data from Firebase in real time.
E N D
Open your browser URL: http://demo.juice-soft.com/letin/greenhouse/index.php/User/login Login:
APP Inventor 2 Greenhouse
GUI Introduction Designer Editor Block Editor
GUI - Designer Editor Design the App's User Interface by arranging both on- and off-screen components.
GUI - Block Editor Program the app's behavior by putting blocks together.
Greenhouse Architecture Sensors: Temperature Sensor Air Humidity Sensor Air Pressure Sensor CO2 Sensor Soil Humidity Sensor
Greenhouse Architecture Equipments FAN (left) FAN (right) Water pump Plant growing light
Greenhouse Architecture What is Firebase? It provides a realtime database and backend as a service. It allows application data to be synchronized across clients and stored on Firebase's cloud
Greenhouse Architecture What is stored on Firebase? Data from sensors: Temperature Sensor Air Humidity Sensor Air Pressure Sensor CO2 Sensor Soil Humidity Sensor
Open your browser URL: http://ai2.appinventor.mit.edu/ Login:
Add Firebase components AIzaSyBgaoO02jrjU59n-EAdF4O7tQqcQ4z51r4 https://ccckyc0.firebaseio.com/ GDHSE-CCCKYC-001 or GDHSE-CCCKYC-002 or GDHSE-CCCKYC-003 or GDHSE-CCCKYC-004
Read sensors’ value Add an image for air temperature you like Rename it to “lb_airTemp”
Read sensors’ value Change to Blocks Editor
Read sensors’ value (1) Add the following blocks for reading air temperature value:
Read sensors’ value (1) Connect your mobile phone to App Inventor using AI Companion to see what happen?
Read sensors’ value Read more sensors’ value. Now, your’s turn
Add auto refresh Auto refresh the sensors’ readings after 1 seconds 1000
Add auto refresh Add the following blocks
Add auto refresh (1) Connect your mobile phone to App Inventor using AI Companion to see what happen?