BabySitter Help Box

by slavineden in Teachers > University+

385 Views, 0 Favorites, 0 Comments

BabySitter Help Box

screenshot.png
IOT - Final Project (Eden & Ido)

In those days babysitter is definitely a necessary thing, but have you ever wondered what a babysitter needs? What can help her with the kids? How can the work of the babysitter be upgraded so that everyone will be satisfied, the children, the babysitter, and the parents?

We thought of an idea to create a digi-physical help box that would bring all these requirements together - the babysitter help box! how exactly does it work and what does the product include? go on with us to the next steps and you will learn with us about the product and how to create it for you,

Before you jump to the next steps come to see our video that shows you our product :)

Very excited Ido and Eden :)

All the Equipment and the Goal of the Product

Blynk.jpeg
step1.1.jpeg
step1.2.jpeg
step1.jpeg

The aim of the project is to create features that help the babysitter at any stage of the day from the morning when she needs to wake up the children, help with turning on and monitoring the TV time, sports time combined with games, learning time combined with games, and full monitoring for parents whether it is on TV time or when and if the child took his pills that he needs. Allowing the parents to be regularly updated on what is gתoing on at home.

What exactly does each feature include you will learn in the following steps, each step includes explanations of how to write and build the feature, and we add a video example of how the feature works.

Required equipment: Computer, CPX board, USB cable, 3 crocodile cables, a user in integromat, a user in Blynk.

Connecting and Installing the ESP8266 - the chip we chose to connect the CPX to the network :)

  1. Check the version of the already installed firmware on your ESP:
  2. Open the ‘ESP8266Console’ sketch (on your Arduino IDE).
  3. Run the sketch and open the serial monitor (crtl + shift + M).
  4. Type at the serial monitor ‘AR+RST’ and send it to the board.
  5. The reset will be followed by a message containing the firmware version:
  6. If the version of your ESP isn’t matching the one above:
  7. Connect your ESP to a computer using a USB cable.
  8. Download and install ‘ESP8266 Download Tool’ and burn the up-to-date firmware.
  9. You may download the latest firmware from here - http://bit.ly/esp-firmware-174
  10. Choose the first option in the photo ESP8266 DownloadTool.
  11. Choose the file you downloaded on the first row then press start (you can see in the photo example).
  12. congrats!

Writing the First Feature Wakeup Call

WakeUpCall.jpeg
code-f1.jpeg
code - f1.1.png


The purpose of the feature: to pleasantly (but surely) wake the children in the morning when the light in the room is turned on by the babysitter.

When the light is ON the CPX board will start soothing colors and sound (as a cool alarm clock) .

If the children didn't wake up, the rhythm of the melody can be changed (a little annoyingly) by changing the light that is being read by the CPX light sensor to draw their attention to the awakening.

How do you build this feature?

1. In your blynk user create a new device, in your blynk device create a new button - V2 and call him "wakeupCall" and a datastream with pin V2, type Integer, number of min 0, and number of max 2.

2. In our code we chose the right light level that was checked for the specific room (you probably want to do this in your room too), to make sure when the babysitter turns on the light, the CPX starts the music and the lights.

3. After the light turns on, we control the light color, we chose blue and white (choose the colors that you like :)) and we set the led light color by the blue and white variables.

4. Write your code and put it in a separately run() function and put it in the switch case in the loop() function.

Now you have the wakeUp feature !! :)


Writing the Second Feature TV Time

startTVTime.jpeg
code - f2.png
code - f2tv.jpeg
Schedule Time.png

The purpose of the feature: to turn on the TV and the AC  (if needed) by the blynk device and send an update in the google sheet when the kids start to watch TV, to update the parents.

When the babysitter turns on the TVTime button, the TV turns on, and by the scenario in the integromat, the parents get the update on the google sheet.

How do we build this feature?

1. In your blynk device that you opened, create a new button - V0 and call him "startTVTime", create a datastream with pin V0 of type Integer, number of min set on 0, and number of max set on 1.

Also for the connection to the integromat create another button with a type string that will use by the Blynk.virtualWrite() function.

2. First write a turnOnTV function that will use the irSend()

Function, in order to control the TV and AC using IR (you will need to change the frequency according to your devices).

4. Write your code and put it in the switch case in the loop() function.

5. Connect between the blynk and integromat using virtualWrite().

Now you have the StartTVTime feature !! :)



Writing the Third Feature Sport Time

sportTime.jpeg
code - f3.1.png
code - f3.png

We think that the babysitter needs to give value to the kids like a healthy lifestyle and teach them new things.

For that, we thought about the next 2 features - sports time and study time.

The purpose of those features: to give the kids an hour that they move and do indoor sport. How do we do that? with a game! kids love games so we thought that they would like to do sport if it will combine a game.

When the babysitter turns on the button SportTime (on the blynk device) the kids can be the runner in the game because we made the keyboard be controlled from the CPX by capacitance sensors.

How do we build this feature?

1. In your blynk device that you opened, create a new button - V3 and call him "sportTime" and a datastream with pin V3, type Integer, number of min 0, and number of max 3.

2. Choose the game that you want to play with the kids, we chose this game (if you chose another one you might wanna adjust the controlled keys accordingly).

3. For this step, you will need the CPX and the 3 crocodile cables.

4. Write your code that changes the right buttons from the keyboard to be controlled from the CPX, you can see our code in the photos, the purpose is each button in the game will be controlled by the user from the CPX to the game. You can choose as many buttons as you want.

5. We add to the game a cheat mode, a mode that can help you win the game in a fast (and easy) way (help the kids to win from time to time if you want).

6. Write your code and put it in the switch case in the loop() function.

Now you have the SportTime feature !! :)



Writing the Fourth Feature Study Time

studyTime5.jpeg
code - f4.1.png
code - f4.png
code - f4.2.jpeg
studyTime1.jpeg
studyTime2.jpeg
studyTime3.jpeg
studyTime4.jpeg

The purpose of the feature: to give the kids an hour that they study new things (in this case - colors), we decide to learn the kids the RGB colors, and the mix that they can create from the RGB colors, just like a screen pixel.

How does it work? The kids play from the blynk device, in the device, we added 3 buttons - green, red, blue. The kids select the color that they want and they can see what the mix makes in the LEDs in the CPX, sound amazing?! Let me teach you how to do this!

When the babysitter turns on the StudyTime button, the kids can choose any kind of colors buttons and see what the LEDs color in the CPX.

How do we build this feature?

1. In your blynk device that you opened, create a new button - V4 and call him "studyTime" and a datastream with pin V4, type Integer, number of min 0, and number of max 4.

2. Create 3 buttons in the device, Green(V5), Red(V6), Blue(V7). For each button create a datastream with the same number of pins from the button, type Integer, number of min 0, and number of max 255.

3. Add a win mode button, when the kids win you can select the button and in the CPX the kids will see rainbow colors. create a new button - V8 and call him "winMode" and a datastream with pin V8, type Integer, number of min 0, and number of max 1.

4. Write your code in a run() function, in your code for each color, pin in the device connected to the CPX and control the LEDs like that when the kids select a button he will see it in the CPX LEDs. (you can see an example in our code photo). In order to change the light color on the CPX, we used the virtualRead() function as you can see in the pictures attached.

5. Write your code and put it in the switch case in the loop() function.

Now you have the StudyTime feature !! :)



Writing the Fifth Feature Pill Time

integromat.png
code - pillTime.jpeg
code - pillTime1.jpeg

The purpose of the feature: the kids need to take an important pill a few times a day. For that, we made a feature that updates the parents in the google sheet when the kids take the pill and how many times.

How do we build this feature?

We used an integromat webhook triggered by a CPX button press, to document the times when the child took his pill. This way, each time the child takes his pill the babysitter will press the button and a blynk.virtualWrite() function will trigger the integromat’s webhook to fill the google sheet that is shared with the parents.

In our case, press the button, change the scenarioNumber variable to 5, and write the code in the main loop() function with the switch case.

For use in the integromat, you need to use the virtual pin on the typed string as in step 3 (V1).

We use the same scenario as in step 3 in the integromat, but now we have 2 options so we use the filter option to spread between the two.

Now you have the PillTime feature !! :)


CONGRATULATION!!! - YOU FINISH TO BUILD BY YOURSELF THE BABYSITTER HELP BOX !!