Welcome to the IoT Hackathon Challenge!
If you cannot attend the IoT Hackathon, you can still submit your solution online.
Use your innovative idea for a Bluetooth low energy device. Using WICED Smart SDK you can easily develop a device which performs as a sensor/peripheral, an embedded central, a broadcast or an observer, or can combine any of the these functions. Broadcom will provide you required hardware, SDK and help to speed up your development.
Develop tone client and a tone server applications to run on the WICED Smart evaluation boards. The server should be able to play music based on the notes sent by the client.
Use WICED Smart SDK to create a tone client and a tone server applications to run on the WICED Smart evaluation boards. The server should be able to play music based on the notes sent by the client.
1. Developing Tone Service
a. Use WICED Smart Designer feature of the WICED Smart SDK (File->New->WICED Smart Device Configuration) to create a new tone_server device. The device will need access to a buzzer of the development board.
b. Add a Vendor Specific Service (tone_service) with 2 Vendor Specific writable characteristics Note and Command. The Note characteristic value corresponds to the tone to be played on the buzzer. The Command characteristic is a control point which peer device can use to Start or Stop playing the tone.
c. Add a code from pwm_tones.c sample which supports playing tones on the buzzer.
d. Implement a write_handler so that when peer device writes Start command the server starts playing the tone corresponding to the value of the Note characteristic.
e. Make sure that the device is discoverable while there is no connection.
f. (Bonus) Turn on LED while a tone is being played.
2. Developing Tone Client
a. Use proximity_client WICED Smart SDK as a sample.
b. Start scanning on the startup and connect to any device publishing UUID of the Tone Server.
c. When connection is established perform the GATT discovery to find out the handles for the Note and Command characteristics. (You can cheat and skip this step because handles will be hard coded in the tone_server_db.h created in step 1.a).
d. Using a timer callback play your favorite music using Bluetooth and the buzzer of the tone_server. When it is a time to play a specific note write to the Note characteristic and write the Start command to the Command characteristic. You can use SONG ).
Notes from our Applications Team.
1. The PWM can only modulate one tone at a time -can’t do polyphonic tones
2. So we have to time-slice it with some timers to change the tones every timer event.
3. Hint: If I were doing it, I would have an array of tone, duration, pause duration.
4. And then play in the fine timer.
The trick is:
How to convert standard notes to pwm_start(PWM2, PMU_CLK, 0x2FF, 0x200); from
hack_pwm_tones.c.zip 5.7 K