2017年2月24日星期五

App Inventor and Makers (1): Smart Bathtub

The app that built with App Inventor can control the bathtub to heat and fill water and keep water warm, it can also do all these in specified time.


This works gained special prize in 2016 Guangdong Student Maker Contest!

Arthor: Ye lihao, Liu shiyu and Huanglan. They are all grade 9 students.

Mentors: He wei, Xiangqun Chen


  






User Interface:

Components: 

  • Buttons: BtnHeatON, BtnHeatOFF, BtnWarmON, BtnWarmOFF, BtnWaterON, BthWaterOFF, BtnDisconnect
  • ListPicker: Choose bluetooth address to connect
  • TimePicker: Set timer
  • Three non-visible components: Timer, BluetoothClient, Notifier

Blocks ( In English ):

  • Variables:
data: value sent to arduino board to controll the bathtub
items: items that may controll in specified time
Time_Hour: value hour that set in advance
Time_Minute: value minute that set in advance
ifSent: if the value is 0, the data has not been sent, otherwise if the value is 1, the data has been sent former.
  • Connect & Disconnect:
    When click connect, choose a bluetooth address from address list.
    When click disconnect, disconnect bluetooth.
  • Send data
Send specified value to arduino board when you click different buttons.
  • Set timer:
Choose one item to make it work in time, then send the data to Arduino board
 

Then set a specified time:
Timer starts to work:
 If the time hits setting, send variable data to Arduino board.

Blocks ( In Chinese )



































2 条评论: