言語切り替え

Try to express Birthday Balloon on Twitter

Try to Express Birthday Balloon on Twitter

Make things

When it’s your birthday scheduled on Google Calendar, real balloons will fly.

When it’s your birthday, you can see balloons in your profile page on Twitter. I tried to express this “Birthday Balloon.” I used Google Calender’s date because there is, unfortunately, no Twitter API to get someone’s birthday.

Materials

How to make

Body

Prepare balloons, a box for balloons, and an image taken after the profile page on Twitter.

an image taken after the Twitter profile

Put threads to balloons and make a device to wind up the threads. This device is composed of disposable chopsticks, 3D printed parts, and a tire wheel part in AI Robot Kit which can combine a DC Motor with.

3D printed parts

Additionally, make a box to fix the device behind the display monitor using a cardboard box.

 This will work like the below video.

Hardware connection

Connect parts to an obniz Board like the table and the image below by referring to DC Motor Library. Please adjust the orientation of DC Motor appropriately.

obniz DC Motor
0 OUT1
1 OUT2

Software

When it is your birthday, which you registered on Google Calendar, IFTTT call webhook to trigger obniz Event. (To make the system, Webhook IFTTT Integration | obniz is really helpful.)

First, save below “Program” to your repository and make obniz Event to run the program. “WebApp to run” is the program. You need to take a note of the “Endpoint” URL.

Second, make IFTTT Applet call webhook to trigger the event. Fill in entry fields as shown in the image below.

Finally, register your birthday on Google Calendar. you have to include “誕生日” character string.

When it is your birthday, real balloons will fly along the side of the display that looks like the Twitter profile.

The program judges the contents of Webhook call at this part of if statements and rotates the DC Motor. It judges if Body of posted webhook call is {"birthday":true} or not.

if (typeof req === "object") {
  if (req.body.birthday) {
    ...
  }
}

Please rewrite const WINDING_TIME = 7000; (code.js line2) and motor.power(48); (code.js line6) appropriately. 

Program