There are many fun projects related to Internet Of Thing (IOT). It allows user to execute remote command or store data online for remote monitoring. Two famous application of IOT are the Smart Home Automation and Online Monitoring System. Blynk is a Web Server Provider that offers user with free* Web Server channels. Each project or channel created within Blynk Server is provided by a unique password called “Auth Token”. Only user that has the Auth Token can allow the permission to write and read data into the specific project or channel on the Web Server.
As long as you have a micro-controller with internet access, you can allow the values to be submitted to the channel on the Blynk Server so that you can monitor the values or execute the command via smart phone any where in the world as long as your micro-controller (project) and your smart phone (remote controller / display) got the internet access. We can also combine multiple micro-controllers and projects or even exchange / copy values from other projects.
Today’s post is about how to copy the value from a micro-controller to another micro-controller. We will be using NodeMCU board as example as it has a built in Wifi function. In this project we will be utilizing the Bridge Widget Function which provided by Blynk App. It not only can be used to copy some variable values from other project or channel but it also can be used the value for further calculation and re-post back to the Blynk Server.
The NodeMCU micro-controller is similar to Arduino micro-controller board. It is compatible with Arduino IDE software and is built-in with the ESP8266 module which can be connected to the internet. You can grab some at our affiliate link here !!!
Node MCU Micro controller Base
The based below the Node MCU can provide more flexibility on the connection ports to support more sensors. Besides, it also has 12V input port and able to provide 5V power supply to support the sensors. Support us by purchase it from our affiliate link here !!!
If you have 2 micro-controllers with two different channel that monitors two different projects, you may need 1 or partial values to be COPY over from one micro-controller to another if the values are related to each other. It can be done without interrupting the existing channels by just adding additional codes of the existing project. For an example below, a Micro-controller 2 requires temperature value can be COPIED from Micro-Controller 1 that measuring same variable.
If you want to combine all the two measurement into 1 project, it can also be done. Instead of creating 2 projects, you can put all values into 1 project or channel. For example below, 2 micro-controllers can combine measured values into the same project.
Wireless Smart Energy Monitor
This is an energy meter for the whole household monitoring and the measurement unit is fit inside electrical panel while there is a portable monitor display which is constantly communicate and acquire data via wireless with the measurement transmitter unit. You can get it at our affiliate link here !!!
Wi-Fi Smart Energy Monitoring Control Meter
This is a smart household energy meter that could monitor and controlled by phone anywhere around the world at anytime. This is for single phase household and installed in electric panel via din rail. Get it at our affiliate link here !!!
The project example here will be showing how to use 2 nodeMCU micro-controllers from individual project and COPY variable value to another nodeMCU. NodeMCU (device A) will measure analog potentiometer, potRead and measure counting second, countTime. While nodeMCU (device B) will capture the 2 values and do calculation as a product of potRead x countTime, which is a new variable called combine. The combine value is then re-post to the project for device B. If you only have 1 project or channel, you can put all the Auth Token the same value. Below is the overall sketch of the difference between Device A (that sends value) and Device B (that receives value from Blynk and use the values to re-calculate and re-post to Blynk App.
Ferrule Lugs and Crimper Set
Ferrule lugs are used at terminals for tight and secure connection. Besides, it also prevent stranded cables accidentally touching adjacent power line that may cause short circuit. Grab 1 at our affiliate link here !!!
Blynk App – The Online Data Monitoring Platform
Blynk is a user friendly platform that provide web interface for data display. It provide smart phone app for easy setup and monitoring. In the app, there are a lot of Widget Boxes which suits a lot of measurement data. However, if you want to use the Widgets, it will consume energies based on the Widget types, similar to online games that you may need to top up the energy when you require more widgets. Upon creating an account, there will be some energy which should be enough for small project.
Software Step by Step Guideline
The software part will be divided into 2 parts: 1) the smart phone web interface Blynk App and the 2) programming part using Arduino IDE Software.
- Download Blynk App on your smart phone (Google Play / AppStore).
- Open and create an Account on Blynk App.
- Add New Project (see below section)
- Blynk will send a Auth Token to your email specifically for this project.
- If you want to use 2 individual projects or channels, create 2 Auth Tokens.
- At your project main page, swap to the left to open Widget Box.
- Add Widget based on your desire:
Virtual pin V1 = Potentiometer Analog Value
Virtual pin V2 = Counting Time in Second
Virtual pin V3 = Combine values of V1 x V2
On Laptop / PC
- Install Arduino IDE Programming Software (If you do not have the software, click here to download)
- Install Node MCU Board Manager for using Node MCU in Arduino IDE Programming Software (see below section)
- Install Node MCU ESP8266 Library for using Wifi codes in Node MCU (see below section)
- Install Blynk Library for enable the Node MCU using Blynk server (see below section)
- Copy Auth Token from the email, note down the Wifi name & password.
- Upload the code to Node MCU Board.
Terminals Crimping Plier Set
This is a crimping tool with interchangeable jaw for crimping many types of terminals. It is a must have for DIY electronic and electrical for professional installation work. You may choose at out affiliate link here !!!
Install Node MCU Board Manager
If this is the first time you are dealing with NodeMCU, you need to add NodeMCU board manager file into the IDE software so that the software can support the Node MCU board. To add the Support File, open Arduino IDE Software, go to files>preferences>Additional Boards Manager URLs, paste this link http://arduino.esp8266.com/stable/package_esp8266com_index.json to the black space and click OK. Go to Tool > Board > make sure the board is showing NodeMCU 1.0 (ESP-12E module).
Install ESP8266 Wifi Library
If this is the first time you are dealing with Wifi programming, this ESP8266 Wifi Library file is needed to be installed to the Arduino IDE Software so that it can understand the programming function. Go to Tools > Boards > Boards Manager and download the ESP8266 library by ESP8266 Community
Install Blynk Library
If this is the first time you are dealing with Blynk server, this Blynk Library file is needed to be installed to the Arduino IDE Software so that it can understand the programming function. Go to Tools > Boards > Boards Manager and download the Blynk library by Volodymyr Shymanskyy
The smart phone Blynk app and Arduino IDE software are two independent parties. As long as you do it right, the Node MCU board should be able to send data to the Blynk server so that you can see the values from your smart phone. One of the advantage of using Blynk is that the Blynk server can allow for data storage so that you can trace or download previous record. You can customize your web interface at Blynk App. Below is one of the example how it would look like.
Before we end, we would like to give gratitude to you for taking the time to read the post. We would need readers like you to support us in order to keep growing. You can support us in the following ways :
Donate & Fund Raising
If you like my work, please send me a donation to encourage me to do more. Thanks
We are the member of Aliexpress affiliate marketing. Do support us by clicking the affiliate product links if you do wish to purchase them.
Like and Share
If you like our post, we need your support to like and share our posts or videos so that it can reach more and more people like you !!