Bluetooth is a form of short-range, low power wireless communication that allows devices such as Smartphones, laptops and other devices to transmit and receive data wirelessly over a short distance. The purpose of using Bluetooth is to replace cables that connect devices while keeping the communication between them safe and secure.
Bluetooth was invented by the telecoms vendor Ericsson in 1994 It uses the same 2.4GHz frequency as some other wireless technologies, such as cordless phones and WiFi routers. It creates a 10-metre radius wireless network, known as a personal area network (PAN) or piconet, which can network between two and eight devices. This short-range network allows you to send a page to your printer which might be in a different room than yours.
The HC-05 Bluetooth Module
The HC-05 module is an easy-to-use Bluetooth SPP (Serial Port Protocol) module, designed for transparent wireless serial connection setup. Serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with complete 2.4GHz radio transceiver and baseband.
evive has dedicated Bluetooth (HC05) headers which requires you to just connect the HC05 Bluetooth module.
How to control the HC-05 module using Smartphone
You can connect the HC-05 Bluetooth module to your Smartphone and control it using your Smartphone with the help of the Dabble, a project-making mobile application. You can install it on your phone from Google Play.
As of now, Dabble is compatible only with Android Smartphones. The iOS App is under development and will be launched soon.
Pairing the HC-05 module with Dabble
Follow the steps below to pair the HC-05 Bluetooth module with the evive Gamepad App:
- Switch ON your evive and connect the HC-05 Bluetooth module in the headers provided.
Make sure that the RX pin of the Bluetooth module is connected to the TX3V3 pin on evive. As soon as you connect it, a red LED will start blinking
on the module.
- Open Dabble in your phone.
- Once you open the app, in the top-right corner, you will see a connect-disconnect icon (it will be in the disconnected). Click on it.
- The app will ask for permission to turn Bluetooth ON. Click on Allow to grant the same.
- After selecting Allow, the following dialogue box will appear on the screen. Select skip for now.
- Next, select the device you want to pair Dabble with.
- After you select the device, the following message will appear in the bottom of the screen.
- Once the device is paired with Dabble, the connect-disconnect icon will be connected and Dabble’s icon will appear in the top-left corner.
Follow the steps below to write the script:
If you’re working with evive in Arduino mode for the first time, check the procedure out here
- Connect evive to your laptop/PC, and select the appropriate port.
- Open mBlock; if already open and working on a project, save that project. Then, click on New.
- Go to the Robots palette and drag and drop the evive Program block in the scripting area from the evive Inbuilt Tools extension.
- Drag and drop Fill screen with () colour block from the evive TFT Display extension below the evive Program block, and select any colour of your choice from the drop-down menu.
- From the evive App extension drag and drop the Set baud rate to () block, and select 115200 from the drop-down menu.
- Drag and drop the Set text size as () block from the evive TFT Display extension below Set baud rate to () block. Set the size as 2.
- Next, go to the Control palette and drag and attach the forever block below the evive Program block.
- Go back to the Robots palette and drag and drop the Set cursor at ()() block inside the forever block from the evive TFT Display extension; set the coordinates as 10,10.
- From the Control palette, drag and drop the if-else block below the Set cursor at ()() block.
- Go to the Robots palette and drag and drop the Is () pressed? block inside the diamond shaped space of the if-else block. From the drop-down menu select Right, where right signifies the right button in the evive Gamepad App.
- From the Arduino extension drag and drop the Set digital pin () output as () block below the if arm of the if-else block, and select Pin_13_LED and HIGH from the two drop-down menus.
- Next, drag and drop the Write () block from the evive TFT Display extension below the Set digital pin () output as () block and write LED ON in the space.
- From the Arduino extension drag and drop the Set digital pin () output as () block below the if arm of the if-else block, and select Pin_13_LED and LOW from the two drop-down menus.
- Drag and drop the Write () block from the evive TFT Display extension below the Set digital pin () output as () block and write LED OFF in the space.
- Switch to Arduino mode and upload the script to evive.
Below is the complete script:
This didn't help