This article will cover the interfacing of a microphone sensor. Depending on the sensor you buy the header pins may have to be soldered in.
To interface this sensor you will need :
- A BreadBoard Block
- A WIFI Block
- A PowerStation Block
Configuring the BreadBoard Block pins:
We will first configure the breadboard block pins in the Kitsunei Creator.
First put the BreadBoard Block into your workspace and open its properties panel.
From the properties panel select the Custom Settings drop down menu and select the Visual Map button.
A window will pop up to allow you to configure your pins. Use the images below as a guide to configure the three pins for the microphone sensor. Do this by selecting the corresponding pin configuration from the drop down menu and pressing save between pins.
IO3 - VCC | IO2 - GND | IO1 - AnalogIn |
Once the pins are configured you may close out of the pop up window and connect up your sensor. The sensor PCB has each of the pins labelled. Use this as a reference to connect it up to the BreadBoard Block.
Go back to the properties panel and change the sampling rate to 100.
Save all the changes in the properties panel by clicking on the save button.
Receiving data in the logic maker:
To start receiving data use an INPUT Gate connected to a DISPLAY Gate.
From the drop down menu on the INPUT Gate select IO1. Hit apply and your readings from the microphone will start showing
Plotting data in the Dashboard:
To visually see the data, select the Dashboard from the top menu.
Click on the bottom right hand corner and select the Data Graph Widget option.
Hover over the Data Graph widget and select the gear icon that pops up. This will open the properties panel for the Data Graph widget.
Select IO1 from the drop down menu and press the Add button.
Readings from the microphone should now start showing on the widget.