The following article goes over an example project for a job fair where the Silicon Labs Budapest participated.
The goal of this project was to create an interactive and fun Demo that would catch the attention of the public while being simple and using our hardware. A Theremin accomplishes this by being fun to play with and loud to catch people's attention while showing the capabilities of our wireless and sensor kits.
The theremin will be composed of an EFR32MG12(BRD4162A) and a Si1133/Si115x Optical Sensors Expansion Board(BRD8009A). The sound is played in a mobile phone or a tablet using the MIDI over BLE service.
The following image illustrates the setup:
User guide for the Optical sensor board: UG163: Si1133/Si115x Optical Sensor Evaluation Board Rev 3.0 User's Guide Optical Programmer's Toolkit: Si115x_PGM_Toolkit.exe This toolkit is useful for looking at the demos and for evaluating how the part would behave in a real product. We urge customers to add their own overlays or optics to this board and then use this application to see what kind of optical signal their system would see.
The sensor board communicates to the EFR32 via I2C using the Expansion connector
BRD4162A contains an EFR32MG12, it is used in SoC mode as peripheral device advertising to create an application that will parse the data receive from the sensor board to the Midi protocol.
The EFR32 will transmit said data to a connected device using the Midi over BLE protocol. To add this functionality the [KBA_BT_0911: Midi over BLE] (https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2019/06/19/kba_bt_0911_midioverble-ZvKw) was used.
Depending on the mobile device used (Android or iOS), an app needs to be downloaded to receive the Midi data in your device. iOS: KORG Module free version app can be used. Android: MIDI BLE Connect app. This app will allow to connect to BLE Midi devices and after connecting the device can be used with any app that supports midi.
In the case of android device a midi output app is needed. FluidSynth MIDI Synthesizer was used in this project, to either output to the phone speaker or to an external one via the headphone jack. For iOS devices the KORG app handles the BLE connection and the midi output.
Create a soc-empty example from the SDK example projects.
Copy the files attached in the project root folder and overwrite the existing files.
From the Gatt configurator import the gatt.xml file that was copied into the project root folder.
Copy \developer\sdks\gecko_sdk_suite\v\platform\emdrv\gpiointerrupt\src\gpiointerrupt.c to the soc-empty project
Build and flash
Connect to your device using a Smartphone/Tablet: *Android: download MIDI BLE Connect app and FluidSynth MIDI Synthesizer app. Connect with MIDI BLE connect and open FluidSynth MIDI Synthesizer and select the device. *iOS: download KORG module and connect via the BLE midi menu.
Play with your hands over the sensor.