Back to Parent

Outcome


Project: Happy Birthday Song Receiver / Sender 

Objective: Create a connected system with three Particle Argon devices such that each device can send a signal to play 'Happy Birthday' on the other two devices. 


Team: Youngjoo Lee, Ziyu Han, Hongyu Mao

Process

We began by writing a Happy Birthday song function to play on a Piezo. 

Once we tested that this played the song properly on our individual devices, we used Particle's Publish/Subscribe feature to connect the devices. Each device publishes an event with a unique name when the button on that device is pressed. Each device is also subscribed to the other two devices' events so that when one device's button is pressed, the two remaining devices starts to play the song. 

Issues

  • We ran into an issue with the subscribe feature initially. Although each device was subscribed to the other event names, it would not pick up when other devices published an event of that name. We tried to debug the code, but nothing seemed to be an issue there. We realized it was because we did not use the Echo Relay. 
  • Once we used it, it also did not work. Then, we realized our second mistake: we did not add the Access Token of our own devices when using the Echo Relay tool - we only added each others'. After we fixed this, the connected system worked as expected. 
  • Lastly, when we tested the audio, the volume from the piezo was too small. We crafted a handmade paper amplifier to increase the volume a bit. 
Show Advanced Options

Figure 1. Wiring of piezo and button onto Argon

Img 0425.thumb
Show Advanced Options
Figure 2. Two of Connected Devices (with Amplifier)
Img 0424.thumb
Show Advanced Options

Video: Connected Devices Interaction

Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.