Introduction
The Notification module in the IoT module can be used to trigger a notification in your Smartphone based on events occurring on your hardware.
All the commands related to triggering a notification are transferred from hardware only. This means that the title name of the notification and text content of notification will be sent from your hardware board only. The module in Smartphone shows you the history of the last notification created on the phone.
The image below shows that a notification is created in smartphones for monitoring the moisture content of plants.
You can see the title of notification is “Plant Monitoring Status” and content states that “The moisture level has gone down. Water your plant and quench its thirst ”.

Arduino IDE Functions
Header
To send Notification, you have to include the following header:
#define CUSTOM_SETTINGS
#define NOTIFICATION_SETTINGS
After defining the above mention headers, you have to include the dabble library:
#include <Dabble.h>
You can download the zip of Arduino Library for
- evive, Uno, Mega, and Nano – Dabble-Arduino
- ESP32 – Dabble-ESP32
depending on the board you are using.
Enabling Bluetooth Communication
To enable Bluetooth communication, you have to initialize serial communication using the following code:
- For evive and Arduino Mega, Uno and Nano
Dabble.begin(Baud_Rate);
Here Baud_Rate is the baud rate set for the Bluetooth module. With evive, you normally get 115200 baud rate modules.
- For ESP32
Dabble.begin("Bluetooth_Name");
In place of Bluetooth_Name enter name that you want to keep for Bluetooth of ESP32. The default name given in the library is “MyEsp32”.
Refreshing the data
To refresh the data that the device has got from the mobile app, you have to use the following line of code:
Dabble.processInput();
This function also changes the state and the brightness of the LED automatically and you don’t have to do anything.
Functions
Following are the function available for this module:
- Notification.clear() – To clear all the previous notifications.
-
Notification.setTitle(titleName) – Enter the title name you want to give to your notification. Remember that at a time you can generate only one topic for notification on the phone. Hence make sure you don’t create multiple titles.
-
Notification.notifyPhone(content) – Write the content of notification.
PictoBlox (Scratch) Blocks
For handling notification, there are two stacked blocks namely “send notification titled () & message ()” and “clear notification“. The “clear notification” block is used for clearing the previous notification from the phone.
The “send notification titled () & message ()” is used to create the title of notification and also its content. As stated earlier that you can create only one notification topic and updating it again and again is possible, hence make sure that notification title is the same for all messages related to that topic.

Examples
evive
In this example, a notification for monitoring the status of touch pins of evive and sending SMS on pressing tactile switch is shown.
Either copy code from below or navigate to “Files>>Dabble>>01.evive>>10.IOT>> Notification in Arduino IDE.
Mega, Uno, and Nano
You can also find below code in Arduino IDE for this navigate to “Files>>Dabble>>01.Uno Nano Mega>>10.IOT>> Notification
In the below example status of the push button is notified in the Smartphone.
ESP32
You can also find below code in Arduino IDE for this navigate to “Files>>DabbleESP32>>10.IOT>> Notification.
In the below example status of the push button is notified in the Smartphone.
evive
In the example below notification for monitoring status of touch pins of evive is shown.
Uno, Mega Nano
For Mega and Nano just changes the head block of the below script.
The script below creates a notification that shows the status of digital pin 13 on phone. Note that here at first all the notifications are cleared using “clear notification” block and then the new notification is created. The title of the notification in each block is the same and only the content is different.