Prac9 IoT
Prac9 IoT
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