We are continuing with our wireless subseries with the 100 projects in 100 days. Last week we showcased a number of examples using the XBee wireless modules. Yesterday we gave you an example on how to connect your Pioneer kit to a WiFi network. Today we will showcase how to interface with your Pioneer kit using Bluetooth.
Today’s project is designed to control the On/Off status of an appliance using Bluetooth. The user is required to have an Android Phone with Bluetooth capabilities through which one can send commands using the Bluetooth SPP Application. This App sends the command to the Bluetooth Shield on PSoC4 which then controls the relays on the Relay Shield. The appliance then turns on or off according to the relay position.
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Zip File of Images
- Project Schematic
- Component Configurations
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- Logic Low ‘0’
The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.
The main.c firmware is included in the example project. Please review the commented sections for more details.
If you need any additional information on the shields that we are using today please take a moment to review the following web pages:
This example also uses the Bluetooth SPP app for Android phones. This app is available for Android phones only, and can be found at the following link:
Once the user has configured the Bluetooth connection they will be able to use the Bluetooth SSP application to control the Pioneer kit. In the header section of the main.c file you see the defined commands that can be sent to the Pioneer kit. These are the values that the user can enter into the SPP application to either turn on or off the appliance (Light). This example supports up to four applications being controlled from a cell phone.
For this example you will need to have both the Relay and Bluetooth Shields. We will first insert the Bluetooth Shield into the Pioneer kit. On the top of the Bluetooth Shield are headers that will allow us to then insert the Relay Shield. Here we’ve ‘stacked’ the Arduino shields allowing us to use both the Bluetooth and Relay capabilities.
Now that the shield boards are connected to the Pioneer kit we then need to connect the Relay shield to the power supply and then to our light bulb setup.
Test Your Project:
Program the Pioneer kit, start the SPP application and then begin to send command controls to the Pioneer kit using the pre-defined values.
I hope this example can help you in your design.