Free Arduino Google Cloud Messaging (GCM) project. It’s simple way to get live message from Arduino board to your Android device - anywhere & anytime!

This project allows to receive messages from Arduino Mega 2560 controller board to custom device, based on Android, through GCM service or user e-mail. Also in android application you may see device input port status and temperature, set up output port position and other parameters. Internet of Things (IoT) technology.

For this, you will need:

  • Arduino Mega 2560 controller board
  • Ethernet module: Arduino Ethernet Shield or ENC28J60 Ethernet module or Wi-Fi module based on ESP8266 chip
  • Ability to appload on controller board the sketch from repository
  • Device, operated by Android, for example, your smartphone
  • Download and install the app for Android NotifyDuino.apk

Project description and work scheme

The hardware includes controller Arduino Mega 2560 with external ethernet module and optionally up to 2 DS18B20 temperature sensors or similar. The software - sketch for controller, server to implement controller interacting with GCM service and custom Android application, written in Java.

When changing the logic state of one of four input controller ports or when changing temperature out of valid range, on external event server is sent a command, the server via GCM service sends a caution message to custom Android device or user e-mail. Through Android app, user can configure network parameters of device, permissible operating temperature range for each sensor, input signals logic level at which the notification happen, manage logic level of one of controller port or reload the device.

Possible application: overall where it’s necessary to control temperature or inputs controller state, monitor the current states of external devices, sending notifications of dangerous emergency situations, break-ins, remote load control. Since the controller code is open, you can independently add needed functions.

The current scheme of interaction of all project elements is shown below


  1. Android app in the first start passes registration in GCM server and receives from it GCS registration token.
    Note: Registration is only possible if your Android device supports Google Services and set Internet connection.
  2. Register you device with unique serial number through application on Event server. This server is located at (personal!)
  3. Device communicate with android application through Event server. In application you may see current status on device and set up settings.
    Note: For normal operation on device should be properly configured network settings.
  4. With occurrence the event on device, it will send data packet to event server, in packet is stored device serial number, notification type and message. After receiving notice from device, the vent server will send a message with events description on GCM server, which will send a message to Android app and/or user e-mail, specified in settings.


You can download this project on GitHub

App for Android device, you can download here NotifyDuino.apk
Supported Android 4.0 and higher

If you want to set own event server on your side, contact us:


For device assembling, you will need the next components:

  • Arduino Mega 2560 controller board
  • Ethernet module: Arduino Ethernet Shield or ENC28J60 Ethernet module or Wi-Fi module based on ESP8266 chip
  • Optionaly up to 2 DS18B20, DS18S20, DS1822 temperature sensors

The connection diagram of Arduino Mega 2560 controller board, temperature sensors and input/output ports position is shown below.


By default is used current writing diagram of ports connection:

  • Input ports: D18-D21, GND
  • Output ports: D7, GND
  • Temperature sensors: A0, A1, 5V, GND

You may change port position to your notice:

  • Input ports: 2, 3, 18, 19, 20, 21.
  • Output ports: all available digital pins.
  • Temperature sensors: all available digital pins.

NotifyDuino support next ethernet modules:

1) Wi-Fi module based on ESP8266 chip, for example ESP-01.

The connection diagram of Arduino Mega 2560 controller board and ESP-01 module is shown below


ESP8266 module is not 5V tolerant. It works on 3.3V power supply. To convert 5V output of Arduino TX to 3.3V input level use simple resistor divider. Arduino baud rate for communication with ESP-01 module is 115200.

2) ENC28J60 Ethernet module.

The connection diagram of Arduino Mega 2560 controller board and ENC28J60 Ethernet module is shown below


ENC28J60 Ethernet module:

Arduino Mega 2560 ENC28J60 module
D53 CS
D51 SI
D50 SO

3) Standart Arduino Ethernet Shield based on W5100 chip.

Old revison don't support Arduino Mega board, so check it before using. For more information see

Download and install:

Set up your device parameters in "UserSettings.h" file:

  • Enable debug information in serial monitor. Default baud rate 115200, Enable only for testing, disable for normal usage.
    DUINO_SERIAL_DEBUGGING 0 - Disable debugging
    DUINO_SERIAL_DEBUGGING 1 - Enable debugging
  • Select network module.
    NETWORK_INTERFACE 1 - Standart Arduino Ethernet Shield, W5100 chip
    NETWORK_INTERFACE 2 - ENC28J60 Ethernet module
    NETWORK_INTERFACE 3 - Wi-Fi module based on ESP8266 chip, ESP-01
  • Set up the network device parameters. For Arduino Ethernet Shield or ENC28J60 Ethernet module only. Set up following parameters, actual for your device:
    default_mac[6] 	    = { 0xFC , 0xC2 , 0x3D , 0x4C , 0x4B , 0x40};
    default_ip[4]	 	= { 192, 168, 10, 113 };
    default_gateway[4] 	= { 192, 168, 10, 1 };
    default_mask[4] 	= { 255, 255, 255, 0 };
    default_dns[4]   	= { 8, 8, 8, 8 };
    After connecting the device to Android app, can be replaced network settings through it.
    For Wi-Fi module based on ESP8266 chip set up following parameters:
    default_AP_SSID = ""; 	// Local Wi-Fi network name (SSID)
    default_AP_PSW = "";	// Local Wi-Fi network password (PSW)
  • Changing the device ports order
    If you want to use port for input signal different from default, or want to connect temperature sensors to other controller ports, that need to make next changes.
    Input ports and messages (available ports - 2, 3, 18, 19, 20, 21):
    inputPin1 = 18;
    event1Message = "Pin 18 changed ...";
    inputPin2 = 19;
    event2Message = "Pin 19 changed ...";
    inputPin3 = 20;
    event3Message = "Pin 20 changed ...";
    inputPin4 = 21;
    event4Message = "Pin 21 changed ...";
    Output port (available ports - all available digital pins):
    outputPin = 7;
    Temperature sensor ports (available ports - all available digital pins):
    TempSensor1Pin = A0;
    temp1EventMessage = "Temperature 1 out of range !!!";
    TempSensor2Pin = A1;
    temp2EventMessage = "Temperature 2 out of range !!!";

Appload source code into controller board:

  • Plug the controller board to PC
  • In Arduino IDE choose board model (Tools - Board - Arduino/Genuimo Mega or Mega 2560)
  • Open «NotifyDuino.ino» file, and download the firmware in controller, press Upload button

Unique device serial number.
When launching sketch at the first time, occurring the generation of random 29-bit serial number. Device serial number necessary for registration your device in Android application. In order to receive device serial number, open serial monitor in Arduino IDE, set up baudrate to 115200 and reset device.

After connecting controller to the ethernet you can control it through web typing controller ip in webbrowser or you can control it through android application, also it allow receive GCM messages from controller to your android device in any place.

App for Android device, you can download here NotifyDuino.apk

Application settings description, you can find by link NotifyDuino manual

More projects


Linux Kernel Module Programming for embedded platform

Development of interface modules, support chips and protocols for the particular design of the board.


U-Boot and RedBoot modification for embedded boards

Changes to the boot code in accordance with the peculiarities and differences from the reference designed board to prepare the board to boot the OS.


VHDL/Verilog FPGA programming

Converting physical interfaces on the fly. Implement algorithms in real time. The implementation of high-speed data bus. Parallel, pipelined processing.