0% found this document useful (0 votes)
30 views3 pages

Prac9 IoT

The document discusses using a Dabble app and HC-05 Bluetooth module to control a bulb remotely. It explains the components, including the HC-05 module which has modes and pins, and provides code to get the status of a bulb using Dabble and send it over serial.

Uploaded by

livphenomenal1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Prac9 IoT

The document discusses using a Dabble app and HC-05 Bluetooth module to control a bulb remotely. It explains the components, including the HC-05 module which has modes and pins, and provides code to get the status of a bulb using Dabble and send it over serial.

Uploaded by

livphenomenal1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Practical – 9

Aim – Write a program to get the status of bulb at remote place


 Theory
DABBLE
Dabble is a Smartphone app that offers modules to control hardware via Bluetooth, access
Smartphone sensors like proximity, GPS, and accelerometer, and communicate with it.

Advantages of Dabble
1. Virtual I/O Device: Lets you control hardware via Smartphone and access its
inbuilt sensors.
2. Simplified Project-Making: Includes most of the functionalities that render
DIY projects easy yet ‘edutaining’.
3. Software Compatibility: Easily programmable with both Scratch and Arduino
thus making it suitable for everyone.
4. Light on Pocket: Nothing else required if you already have a board and a Bluetooth
module.

HC – 05
HC-05 is a Bluetooth module which is designed for wireless communication. This module can
be used in a master or slave configuration.

It has 6 pins,
1. Key/EN: It is used to bring Bluetooth module in AT commands mode. If Key/EN pin is
set to high, then this module will work in command mode. Otherwise by default it is in data
mode. The default baud rate of HC-05 in command mode is 38400bps and 9600 in data
mode.
HC-05 module has two modes,
1. Data mode: Exchange of data between devices.
2. Command mode: It uses AT commands which are used to change setting of HC-
05. To send these commands to module serial (USART) port is used.
2. VCC: Connect 5 V or 3.3 V to this Pin.
3. GND: Ground Pin of module.

Kartikey Malhotra
20815003121
4. TXD: Transmit Serial data (wirelessly received data by Bluetooth module transmitted out
serially on TXD pin)
5. RXD: Receive data serially (received data will be transmitted wirelessly by Bluetooth
module).
6. State: It tells whether module is connected or not.

 Hardware/software requirements

 Schematic diagram

 Code
#define CUSTOM_SETTINGS
#define INCLUDE_LEDCONTROL_MODULE
#include <evive.h>
#include <Dabble.h>

void setup() {
Serial.begin(9600);
Dabble.begin(9600);
}

void loop() {
Dabble.processInput();
Serial.print("Led:");

Kartikey Malhotra
20815003121
Serial.print(LedControl.getpinNumber());
Serial.print('\t');
Serial.print("State:");
Serial.print(LedControl.getpinState());
Serial.print('\t');
Serial.print("Brightness:");
Serial.println(LedControl.readBrightness());
}

 Output

Kartikey Malhotra
20815003121

You might also like