How to Work with Bluetooth and Dabble in PictoBlox

About This Tutorial
This tutorial discusses what is Bluetooth, how does it work, the HC05 Bluetooth module, Dabble, and how to use them in PictoBlox with the help of a sample program in Upload mode.
Tutorial Info

Components Required

ImageComponentQuantityAvailable in Kit
evive1
USB A-B Cable1
HC05 Bluetooth Module1

Introduction

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-meter 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.

HC05

evive has dedicated Bluetooth (HC05) headers which requires you to just connect the HC05 Bluetooth module.

How to Control the HC-05 Module Using a Smartphone

Dabble

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.

evive Notes Icon
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:

  1. Switch ON your evive and connect the HC-05 Bluetooth module in the headers provided. 
    evive Alert
    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.

     

  2. Open Dabble in your phone.
  3. 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.Dabble - 1
  4. The app will ask for permission to turn Bluetooth ON. Click on Allow to grant the same.Dabble 2
  5. After selecting Allow, the following dialogue box will appear on the screen. Select skip for now.Dabble 3
  6. Next, select the device you want to pair Dabble with.Dabble 4
  7. After you select the device, the following message will appear in the bottom of the screen.Dabble 5
  8. 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.Dabble 6

Activity 1: Controlling evive’s Pin 13 LED using Dabble’s Gamepad Module

Scratch Script

Follow the steps below to write the script:

evive Notes Icon
If you’re working with evive in Arduino mode for the first time, have a look at the procedure HERE.
  1. Connect evive to your computer and open PictoBlox; if already open and working on a project, save that project. Then, click on New.
  2. Go to the toolbar and click on the Board menu. Then select evive as your board. Pictoblox Board Selection
  3. Next, click on the Connect menu and from the fly-out menu, select the Port to which evive is connected e.g. COMXX or ttyXX.Once you select the port, the icon beside the Connect tab will become connected.Connect-Disconnect Icon
  4. Go to the evive palette and drag and drop the when evive starts up block in the scripting area.
  5. Next, go to the  Control palette and drag and drop the forever block below the when evive starts up block.
  6. From the Control palette, drag and drop the if-else block inside the forever block.
  7. Now, to work with Dabble, you need to add a new palette/extension from the extension library. Click on the purple button in the bottom-left corner of the window and add the Dabble extension. Now from this extension, drag and drop the is () pressed on gamepad? block inside the diamond-shaped space of the if-else block. From the drop-down menu select up, where right signifies the up button of the gamepad in digital mode.is up pressed on gamepad
  8. From the evive palette, drag and drop the set digital pin () output as () block below the if arm of the if-else block. Pin 13 and HIGH are the default pin and output value respectively.
  9. Drag and drop another set digital pin () output as () block below the else arm of the if-else block and set the output as LOW.
  10. Switch to Upload mode and upload the script to evive.

Below is the complete script:

Working with Bluetooth and Dabble in PictoBlox

Activity 2: Controlling Arduino Uno’s Pin 13 using Dabble’s Gamepad Module

Scratch Script

  1. Connect the board to your computer and open PictoBlox; if already open and working on a project, save that project. Then, click on New.
  2. Go to the toolbar and click on the Board menu. Then select Arduino Uno as your board.Arduino Uno select 
  3. Next, click on the Connect menu and from the fly-out menu, select the Port to which evive is connected e.g. COMXX or ttyXX.Once you select the port, the icon beside the Connect tab will become connected.Connect-Disconnect Icon
  4. Go to the Arduino Uno palette and drag and drop the when Arduino Uno starts up block in the scripting area.
  5. Now, to work with Dabble, you need to add a new palette/extension from the extension library. Click on the purple button in the bottom-left corner of the window and add the Dabble extension. From this palette, drag and drop the set bluetooth baud rate to () block and set the baud rate to 9600.
  6. Next, go to the  Control palette and drag and drop the forever block below the set bluetooth baud rate to () block.
  7. From the Control palette, drag and drop the if-else block inside the forever block.
  8. Go to the Dabble palette and drag and drop the is () pressed on gamepad? block inside the diamond-shaped space of the if-else block. From the drop-down menu select up, where right signifies the up button of the gamepad in digital mode.
  9. From the Arduino Uno palette, drag and drop the set digital pin () output as () block below the if arm of the if-else block. Pin 13 and HIGH are the default pin and output value respectively.
  10. Drag and drop another set digital pin () output as () block below the else arm of the if-else block and set the output as LOW.
  11. Switch to Upload mode and upload the script to Arduino.

Below is the complete script.

Working with Bluetooth and Dabble in PictoBlox_ArduinoUno

Conclusion

It this tutorial, you learned how to work with Bluetooth and Dabble in PictoBlox using evive and Arduino Uno.

Hope you had fun! 🙂

This helped
This didn't help
Share this Tutorial
Share on facebook
Facebook
Share on twitter
Twitter
Share on google
Google+
Share on pinterest
Pinterest
Share on reddit
Reddit
Share on print
Print
Related Projects & Tutorials
All articles loaded
No more articles to load
Featured Projects
DIY Pinball Game Machine
IntroductionAnd we’re back to make your weekend merrier with another one of the most popular…
Arcade-Basketball-Game
DIY Arcade Basketball Game
Introduction“We don’t stop playing because we grow old; we grow old because we stop playing.”…
All articles loaded
No more articles to load
Close Menu
×

Cart