Key Steps To Improve Health And Safety In Industrial Workplaces

Industrial workplace health and safety are essential for avoiding work-related accidents, injuries, and fatalities. In fact, as many as 13,455,000 workers across manufacturing industries in the US are at risk for fatal and nonfatal injuries, the CDC reveals. Not only does improving workplace health and safety protect workers, but it also prevents lost work days and lost revenue. The National Safety Council found work injuries cost businesses a total of $161.5 billion annually, equating to $1,100 per worker.

Improve employee training

New workers are three times more likely to sustain an injury in their first month than workers with a year's experience on the job. By improving employee training and tailoring programs to the demands of each individual role, you can better minimize the risk of accident and injury (a lab employee, for instance, requires vastly different training to an industrial line worker). In fact, OSHA advises implementing different plans for five key areas in order to form a comprehensive health and safety approach: hazard assessment; hazard mitigation; hazard prevention; electrical safety; and safety training. Additionally, it’s important to provide refresher training sessions on a regular basis. Never make health and safety training a one-time occurrence. By reiterating health and safety information and advice throughout the year, you can ensure workers maintain awareness of best practices.

Implement a health and safety management system

A health and safety management system is essential for identifying and resolving workplace hazards and protecting workers, as well as improving overall operational performance. In fact, it can reduce total costs arising from occupational injuries by at least 20-40%. To devise your system, OSHA recommends first identifying any health and safety issues, including, risks and hazards, management system deficiencies, and opportunities for improvement, and then prioritizing those issues. You can then determine the goals of your health and safety management system in order to maximize workplace safety and minimize risks. If an employee does sustain an injury while on the job, it’s important they inform themselves of their legal rights. Filing a lawsuit for personal injury damages can help injured employees secure financial compensation to cover the cost of medical bills and lose income, Aaron Allison Law explains.

Incentivize compliance

By incentivizing compliance, you have a better chance of ensuring your employees adhere to health and safety standards. Industrial workplaces often involve high-risk activities dealing with heavy machinery, electrical tools, and toxic chemicals on a daily basis. As such, employees can easily become too comfortable and lax, which results in potential injury or death. Incentivizing compliance could, for example, involve rewarding employees or managers when they achieve pre-set health and safety goals. Similarly, examples of non-compliance with rules and guidelines should also be corrected.

Health and safety should be a priority in all industrial workplaces. By improving employee training, implementing a health and safety management system, and incentivizing compliance, you can keep your workplace as safe as possible for employees.

ESP32 HTTP Post with ThingSpeak and IFTTT

ESP32 is a powerful chip for Internet of Things applications. This tutorial is also based on another ESP32 application in the field of IoT.

Hello readers, I hope you all are doing great. In the previous tutorial, we learned how to send sensor readings from ESP32 to the cloud (ThingSpeak webserver).

In this tutorial, we will learn to send HTTP POST requests from the ESP32 board to ThingSpeak and IFTTT APIs.

Where To Buy?
No.ComponentsDistributorLink To Buy
1ESP32AmazonBuy Now

What is HTTP?

Fig. 1 Hypertext Transfer Protocol

HTTP stands for hypertext transfer control and it is a protocol for transferring data between a web client and a web server. Hyper text transfer protocol was invented alongside HTML (Hypertext markup language) to create the first interactive, text-based web browser: the original www or World Wide Web.

Server and client communication process over HTTP:

  • The ESP32 (client) sends an HTTP request to a server ( for example ThingSpeak or IFTTT.com)
  • The server responds to the ESP32 ( client ).
  • Finally, the response contains request status information as well as the requested content.

HTTP POST Request

Fig. 2 HTTP POST Request

Hypertext transfer protocol uses particular request methods to execute various tasks. Two mostly used HTTP request methods are: HTTP GET request and HTTP POST request.

HTTP GET request is generated to request data from a specific resource and the HTTP POST request method is used to send data from the client device to the server to create or update resources.

In this tutorial, we will demonstrate only the HTTP POST method with ThingSpeak and IFTTT web services.

Features of the HTTP POST request:

  • Unlimited data length: Data is submitted through the body of HTTP so there is no limit/restriction on data length.
  • Secure: Data does not get saved on the web browser hence, this method of data communication is secure.
  • Allows different data types.
  • Data privacy.

What is IFTTT?

IFTT stands for If This Then That. It is a free web service for making different services like email, weather services, Twitter etc to connect.

IFTTT means if a service is triggered, other IFTTT services will take action.

 

Fig. 3 IFTTT

IFTTT and ESP32

IFTTT acts as a bridge between ESP32 and other web services. Some of the tasks the ESP32 board can perform with the IFTTT API service are:

  • Sending Emails and SMSs
  • Controlling ESP32 with Google Assistant
  • Communicating data or information with smartphones.
  • Scheduling events for ESP32.

IFTTT comprises Applets and Applets further contains two IFTTT services namely trigger and action.

You can use the applets created by a company or can also create your own applet. To use the IFTTT applet with ESP32, we need to create an applet by ourselves. Such applet will contain Webhooks service to interact directly with ESP32 and other services that you want to use like email, Twitter service etc.

There are cases while using ESP32 with the IFTTT: either ESP32 will trigger the IFTTT to do some task or the IFTTT triggers ESP32 to do some task.

Steps to trigger IFTTT via ESP32

  • Create an IFTTT account
  • Create an Applet to connect Webhooks to the desired service.
  • Sending HTTP POST request from ESP32 board to IFTTT
  1. Creating an IFTTT account:

Enter the following link in the web browser: https://ifttt.com

  1. Login with your Gmail or Facebook accounts for free.
  2. Click on Create icon (top left menu) to create an Applet.
 

Fig. 4 Creating an Applet

 
  1. Click on the ”if This” icon.

Fig. 5 ” If This”

 
  • Select a service. Search for the Webhooks service and select the respective icon.

Fig. 6 Search and Select Webhooks

 
  • Click on the Receive a web request option to select a trigger option. The trigger will fire every time the maker service receives a web request to notify it to an event.

Fig. 7 Receive a Web Request

 
  • Assign a name to the trigger event and click on Create trigger We have assigned ESP32_test.
 

Fig. 8 Create Trigger

  • Next, click on the “Then That”

Fig. 9 Then that

  • Select a service. We are selecting an Email service.

Fig. 10 Selecting a Service

  • Next, define what will happen whenever the event is triggered (the event that we have created earlier) and click on the Finish

Fig. 11

  • Testing the Applet
  1. Open the following link: https://ifttt.com/maker_webhooks
  2. Click on the Documentation A new window will open containing your key (API).
  3. Enter the details in To trigger an Event and click on Test it.
 

Fig. 12 To Trigger an Event

Fig. 13 Event Successfully Triggered

 
  • Open the email account, you have used while creating an IFTTT account.
  • You should receive an email from IFTTT.

Arduino Code

#include <WiFi.h>

#include <HTTPClient.h>

//---------Netwrok Credentials

const char* ssid = "SSID";

const char* password = "Password";

const char* serverName = "http://maker.ifttt.com/trigger/ESP32_test/with/key/Enter you API key";

unsigned long lastTime = 0;

unsigned long timerDelay = 15000;

void setup()

{

Serial.begin(115200);

WiFi.begin(ssid, password);

Serial.println("Connecting");

while(WiFi.status() != WL_CONNECTED)

{

delay(500);

Serial.print(".");

}

Serial.println("");

Serial.print("Connected to WiFi network with IP Address: ");

Serial.println(WiFi.localIP());

// Random seed is a number used to initialize a pseudorandom number generator

randomSeed(hallRead());

}

Void Loop()

//Send an HTTP POST request after every 15 seconds

if ((millis() - lastTime) > timerDelay)

{

//Check WiFi connection status

if(WiFi.status()== WL_CONNECTED)

{

WiFiClient client;

HTTPClient http;

// Your Domain name with URL path or IP address with path

http.begin(client, serverName);

// Specify content-type header

http.addHeader("Content-Type", "application/x-www-form-urlencoded");

// Data to send with HTTP POST

String httpRequestData = "value1=" + String(random(25)) + "&value2=" + String(random(25))+ "&value3=" + String(random(25));

// Send HTTP POST request

int httpResponseCode = http.POST(httpRequestData);

/*

// If you need an HTTP request with a content type: application/json, use the following:

http.addHeader("Content-Type", "application/json");

// JSON data to send with HTTP POST

String httpRequestData = "{\"value1\":\"" + String(random(40)) + "\",\"value2\":\"" + String(random(40)) + "\",\"value3\":\"" + String(random(40)) + "\"}";

// Send HTTP POST request

int httpResponseCode = http.POST(httpRequestData);

*/

Serial.print("HTTP Response code: ");

Serial.println(httpResponseCode);

Serial.println("successfully conected to host");

// Free resources

http.end();

}

else

{

Serial.println("WiFi Disconnected");

}

lastTime = millis();

}

}

Code Description

  • Add the required header files.
  • WiFi.h header file is used to enable the Wi-Fi module and its respective functions.
  • HTTPClient.h header file is used to let the server and client pass information with HTTP response or request.

Fig. Libraries

  • Enter the network credentials, SSID and Password.

Fig. Network Credentials

  • Add the IFTT domain name, the event name (you have created) and the API key. The event name we have created is ESP32_test.

Fig.

Setup()

  • Initialize the Serial monitor with a 115200 baud rate for debugging purposes.

Fig.

  • Enable ESP32’s Wi-Fi module using begin() function which is using SSID and password as arguments.
  • Wait until the ESP32 is not connected to the Wi-Fi network.
  • Fetch the IP address using WiFi.localIP() function.

Fig.

  • randomSeed() function is used to generated a pseudorandom number. We are using Hall sensor to take hall readings and share them to IFTTT server (host).

Fig.

Loop()

  • If the ESP32 board is successfully connected to the Wi-Fi network, HTTP POST requests will be generated automatically after every 15 seconds.
  • Some random values (hall readings) will be sent through value1, value1, value3

Fig

  • Send HTTP POST request.
  • Print the HTTP POST response with the response code.
  • Response code 200 is for successful communication and 402 code will be printed if some error is detected during HTTP post request.

Fig.

  • Following lines are used when you want to make a request with some JSON

Fig.

  • End the HTTP request.

Fig.

Testing

  • Select the right development board in Tools >> Boards >> DOIT ESP32 DevKit V1 in Arduino IDE.
  • Compile and upload the code into ESP32 using Arduino IDE.
  • Make sure that you have entered the right Wi-Fi credentials, API key and event name before uploading the code.
  • Open the serial monitor with a 115200 baud rate as defined in the Arduino code.
  • Press the EN button from the ESP32 development board.
  • On the serial monitor, we can check whether ESP32 is successfully connected to the network or not and whether the HTTP POST request is generated successfully or not.

Fig. 14 Serial Monitor

  • Open your IFTTT account and click on My
  • Next, click on View Activity.

Fig. 15 View Activity

  • A screenshot of the latest activity is shown below:

Fig. 16 Received data.

 
  • Check your registered email. You should receive an email from IFTTT.

Fig. 17 Email Received from IFTTT Server

 

Making an HTTP POST Request (JSON data) from ESP32 to ThingSpeak with Arduino IDE

We have already posted an article on sending sensor readings from ESP32 to ThingSpeak. In this article, we will learn how to send HTTP POST requests from ESP32 to send JSON data to the ThigSpeak server.

ThingSpeak is a web service operated by MathWorks where we can send sensor readings/data to the cloud. We can also visualize and act on the data (calculate the data) posted by the devices to ThingSpeak. The data can be stored in either private or public channels.

Steps to be followed to access ThingSpeak API:

  • First, you need to create a MathWorks Account.
  • To create an account or log in to ThingSpeak (operated by MathWorks) server follow the link: https://thingspeak.com/
  • Click on Get Started for free.

Fig. 18 Getting Started for Free

  • Enter your details to create a MathWorks account as shown below:

Fig. 19 Create New Account

  • If you have already created a MathWorks account, then click on Sign in.

Fig. 20 MathWorks Sign in

  • Create a channel by clicking on the New Channel

Fig. 21 New Channel

  • Enter the respective details in the channel.

Fig. 22 Create a New Channel

 

Arduino Code

//-----------Libraries

#include <WiFi.h>

#include <HTTPClient.h>

//-----------Network Credentials

const char* ssid = "replace with your network SSID";

const char* password = "replace with netwrok password";

// Domain Name with full URL Path for HTTP POST Request

const char* serverName = "http://api.thingspeak.com/update";

// Service API Key

String apiKey = "Write API Key";

unsigned long lastTime = 0;

unsigned long timerDelay = 5000; //to add delay of 5sec

void setup()

{

Serial.begin(115200);

WiFi.begin(ssid, password); //initialize ESP32 wifi module

Serial.println("Connecting");

while(WiFi.status() != WL_CONNECTED)

{

delay(500);

Serial.print(".");

}

Serial.println("");

Serial.print("Connected to WiFi network with IP Address: ");

Serial.println(WiFi.localIP());

Serial.println("Timer set to 10 seconds (timerDelay variable), it will take 10 seconds before publishing the first reading.");

// Random seed is a number used to initialize a pseudorandom number generator

randomSeed(analogRead(25));

}

void loop()

{

//Send an HTTP POST request after every 5 seconds

if ((millis() - lastTime) > timerDelay)

{

//Check the WiFi connection status

if(WiFi.status()== WL_CONNECTED)

{

WiFiClient client;

HTTPClient http;

http.begin( client, serverName );

http.addHeader("Content-Type", "application/json");

String httpRequestData = "{\"api_key\":\"" + apiKey +

"\",\"field1\":\"" +

String(random(30)) + "\"}";

int httpResponseCode = http.POST(httpRequestData);

Serial.print("HTTP Response code: ");

Serial.println(httpResponseCode);

// Free resources

http.end();

}

else {

Serial.println("WiFi Disconnected");

}

lastTime = millis();

}

}

Code Description

  • Add the server address and API (Write) Key.

Fig.

Setup()

  • Inside setup() function, initialize the serial monitor with a 115200 baud rate for debugging purposes. Also initialize the Wi-Fi module using WiFi.begin() function.
  • randomSeed() function is used to generate pseudorandom numbers.
  • Inside the randomSeed() function, the data you want to share will be passed as an argument.
  • The data could be a sensor reading or some analog values.

Loop()

    • Inside the loop function, once the ESP32 board is successfully connected with Wi-Fi, ESP32 will make an HTTP POST request for JSON data.
    • The request will be made after every 5 seconds.
    • In this code, we will share JSON data.

Fig.

  • Print the HTTP POST response with the response code.
  • Response code 200 is for successful communication and 402 code will be printed if some error is detected during HTTP post request.

Fig.

Testing

  • Select the right development board in Tools >> Boards >> DOIT ESP32 DevKit V1 in Arduino IDE.
  • Compile and upload the code into ESP32 using Arduino IDE.
  • Make sure that you have entered the right Wi-Fi credentials, and write the API key before uploading the code.
  • Open the serial monitor with a 115200 baud rate to check whether ESP32 is connected to Wi-Fi or not.
  • Open the ThingSpeak account and check the Channel Stats.

Fig. : data (JSON) Chart on ThingSpeak

 

This concludes the tutorial. I hope you found this of some help and also to see you soon with the new tutorial on ESP32.

Hyperconverged Infrastructure Market in 2022 and Beyond

Hyperconverged infrastructure becomes the go-to option for enterprise-level companies and startups looking to scale fast. While server virtualization is a mature technology, HCI continues to be one of the hottest trends in the IT industry right now. HCI offers businesses improved reliability, reduced deployment time, lower maintenance costs, and easy scalability. If you are thinking about purchasing a hyperconverged infrastructure solution, take a look at what your competition is doing. If other companies in your market are adopting HCI, maybe it's time you should, too. Let's take a look at the current state of the industry and the global HCI market growth.

The State of the Industry

HCI is a great way to reduce operating costs and simplify IT by using a single virtual environment to combine, compute, storage and networking. This virtual-box solution is flexible and affordable enough, allowing even smaller companies and startups to purchase HCI architecture to connect and interact with their remote workers, branch offices, and IoT applications.

According to researchers, the global HCI market will continue to grow at a steady pace during the next five years. Increasing customer demand and rapid adoption of SaaS and other cloud-based solutions due to the changes in daily operations of most businesses caused by the Covid-19 pandemic has brought HCI into the spotlight. More and more vendors are offering hyperconverged solutions, both for cloud and on-premise infrastructures.

More Software Offerings

According to experts, the HCI market was valued at an impressive $7.34 billion in 2020. It's predicted to surpass the $10 billion mark by 2025. Backup and recovery solutions and performance-enhancing environments remain the main drivers of market growth. Other niches where HCI solutions are popular include VM farms, desktop virtualization software, and database management.

  • The tech is moving beyond the large data centers which were its early adopters.
  • IT vendors have simplified control of HCI solutions, making them available for the general market.
  • The ability to scale horizontally by adding new virtual nodes is intuitively easy to understand even for non-tech-savvy entrepreneurs.
  • It leads to increased adoption of HCI by companies from different sectors of the economy, including retail and logistics.

Server providers and other IT vendors are divided on the issue of HCI. While some of them seem to have exited the HCI market completely, others, including even a few hardware vendors, have doubled their efforts, focusing on selling software-only products.

HCI and Edge: A Perfect Fit

Hyperconverged infrastructure fits seamlessly with Edge computing. Even smaller companies have to rely on Edge if they have branch offices or operate in remote locations. Industries like retail and banking use Edge as their default option. Since HCI removes the need for separate storage and networking devices, combining Edge with HCI creates natural synergy. Connecting thin clients and VDI workstations to the company's data center running on HCI improves the systems' reliability and makes it harder to breach from the outside. From the business point of view, partnering with a single HCI vendor instead of several hardware providers leads to cost reduction and better control and maintenance. HCI solutions consume less power and take up less space than their standard hardware counterparts.

Adoption of high-speed mobile networks like 5G will lead to further growth of Edge data centers using HCI. Enterprise data centers will either switch to this new business model or will provide HCI solutions alongside their traditional IT silos. In short, the HCI will continue to co-evolve alongside Edge, expanding from the niche of serving remote office environments to other businesses that look to cut costs, reduce storage capacity and benefit from centralized management of resources that HCI offers.

Hybrid Cloud Solutions Running on HCI

When it comes to IT infrastructure, the hybrid cloud has become the default option for most companies. Hyperconverged infrastructure can serve as the backbone of the hybrid- and multi-cloud platforms. Since HCI runs on widely-used x86 infrastructure and doesn't require tweaking and overhauling, cloud service providers switch from traditional storage/compute/network silos to hyperconverged alternatives.

Major players like Dell and Amazon are rapidly moving into the HCI niche. The new Dell Technologies Cloud runs on the VxRail platform, which is one of the HCI market leaders. AWS now offers Nutanix's hyperconverged infrastructure available as a service. Microsoft has come up with Azure Stack HCI, a powerful solution for hybrid clouds.

Hyperconverged infrastructure can become a promising alternative to popular public clouds like AWS or Microsoft Azure. The biggest selling points of HCI are its ability to scale, reduced costs, better performance, and control.

The Fastest-growing HCI Application

As mentioned previously, backup and data recovery remain the main market driver for HCI adoption. Due to the increasing number of cyberattacks, infrastructure security becomes one of the primary concerns for most companies. HCI allows to backup data on the fly, creating healthy redundancy. It's a cheaper solution since it doesn't require third-party solutions for data backup and disaster recovery. It also brings down costs associated with storage requirements, making hyperconverged infrastructure the most affordable and attractive option for backup and disaster recovery on the market right now.

Conclusion

Hyperconverged infrastructure will see increased adoption both by enterprise-level companies and data centers. It has found its natural synergy with Edge computing. The need for increased security will accelerate HCI adoption in the niche of backup and disaster recovery. The popularity of hybrid cloud solutions will also increase the number of companies using HCI for their IT needs.

Introduction to MATLAB Command Window

Hello friends! I hope you all had a great start to the new year.

In our first lecture, we had looked at the MATLAB prompt and also learned how to enter a few basic commands that use math operations. This also allowed us to use the MATLAB prompt as an advanced calculator. Today we will look at the various MATLAB keywords, and a few more basic commands and MATLAB functions, that will help us keep the prompt window organized and help in mathematical calculations. We are also going to get familiar with MATLAB’s interface and the various windows. We will also write our first user-defined MATLAB functions.

MATLAB keywords and functions

Like any programming language, MATLAB has its own set of keywords that are the basic building blocks of MATLAB. These 20 building blocks can be called by simply typing ‘iskeyword’ in the MATLAB prompt.

The list of 21 MATLAB keywords obtained as a result of running this command is as follows:

  • 'break'
  • 'case'
  • 'catch'
  • 'classdef'
  • 'continue'
  • 'else'
  • 'elseif'
  • 'end'
  • 'for'
  • 'function'
  • 'global'
  • 'if'
  • 'otherwise'
  • 'parfor'
  • 'persistent'
  • 'return'
  • 'spmd'
  • 'switch'
  • 'try'
  • 'while'

To test if the word while is a MATLAB keyword, we run the command

iskeyword(‘while’)

The output ‘1’ is saying that the result is ‘True’, and therefore, ‘while’ is indeed a keyword.

‘logical’ in the output refers to the fact that this output is a datatype of the type ‘logical’. Other data types include ‘uint8’, ‘char’ and so on and we will study these in more detail in the next lecture.

Apart from the basic arithmetic functions, MATLAB also supports relational operators, represented by symbols and the corresponding functions which look as follows:

Here, we create a variable ‘a’ which stores the value 1. The various comparison operators inside MATLAB used here, will give an output ‘1’ or ‘0’ which will mean ‘True’ or ‘False’ with respect to a particular statement.

Apart from these basic building blocks, MATLAB engineers have made available, a huge library of functions for various advanced purposes, that have been written using the basic MATLAB keywords only.

We had seen previously that the double arrowed (‘>>’) MATLAB prompt is always willing to accept command inputs from the user. Notice the ‘’ to the left of the MATLAB prompt, with a downward facing arrow. Clicking this downward facing arrow allows us to access the various in-built MATLAB functions including the functions from the various installed toolboxes. You can access the entire list of in-built MATLAB functions, including the trigonometric functions or the exponents, logarithms, etc.

Here are a few commands that we recommend you to try that make use of these functions:

A = [1,2,3,4];

B = sin(A);

X = 1:0.1:10;

Y = linspace(1,10,100);

clc

clear all

quit

Notice that while creating a matrix of numbers, we always use the square braces ‘[]’ as in the first line, whereas, the input to a function is always given with round brace ‘()’ as in the second line.

We can also create an ordered matrix of numbers separated by a fixed difference by using the syntax start:increment:end, as in the third command.

Alternatively, if we need to have exactly 100 equally separated numbers between a start and and end value, we can use the ‘linspace’ command.

Finally, whatever results have been output by the MATLAB response in the command window can be erased by using the ‘clc’ command which stands for ‘clear console’, and all the previously stored MATLAB variables can be erased with the ‘clear all’ command.

To exit MATLAB directly from the prompt, you can use the ‘quit’ command.

In the next section, let us get ourselves familiarized with the MATLAB environment.

The MATLAB Interface Environment

A typical MATLAB work environment looks as follows. We will discuss the various windows in detail:

When you open MATLAB on your desktop, the following top menu is visible. Clicking on ‘new’ allows us to enter the editor window and write our own programs.

You can also run code section by section by using the ‘%%’ command. For beginners, I’d say that this feature is really really useful when you’re trying to optimize parameters.

Menu Bar and the Tool Bar

On the top, we have the menu bar and the toolbar. This is followed by the address of the current directory that the user is working in.

By clicking on ‘New’ option, the user can choose to generate a new script, or a new live script, details of which we will see in the next section.

Current Folder

Under the Current Folder window, you will see all the files that exist in your current directory. If you select any particular file, you can also see it details in the bottom panel as shown below.

Editor Window

The Editor Window will appear when you open a MATLAB file with the extension ‘.m’ from the current folder by double clicking it, or when you select the ‘New Script’ option from the toolbar. You can even define variables like you do in your linear algebra class.

The code in the editor can also be split into various sections using the ‘%%’ command. Remember that a single ‘%’ symbol is used to create a comment in the Editor Window.

Workspace Window

Remember that the semicolon ‘;’ serves to suppress the output. Whenever you create new variables, the workspace will start showing all these variables. As we can see, the variables named ‘a’, ‘b’, ‘c’, and ‘x’, ‘y’, ‘z’. For each variable, we have a particular size, and a type of variable, which is represented by the ‘Class’. Here, the ‘Class’ is double for simple numbers.

You can directly right click and save any variable, directly from this workspace, and it will be saved in the ‘.mat’ format in the current folder.

Live Editor Window

If however, you open a ‘.mlx’ file from the current folder, or select the option to create a ‘New Live Script’ from the toolbar, the Live Editor window wil open instead.

With the Live Script, you can get started with the symbolic manipulation, or write text into the MATLAB file as well. Live scripts can also do symbolic algebraic calculation in MATLAB.

For example, in the figure below, we define symbol x with the command

syms x

We click ‘Run’ from the toolbar to execute this file.

The Live Editor also allows us to toggle between the text and the code, right from the toolbar. After that, the various code sections can be run using the ‘Run’ option from the toolbar and the rendered output can be seen within the Live Editor.

Command History

Finally, there is the command history window, which will store all the previous commands that were entered on any previous date in your MATLAB environment.

Figure window

Whenever you generate a plot, the figure window will appear which is an interactive window with it’s own toolbar, to interact with the plots.

We use the following commands to generate a plot, and you can try it too:

X = 1:0.1:2*pi;

Y = sin(X)

plot(X,Y)

The magnifier tools help us to zoom into and out of the plot while the ‘=’ tool helps us to find the x and y value of the plot at any particular point.

Also notice that now, the size of the ‘X’ and ‘Y’ variables is different, because we actually generated a matrix instead of assigning a single number to the variable.

Creating a New User-Defined Function

By selecting New Function from the toolbar, you can also create a new user-defined function and save it as an m-file. The name of this m-file is supposed to be the same as the name of the function. The following template gets opened when you select the option to create a new user-defined function:

The syntax function is used to make MATLAB know that what we are writing is a function filee. Again notice that the inputs to the function, inputArg1 and inputArg2, are inside the round braces. The multiple outputs are surrounded by square braces because these can be a matrix. We will create a sample function SumAndDiff using this template, that will output the sum and difference of any two numbers. The function file SumAndDiff.m looks as follows:

Once this function is saved in the current folder, it can be recognized by a current MATLAB script or the MATLAB command window and used.

Exercises:

  1. Create a list of numbers from 0 to 1024, with an increment of 2.
  2. Find the exponents of 2 from 0th to 1024th exponent using results of the previous exercise.
  3. What is the length of this matrix?
  4. Plot the output, and change the y axis scale from linear to log, using the following command after using the plot function: set(gca, ‘yscale’, ‘log’)
  5. Let us go ahead now and import an image into MATLAB to show you what the image looks like in the form of matrices. You need to have the image processing toolbox installed in order for the image functions to work.

Run the following command in the MATLAB prompt:

I = imread(‘ngc6543a.jpg’);

This calls the image titled ‘ngc6543a.jpg’ which is stored inside MATLAB itself for example purposes. Notice the size of this image variable I in the workspace. You will interestingly find this to be a 3D matrix. Also note the class of this variable.

In the next tutorial, we will deep dive into the MATLAB data types, the format of printing these data types and write our first loops inside MATLAB.

What is the difference between BIM and CAD Software for Architects?

Are you a new architect or aspiring to become an architect? If the answer is "yes," you will need to have the best programs to make a mark in this industry. Well, the two most important categories of software in architecture are building information modeling (BIM) and computer-aided design (CAD). Which one should you use? Keep treading as we dig deeper into each category and highlight key examples for you to consider.

What is CAD?

CAD, shortening for computer-aided design, is the use of computers to help create, modify, and optimize building design. CAD programs are developed to help people design and document their models using advanced computer technology. CAD files are particularly useful where multiple parts are required to fit precisely in a larger assembly.

Architects using CAD can effectively create both 3D models and 2D drawings for the parts of their products. The fast development of 3D CAD programs has rapidly transformed the building design and manufacturing industries because architects can create more complex products faster than before.

CAD Advantages 

The main advantages of using CAD include:

  • It makes it pretty easy for starters to get into the world of 2D and 3D.
  • You are able to create extremely complex models that were otherwise not possible with standard programs.
  • Spotting errors and correcting them in building design is easy and fast. You do not need to go to scratch to correct such errors.
  • Most CAD programs automatically create documentation for architects. This is very useful, especially when working on complex projects.

The main challenge of using CAD programs is that they simplify the work of architects so much. Although this is a good thing because you can complete projects faster, there is a risk of making some people complacent because everything has been done. See: you only need to fetch different parts from the library.

Good examples of CAD programs include AutoCAD, ArchiCAD, SketchUp, and AutoCAD Civil 3D. Most architects usually start with CAD programs before moving on to BIM.

What is BIM?

BIM is a new system where architects, engineers, and contractors collaborate by using the same database when creating new designs. This means that the entire team can easily visualize the whole building project way ahead of breaking the ground. It is considered a sort of natural evolution of CAD. So, how exactly does BIM work?

BIM provides the digital presentation of the actual facility that an architect is working on. It allows you to bring all the designs that you have, including different CAD models, so that you can work on them further or make rapid changes. When applied well, BIM can help the entire project team to visualize all parts easily, review them, and identify errors way before the task commences.

BIM Advantages

BIM has become so important in architecture, and it is now considered one of the most advanced technologies. Here are the main advantages:

  • BIM is better at making more complete presentations of architectural designs.
  • It pools all your docs into one database so that the entire team can easily access the latest changes.
  • BIM allows you to provide a lot more to your building design clients compared to what you would do with CAD.
  • Resource tracking with BIM is pretty easy.

The main challenge about BIM is that it is a relatively new method, and a lot of architects are yet to adopt it. This means that you might find working with some architects challenging because they are not used to BIM.

Common BIM building design software you might want to consider are Autodesk BIM 360, Revit, and Autodesk Civil 3D.

The building design and architectural niches are evolving fast, and you should not be left behind in using them. The good thing is that these advanced applications are making it a lot easier to create better models faster and note errors early. Since most architects are still in CAD programs, it is important to ensure you are also good in it even as you build skills in BIM. Remember that whether you prefer CAD or BIM, you will only be able to create top-rated designs by working with the best programs.

Introduction to MATLAB

Hello Friends! I hope you all are doing great welcoming 2022. With the start of the New Year, we would like to bring to you a new tutorial series. This tutorial series is on a programming language, plotting software, a data processing tool, a simulation software, a very advanced calculator and much more, all wrapped into one package called MATLAB.

We would welcome all the scientists, engineers, hobbyists and students to this tutorial series. MATLAB is a great tool used by scientists and engineers for scientific computing and numerical simulations all over the world. It is also an academic software used by PhDs, Masters students and even advanced researchers.

MATLAB (or "MATrix LABoratory") is a programming language and numerical computing environment built by Mathworks and it’s first version was released in 1984. To this day, we keep getting yearly updates. MATLAB allows matrix data manipulations, plotting of symbolic functions as well as data, implementation of robust algorithms in very short development time, creation of graphical user interfaces for software development, and interfacing with programs written in almost any other language.

If you’re associated with a university, your university could provide you with a license.

You can even online now! You can simply access it on…

You can quickly access MATLAB at https://matlab.mathworks.com/ Here’s a small trick. You can sign up with any email and select the one month free trial to get quickly started with MATLAB online.

And in case you can’t have a license, there’s also Octave, which is a different programming language but very similar in all the fundamental aspects to MATLAB. Especially for the purposes of these tutorials, Octave will help you get started quickly and you can access it on: https://octave-online.net/#

Typical uses of MATLAB include:

  1. Math and numerical computation from the MATLAB prompt
  2. Developing algorithms and scripts using the MATLAB editor
  3. Modeling and simulation using Simulink, and toolboxes
  4. Data Visualisation and generating graphics
  5. Application development, with interactive Graphical User Interface
  6. Symbolic manipulation using MuPad

MATLAB is an interpreted high-level language. This means any command input into the MATLAB interpreter is compiled line by line, and output is given. This is useful for using MATLAB as a calculator as we will see in the next section.

Using MATLAB as an Advanced Calculator/ Beginner Commands

By default, the MATLAB Prompt will be visible to you. The two angled brackets ‘>>’ refer to the MATLAB Command Prompt. Think of this as the most basic calculator. In fact, whenever you look at this, think of it as a Djinn asking for an input from you.

Anything that you give it and press enter is known as a command. Whatever it outputs is known as the response. Whatever question you ask Matlab, it will be willing to respond quickly.

For example, in the figure below, I simply write the command ‘2+2’ and press enter, to get the answer ‘4’ as a response.

You can even define variables like you do in your algebraic geometry class.

Notice that the semicolon ‘;’ that we see there is simply an indicator of when a statement ends like many other programming languages. Although this is not a necessary input in MATLAB, unlike many other languages which will simply give you an error if you forget this semicolon. Another function this serves is to suppress the output.

In MATLAB, you don’t need to ask for the answer or the result to be printed and it will continue to print by itself as part of the response. However, if you don’t want to see the output, you can suppress it.

You can also look at the value stored in a variable by simply writing the variable name and pressing ‘enter’.

We can even create a matrix of numbers as shown in the image below. This can be a 1D matrix, or a 2D matrix. Notice the use of square brackets, commas and semicolons in order to create the matrix of numbers.

You can even create matrices of numbers which are 3D numbers or even higher dimensions. When we will learn about images, we’ll see how an image is just a collection of numbers, and simple manipulation of those matrices will help us in manipulation of images.

Saving Programs in MATLAB

You can write and save your own commands in the form of an ‘m-file’, which goes by the extension ‘.m’. You can write programs in the ‘Editor window’ inside the MATLAB which can be accessed by selecting the ‘New Script’ button in the top panel. This window allows you to write, edit, create, save and access files from the current directory of MATLAB. You can, however, use any text editor to carry out these tasks. On most systems, MATLAB provides its own built-in editor. From within MATLAB, terminal commands can be typed at the MATLAB prompt following the exclamation character (!). The exclamation character prompts MATLAB to return the control temporarily to the local operating system, which executes the command following the character. After the editing is completed, the control is returned to MATLAB. For example, on UNIX systems, typing the following commands at the MATLAB prompt (and hitting the return key at the end) invokes the vi editor on the

Emacs editor.

!vi myprogram.m % or

!emacs myprogram.m

Note that the ‘%’ symbol is used for commenting in MATLAB. Any command that is preceded by this simple will be ignored by the interpreter and not be executed.

In the figure above, we have saved our very first program titled ‘Program1.m’ using the editor window in MATLAB.

Since MATLAB is for scientists and engineers primarily, it directly understands a lot of mathematical numbers natively, such as pi, e, j (imaginary number) etc.

You can quickly go to the MATLAB or the Octave terminal to test this out. Just type pi, or e and press enter to see what you get.

Introduction to Simulink

MATLAB is also a great simulation software. For more sophisticated applications, MATLAB also offers SIMULINK which is an inbuilt simulation software and provides a block diagram environment for multidomain simulation and Model-Based Design. Simulink provides a graphical editor, customizable block libraries, and solvers for modelling and simulating dynamic systems.

A very simple example of the Simulink block diagram model can be understood by the following model which simply adds or subtracts two or more numbers.

The block diagram looks as follows:

The model example for this can be opened using the following command.

openExample('simulink/SumBlockReordersInputsExample')

You can start playing with this model at once, on your MATLAB Desktop. And in fact you will find many more such examples of modelling and simulation programs that you can already start playing with online, in the set of MATLAB examples and also on the forum.

The MATLAB Community and Forum

MATLAB provides a whole community known as MATLAB-Central where MATLAB enthusiasts can ask questions and a lot of enthusiasts are willing to answer these forum questions.

There is also also, ‘file-exchange’ which is part of MATLAB-Central where people post their programs, functions and simulations for anyone to use for free.

MATLAB provides on-line help for all of its built­ in functions and programming language constructs. The commands lookfor, help, helpwin, and helpdesk provide on-line help directly from the MATLAB prompt.

Introduction to MATLAB Toolboxes

There are also several optional "toolboxes" available from the developers of MATLAB. These toolboxes are collections of functions written for special appli­cations such as symbolic computation, image processing, statistics, control system design, and neural networks. The list of toolboxes keeps growing with time. There are now more than 50 such toolboxes. The real benefit of using MATLAB is that there are teams of engineers and scientists from different fields working on each of these toolboxes and these will help you quickly get started into any field, after understanding the basics of the language. A lot of functions that are frequently performed in any particular research field, will be at the tips of your fingers in the form of ready-to-use functions. This will help you gain essential intuitions about all the different fields you may be interested in learning, getting started on, and quickly becoming a pro in. That’s the unique power MATLAB users wield.

Over the coming tutorials, we will look at the wonders that can be performed with MATLAB.

MATLAB can also interface with devices, whether they are GPIB, RS232, USB, or over a Wi-Fi, including your personal devices. It can help you manipulate images, sound and what not! You can also do 3d manipulation of animated models in MATLAB, and that’s very easy to do. We will go over this as well. We will also look one level below these 3d models and see how these themselves are also just numbers and coordinates in the end.

I absolutely enjoy MATLAB, and there’s a simple reason I’m presenting this tutorial series to you. Because I believe you should enjoy it too!

This will not only let you see ‘The Matrix’, which is the way computers perceive the real world around us, it will also change the way you yourself look at the world around you, and maybe you eventually start asking the holy question yourself… “Are we all living in a simulation?”

Exercises

Exercise: While you can get started on your own with the forum, and functions and simulations freely available, in order to procedurally be able to follow our tutorial and be able to build everything on your own from the scratch, we will strongly recommend you to follow our exercise modules.

In today’s module, we will ask you to perform very basic arithmetic tasks that will give you an intuitive feel of how to use the MATLAB prompt as an advanced calculator and make the best use of it.

For this we recommend finishing the following tasks:

  1. Use the following arithmetic operations to carry out complex calculations between any two numbers. The arithmetic operations are: Addition (+), subtraction (-), multiplication (*), division (/), and power(^).
  2. Also try to use basic math functions that are built-in for MATLAB such as, exp, log, sin, cos, tan, etc. Here are a few examples of commans you can run

sin(pi/2) exp(4)

log(10)/log(3)

  1. Also, define a few variables. Not only number variables, but also matrix variables as shown in the example below.

a=1; b= 2; c = 3; A= [1,2,3,4]; B= [5,6,7,8];

Notice that the case-sensitivity does matter for the name of the variables.

Pro Tip: You can also perform the arithmetic operations of addition, subtraction, multiplication, division and power, element-wise between any two matrices. While addition and subtraction work element-wise by default, you can perform element-wise multiplication, division, and power by using the arithmetic operations as ‘.*’, ‘./’ and ‘.^’

In the next tutorial, we will deep dive on the data types of MATLAB, keywords, what functions mean, and also write our very first function in MATLAB. If you are familiar with loops, that may come easy, because we will also write our very first loop that will help us perform repeated tasks with a relatively small number of commands.

Introduction to Surface Mount Technology

Greetings and welcome to today’s lecture. Today, we are going to focus our discussion on the Surface Mount Technology of PCB components mounting. It's our 8th tutorial in the PCB learning series and is going to be a very interesting and interactive class. In Surface-mount technology, SMT components(having small pads) are placed on the surface of the PCB board and their pads are soldered on the same side of the board.

As we discussed in our last lecture on Though-Hole Technology, there are two main methods used to mount components on PCB boards. We studied THT in the last lecture and today, we will focus on  Surface Mount Technology (SMT), we will discuss SMT classifications, types, applications, advantages and disadvantages in detail.

In the beginning, a breadboard was used to hold the components together. This had a major disadvantage because components could pull out as they remain loose in the breadboard, hence giving a hard time to designers, especially in the case of complex circuits. The engineers came out with a solution called the PCB board. Initially, Though-hole technology was used to plug components into the PCB board. Later on, with the invention of SMT components, surface-mount technology came into existence. So, let's have a look at SMT in detail:

Introduction to Surface Mount Technology

  • Surface-mount technology(SMT), initially called planar mounting, is used to mount components on the surface of the PCB board.
  • In Surface-mount technology, SMT components are used, which are quite small in size and have small pads, instead of leads/pins.
  • In SMT, components are placed on the PCB board at their required positions and their pads are soldered with the copper markings on the board.
  • Unlike THT, the component pins in SMT don't cross the PCB layer, they are soldered on the same side of the board.
  • SMT is the most popular method that is being employed in today’s PCB manufacturing process because it can be purely automated hence increasing the number of boards produced and also saving on production time. With this method, the cost of the PCBs was reduced drastically, if you are doing mass production.
  • As the name suggests, the components are mounted on the surface. So, there are no holes for the components mounting as in the THT method.
  • Initially, the process was done manually but today it is done by the use of advanced machinery, thanks to the technological revolution.
  • SMT discovery came in the 1980s when companies were struggling with the high demand for printed circuit boards. Fab houses had started shifting to mass production of the boards and therefore they had to introduce new methods of PCB assembly and mounting to speed up the process.

How to place an SMT PCB order?

There are many online PCB companies available, where we can place orders for PCB with surface mount technology. Let's take the example of JLCPCB Fabrication House, one of the leading PCB manufacturers, which offers top-quality products.
  • First of all, open this JLCPCB SMT Assembly Page.
  • Here you can see, it's quite easy to place the SMT order.
  • First, you need to Upload the PCB Gerber Files, as shown in the below figure:

  • JLCPCB has a remarkable online PCB order tracking system, which keeps you aware of the current situation of your PCB order, shown in the below figure:

  • Once your SMT PCB order gets completed, you will receive it at your doorstep.

SMT Manufacturing Process

  • Using the assembler, solder paste is applied on the parts where the components will be placed. The solder paste placement follows the guidelines from the design.
  • Use the stencil or the solder screen to ensure that the solder has been placed in the exact required positions.
  • Sometimes, stencils and assemblers might not be that accurate and it's the operator's duty to inspect the solder to ensure that it has met the required standards.
  • Depending on the defect, either the assembler corrects the defect or will remove it and reapply afresh.
  • The process of inspection is very important because it will determine the quality of the solder at the end of the process, hence affecting the overall functionality of the board.
  • After inspection, the assembler will place the components accurately following the designs given by the designer. Originally, it was done manually by workers with hand tools. Today, pick-and-place machines have made work quite easy, accurate, and fast.
  • After placement, the components are soldered into pads with the solder gun. Here, the board undergoes a reflow process in which it is passed through the furnace to remelt, liquefy and finally solidify the solder at component joints.
  • Special devices used in the process of SMT are called Surface Mount Devices.

Types of vias

The SMT employs the use of vias in order to connect components with the PCB board. There are three types of vias that are employed throughout the process i.e.

  1. Blind vias.
  2. Through vias.
  3. Buried vias.

Through vias

  • This one connects all the layers of the PCB board by passing through all of them.
  • Mostly Through vias are used for the power pins i.e. ground, Vcc etc.

Blind vias

  • Blind via connects any of the external layers to neighboring two or more layers of the PCB board but won't go through all of them(as that will be Through vias).
  • Blind vias are of several types as listed below:
  1. Controlled depth blind via
  2. Photo defined blind via
  3. Laser drilled
  4. Sequential laminated blind via.

Buried vias

  • Buried via connects any two or more layers of the PCB board but won't touch any of the external layers.
  • As the name suggests, it remains buried inside the external layers of the PCB board.

Machines used in SMT mounting

Here's the list of machines used in the SMT manufacturing process:

PCB Drilling Machine:

  • Even though I said that the SMT components are mounted on the surfaces, so there's no drilling but remember that we discussed vias, which are required to create a connection between layers of the PCB boards.
  • These vias are very tiny holes drilled into the board layers and are done by the drilling machine.

Wave Soldering Machine:

  • This is used for the soldering of components on PCB pads, essential for the mass production of PCB boards.

PCB Brushing Machine:

  • We have discussed the vias drilling, so after the drilling process, we have debris deposited on the PCB boards.
  • This debris is removed by the PCB brushing machine.

Pick-and-Place Machine:

  • Pick-and-Place Machine picks up the components, rotates them in the required direction and places them on the PCB board.

PCB cleaning machine:

  • It does all the necessary cleaning of the board.
  • It also ensures that the board is dry and free from any form of moisture.

Reflow oven:

  • It contains a lot of burners and is used to smooth the soldering process.
  • There are three types of Reflow ovens available:

  1. Vapor Phase Oven.
  2. Infrared Oven.
  3. Convection Oven.

Now, let's have a look at the different types of Surface Mount Methods:

Types of Surface Mount Technology


Type I

    • Only SMD components are found in this type of PCB board.

    Type II

    • Active surface mount devices and DIPs are located on the primary side of the PCB while the surface mount chips are on the secondary side of the board.

    Type III

    • In this type, you will find passive SMCs on the secondary side of the board while the primary side is made of the DIPs only.
    • It contains only discrete mount components and they are all mounted on the bottom side.
    • The discrete components include; transistors, resistors, capacitors etc.

    Applications of the SMT components

    With SMT technology, it has become possible to produce very compact and small-size boards, since machines are used to pick and place the components. Therefore, SMT technology has numerous applications in real-life fields, few are as follows:

    1. Smartphone Evolution: Smartphone boards are quite small in size but complex in design because mobile phones need to be thin and light therefore, this technology has aided a lot in the evolution of the smartphone industry.
    2. Computer and laptop motherboards: It has helped in the production of ultrathin laptops, tablets and computers.
    3. IoT Devices: With SMT technology, IoT has moved to another level since the production of embedded boards become easy and fast.
    4. Involved in the manufacturing of communication and telecommunication equipment i.e. Bluetooth, WiFi, Ethernet devices etc.
    5. Medical devices in aid of health screening.
    6. Finds applications in the transport area i.e. drones, space exploration equipment etc.

    Advantages of the SMT components

    1. They have very low RF interference because they don't have leads.
    2. It takes lower packaging materials and this is due to the advanced manufacturing that is being involved.
    3. If SMT boards are produced in panels(We will cover penalization in upcoming chapters), the process makes it easy to transport in bulk at a reduced cost.
    4. The production cost has been drastically lowered compared to that of the THT product of the equivalent magnitude.
    5. Component failure is very low due to the consistency of the fabrication process involved.
    6. Less expensive process and very economical due to the use of more advanced technologies like PCB Panelization and pick and placing mechanism.

    Disadvantages of the SMT components

    1. It is not the best method to mount high-wattage components because such components dissipate a lot of heat that may end up damaging the PCB board.
    2. This is made up of very tiny components and therefore if there is any damage to the circuit, it is very complex to repair/debug the board as compared to the THT components. This means time-consuming in repairing and also very expensive.
    3. This type of board cannot be used in a place where rough holding is involved.

    So, that was all for today. I hope you have enjoyed today's lecture. In the next lecture, we will have a look at the difference between these two mounting techniques i.e. THT vs SMT. Till then, take care. Have fun !!!

    Sending Data to Cloud with ESP32 and ThingSpeak

    The Internet of Things ( or IoT) is a network of interconnected computing devices such as digital machines, automobiles with built-in sensors, or humans with unique identifiers and the ability to communicate data over a network without human intervention.

    Hello readers, I hope you all are doing great. In this tutorial, we will learn how to send sensor readings from ESP32 to the ThingSpeak cloud. Here we will use the ESP32’s internal sensor like hall-effect sensor and temperature sensor to observe the data and then will share that data cloud.

    Where To Buy?
    No.ComponentsDistributorLink To Buy
    1ESP32AmazonBuy Now

    What is ThingSpeak?

    Fig. 1: ESP32 ThingSpeak

    It is an open data platform for IoT (Internet of Things). ThingSpeak is a web service operated by MathWorks where we can send sensor readings/data to the cloud. We can also visualize and act on the data (calculate the data) posted by the devices to ThingSpeak. The data can be stored in either private or public channels.

    ThingSpeak is frequently used for internet of things prototyping and proof of concept systems that require analytics.

    Features of ThingSpeak

    • ThingSpeak service enables users to share analyzed data through public channels: Users can view multiple options on their channels via the settings panel. The tab displays sharing options, allowing the user to make their channel private, public or shared with specific users. Professionals can import and export data through their channels as well.
    • ThingSpeak allows professionals to prepare and analyze data for their businesses: Weather forecasters use the MATLAB Analysis app to prepare, analyze, and filter data, such as estimating average humidity or calculating dew point. Users can use the visualization and analysis applications to perform operations on live or historical data by using template codes. To enable modular coding, industry professionals can add new functions to the software. Companies can use ThingSpeak Analysis to read stored data or write new data to their private channels. They can scrape numbers from various web pages thanks to the URL filter.
    • ThingSpeak updates various ThingSpeak channels using MQTT and REST APIs: Professionals in the industry also use the platform to analyze and chart numerical data sent from smart devices and stored on various channels. Business owners can update their feeds, clear, or delete their channels entirely by using REST API calls like POST, GET, DELETE, or PUT. MQTT Publish methods allow users to update their feeds, whereas MQTT Subscribe methods allow them to receive messages.

    Preparing Arduino IDE for ESP32 and ThingSpeak

    • We are using Arduino IDE to compile and upload code into the ESP32 module. To know more about Arduino IDE and how to use it, follow our previous tutorial i.e., on the ESP32 programming series.

    Downloading and installing the required Library file:

    • Follow the link attached below to download theThingSpeak Arduino library:

    https://github.com/mathworks/thingspeak-arduino

    • Open the Arduino IDE.
    • Go to Sketch >> Include Library >> Add .ZIP Library and select the downloaded zip file.

    Fig. 2: Adding ThingSpeak Library

    To check whether the library is successfully added or not:

    • Go to Sketch >> Include Library >> Manage Libraries

    Fig. 3

    • Type thingspeak in the search bar.

    Fig. 4: Arduino IDE Library Manager

    • The ThingSpeak library by MathWorks has been successfully downloaded.

    This library comes with multiple example codes. You can use any of the example codes as per your requirements ad also modify the example code.

    Fig. 5: Example Codes

    Getting Started with ThingSpeak

    • To create an account or log in to ThingSpeak (operated by MathWorks) server follow the link: https://thingspeak.com/
    • Click on Get Started for free.

    Fig. 6: Getting Started For Free

    • Enter your details to create a MathWorks account as shown below:

    Fig. 7: Create New Account

    • If you have already created a MathWorks account, then click on Sign in.

    Fig. 8: MathWorks Sign in

    • Create a channel by clicking on the New Channel

    Fig. 9: New Channel

    • Enter the respective details in the channel.
    • As we already mentioned, we will use ESP32’s inbuilt sensors, Hall and temperature sensor to take the readings and then publish them to the ThingSpeak server.
    • So we are using two files, field1 and field2 for temperature and hall readings respectively.
    • You can use/enable more than two fields as per your requirements.

    Fig. 10: Enter the Details in Channel

    • Click o the save button to save the channel details.

    Fig. 11: Save the channel

    • After successfully saving the channel, a new window will open containing the channel details and Channel Stats.

    Fig. 12: Channel Stats

    • In the same window, go to API Keys which contains the Write API keys and Read API keys.
    • Copy the Write API key and paste this in ESP32 Arduino code to send the sensor values to ThingSpeak.
    • You can also customize the chart in Private View. Click on the icon present at the top-right menu of Field Chart (in red box) to edit the chart.
    • Edit the details as per your requirements and click on the save button to save the details.

    Fig. 13: Field Chart Edit

    Arduino Code

    We have already published a tutorial on the ESP32 hall sensor and internal temperature sensor.

    // ------style guard ----

    #ifdef __cplusplus

    extern "C"

    {

    #endif

    uint8_t temprature_sens_read();

    #ifdef __cplusplus

    }

    #endif

    uint8_t temprature_sens_read();

    // ------header files----

    #include <WiFi.h>

    #include "ThingSpeak.h"

    // -----netwrok credentials

    const char* ssid = "SSID"; // your network SSID (name)

    const char* password = "PASSWORD"; // your network password

    WiFiClient client;

    // -----ThingSpeak channel details

    unsigned long myChannelNumber = 1;

    const char * myWriteAPIKey = "API Key";

    // ----- Timer variables

    unsigned long lastTime = 0;

    unsigned long timerDelay = 1000;

    void setup()

    {

    Serial.begin(115200); // Initialize serial

    WiFi.mode(WIFI_STA);

    if(WiFi.status() != WL_CONNECTED)

    {

    Serial.print("Attempting to connect");

    while(WiFi.status() != WL_CONNECTED )

    {

    WiFi.begin(ssid, password);

    delay(1000);

    }

    Serial.println("\nConnected. ");

    }

    ThingSpeak.begin(client); // Initialize ThingSpeak

    }

    void loop()

    {

    if ((millis() - lastTime) > timerDelay )

    {

    int hall_value = 0;

    float temperature = 0;

    hall_value = hallRead();

    // Get a new temperature reading

    temperature = ((temprature_sens_read()-32)/1.8 );

    Serial.print("Temperature (ºC): " );

    Serial.print(temperature);

    Serial.println("ºC" );

    Serial.print("Hall value:" );

    Serial.println(hall_value);

    ThingSpeak.setField(1, temperature );

    ThingSpeak.setField(2, hall_value );

     

    // Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up to 8 different

    // pieces of information in a channel. Here, we write to field 1.

    int x = ThingSpeak.writeFields(myChannelNumber,

    myWriteAPIKey );

    if(x == 200)

    {

    Serial.println("Channel update successful." );

    }

    else

    {

    Serial.println("Problem updating channel. HTTP error code " + String(x) );

    }

    lastTime = millis();

    }

    }

    Code Description

    • Style guard is used at the beginning to declare some function to be of “C” linkage, instead of “C++” Basically, to allow C++ code to interface with C code.

    Fig. 14: Style Guard

    • Add the required header files.
    • We have already discussed above how to download and add the ThingSpeak library file to Arduino IDE.

    Fig. 15: Libraries

    • Enter the network credentials (SSID and Password).

    Fig. 16

    • A Wi-Fi client is created to connect with ThingSpeak.

    Fig. 17

    • Define timer variables.

    Fig. 18

    • Add the channel number and API (Write) Key. If you have created only one channel then the channel number will be ‘1’.

    Fig. 19

    Setup()

      • Initialize the Serial monitor with a 115200 baud rate for debugging purposes.

    Fig. 20

    • Set ESP32 Wi-Fi module in station mode using mode() function.
    • Enable ESP32’s Wi-Fi module using begin() function which is using SSID and password as arguments.
    • Wait until the ESP32 is not connected with the wifi network.

    Fig. 21

    • Initialize the ThingSpeak server using begin() function that is passing client (globally created) as an argument.

    Fig. 22

    Loop()

      • Inside the loop() function, define an integer type variable to store the hall sensor readings.

    Fig. 23

    • Define another float type variable to store temperature readings.

    Fig. 24

    • Call the hallRead() function to store the hall sensor readings into hall_value

    Fig. 25

    • Temperature_sens_read() function is used to read the temperature of ESP32 core.
    • Temperature observed by the internal temperature sensor is in Fahrenheit
    • o convert observed temperature i.e., in Fahrenheit into Celsius :

    (F-32) *(5/9) = degree Celsius

    Fig. 26

    • Print the temperature in degree Celsius and Hall sensor observations on serial moitor.

    Fig. 27

    • Set the number of fields you have created to the thingSpeak server. We are adding only two fields. You can add up to maximum of 8 fields for different readings.

    Fig. 28

    • writeFields() function is used to write data to the ThingSpeak server. This function is using the channel number and API key as an argument.

    Fig. 29

    • Return the code 200 if the sensor readings are successfully published to ThingSpeak server and print the respective results on the serial monitor.

    Fig. 30

    Testing

    • Connect the ESP32 module with your laptop using USB cable.
    • Select the right development board in Tools >> Boards >> DOIT ESP32 DevKit V1.
    • Compile and upload the code into ESP32 using Arduino IDE.
    • Make sure that you have entered the right Wi-Fi credentials, API key and channel number before uploading the code.
    • Open the ThingSpeak website where you have created a channel and check the sensor readings.
    • A screenshot of the field chart we have created is show below. Where you can see the temperature and hall sensor values on the chart.

    Fig. 31: ThingSpeak Channel Stats

     
    • To see the sensor values on Arduino IDE open the serial monitor with a 115200 baud rate.

    Fig. 32: Results on the Serial Monitor

     

    This concludes the tutorial. I hope you found this of some help and also to see you soon with new tutorial on ESP32.

    Significant Reasons for Investing in IoT Application Development

    We all have heard of this term by now. IoT or the Internet of Things is an ingenious yet innovative technology that is the support system for uncountable apps in almost all sectors.

    With the ever-increasing demand for higher technology, there has been a rapid growth in the field of IoT. You would require a professional IoT app development company for implementing the correct connected technology solution for your business.

    As we are moving towards and becoming the tech generation, it's exciting to know how IoT Application Development has a huge Market Potential - wondering how it is possible? Let us tell you more.

    Do You Know?

    Let us tell you a fun fact. Worldwide there are about 9 billion Internet of Things (IoT) devices connected in 2020, which is expected to grow up to 25 billion in 2030.

    In addition to this, we will also see a tremendous increase in the earnings & profit that would be generated by IoT and it is capturing all fields and sectors with speed equal to light and would soon become a major life-important technology.

    Still not convinced enough to invest in IoT Application Development? Well, let us help you!

    Why IoT Application Development? 

    Familiar with these above questions? Don't worry; we have got your back!

    The Internet of things has the potential to turn your home into a smart home and make processes automated. It's the world of 5G, and thus both IoT and 5G technologies, when combined, can result in super-advanced technologies and techniques. With each passing day, IoT Application Development services come to life and make more sense than previous days. IoT in the construction industry can boost work productivity and get access to real-time reporting. It can say that it covers almost every aspect!

    Facts to know about the upcoming IoT culture & Investments 

    • Speaking of May 2020, there was an investment of over $5 billion in IoT applications. This entire investment was made by 2,550 Europeans.
    • There has been a trend about smart home appliances. Following this, by the end of next year, i.e., 2023, everyday consumers are expected to spend $150 billion on smart home solutions.

    Key Factors to Capitalize and Put Funds in IoT App Development

    Not only are the ones listed above, but there are many reasons why companies invest in IoT Application development.

    1) Brings in Golden Opportunity for Start-ups:

    To all the Start-up owners, this is for you. IoT applications are the need of the hour because they solve inefficient, slow, and costly processes that many enterprises of different industries were bearing previously. Therefore, many prominent global companies acquire the start-ups for their ideas and promising innovations so that they can integrate them with their existing operation to get better work efficiency performance and increase the turnover while decreasing the cost.

    2) Enhanced work productivity and cost efficiency:

    IoT sensors and devices can automate various routine operations, making it possible to have minimum human participation. It also reduces the amount of time required to complete a task. Hence it makes the processes more productive and cost-efficient.

    3) Employees advantages:

    IoT makes things simple for employees too. It helps them perform complex tasks that might take long hours of effort and work to be completed in minutes. Some of the advantages are:

    • It provides real-time data for any emergencies.
    • It makes it possible for employees to act on any incidents as quickly as possible.
    • Improves work efficiency of employees and makes them less prone to make any mistakes.
    • Enables them to work remotely.

    4) Reduces Risk:

    IoT sensors can save you from significant breakdown risks. IoT sensors predict future equipment failures based on several factors.

    This helps the responsible personnel take care of the faulty spare parts without affecting the whole operation.

    And applying machine learning to collect data helps employees to determine the exact service time of each part of the machine that leads to efficiency in the investment of equipment.

    Process of IoT System development and application:

    • Ideation:  The process starts with your idea of the IoT product. Your vision must be as precise as possible to have a clear picture.
    • Pass it through the Market: Take your idea to your potential customers and get their feedback. See if your IoT product is actually feasible and needed.
    • Choose your Platform: Choose the stack technology on which your IoT product will be based.
    • Select the Hardware: Select the best hardware components that will fit your IoT product.
    • Make it scalable: The software you build for your IoT should be scalable and has the capability to support both on-premise and cloud infrastructure.
    • Speed of your IoT: Your product should be able to process data at high speed, especially if you're building an IoT for commercial purposes.
    • Privacy and Data Security: It is necessary that your IoT product is designed keeping in mind the privacy and data security of your users. Your customers will show trust in you only when they will feel like their information and data are safe with your IoT.
    • Test your final product: Before launching your IoT for the public, run numerous tests and have a pilot launch with limited people access to the app to make sure that there are no bugs.
    • Customer feedback: It is essential for the betterment of your IoT development and application that you get feedback from your customers regarding the app. Provide them with multiple channels to receive feedback,

    Key Takeaways

    Above, we have discussed the reasons to invest in IoT application and development and why big firms have ever-growing interests in IoT investment. IoT products and devices are becoming a vital part of every industry day by day, and soon they will become a necessity.

    Many IT companies offer IoT application development services that help businesses to gain real-time data and insights to analyze their areas of improvement and increase revenue by reducing their costs.

    So, if you are an IT start-up that is looking to revolutionize the industry, then all you need is to innovate an IoT product that solves industries' problems and delivers the results.

    ESP-NOW Protocol with ESP32 and ESP8266

    Hello readers, I hope you all are doing great. In this tutorial, we will learn about the ESP-NOW protocol and how to communicate data between two ESP modules through ESP-NOW protocol and that is too without Wi-Fi connectivity.

    Where To Buy?
    No.ComponentsDistributorLink To Buy
    1ESP32AmazonBuy Now

    What is ESP-NOW Protocol?

    Fig. 1: ESP-NOW Protocol

    ESP–NOW is a connectionless communication protocol that is used for sharing small data packets between two ESP boards. This protocol is developed by Espressif.

    Features of ESP-NOW Protocol:

    • It is a low-power wireless protocol, which makes two or more ESP devices communicate directly with each other without using Wi-Fi.
    • ESP-NOW protocol does not require a handshake for establishing a connection but, they require pairing and once the devices are paired they can exchange data.
    • ESP-NOW offers a persistent connection between ESP nodes. This means, once two ESP nodes are connected with each other (wirelessly) and suddenly one of the ESP devices loses power or restarted, the device will again (automatically) establish a connection with the other node to which it was connected before the power reset.
    • ESP- NOW protocol offers encrypted communication and hence, it is a secure method of wireless communication.
    • To check the success and failure of message delivery a callback function is used to send the information regarding the communication status. Before initializing the ESP-NOW, we need to enable the Wi-Fi for wireless connectivity but it is now required to connect the ESP devices with the internet.

    ESP-NOW Protocol Limitations:

    • This protocol is only supported by ESP devices.
    • Only 10 (maximum) encrypted peers are supported in station mode and a maximum of 6 devices in access point mode.
    • The maximum payload size supported by ESP-NOW protocol is 250 bytes only.

    Although, ESP-NOW protocol can communicate only small data packets ( maximum 250 bytes), but it is a high-speed protocol for wireless communication.

    ESP devices can communicate over ESP-NOW protocol in different network topologies which makes it a very versatile protocol. The communication can be a point to point or point to multipoint (broadcast).

    Different Scenarios in Which ESP Devices Can Communicate

    Peer to peer or one to one communication

    Fig. 2: Point to Point Communication

    In peer-to-peer communication, only two ESP (either ESP32 or ESP8266) devices can connect with each other for data exchange. Each ESP device can act as a master device, a slave device or both master and slave at the same time.

    Broadcast or one to many (master and slave)

    Fig. 3: ESP32 Broadcasting with ESP-NOW protocol

    In broadcast one ESP device (known as a broadcaster) act as a master device and broadcast the data to ESP devices acting as slave devices. Data is shared with all the slave devices simultaneously.

    This communication method is used when users want to control multiple slave devices at a time.

    Many to one. (Gateway)

    Fig. 4: Many to One Communication

    In many to one communication scenarios, there will be a central node or gateway which collects all the data from its nearby connected ESP devices.

    This scenario can be applied when you need to collect sensor data from various sensor nodes to a single collector or central device, which is connected to all the nearby sensors.

    Application of ESP-NOW Protocol

    • ESP-NOW protocol is used when users need to communicate data between two or more ESP devices without using a Wi-Fi router (whether it is ESP32 or ESP8266).
    • This protocol can be used for industrial or residential automation applications. Where we need to transmit small data or instructions like to turn ON and OFF equipment without using Wi-Fi. For example smart lights, sensors, remote control devices etc.

    MAC Address to Identify The Receiver

    MAC address or Media Access Control address is a six-byte hexadecimal address, that is used to track or connect with devices in a network. It provides the user with a secure way to identify senders and receivers in a network and avoid unwanted network access.

    Fig. 5: MAC Address

    Each ESP device has a unique MAC address.

    So, before sharing the data between two or more ESP devices the MAC address of the receiver device should be known to the sender device.

    Implementing ESP-NOW protocol with ESP32 in Arduino IDE

    Both, the ESP32 and ESP8266 modules support the ESP-NOW protocol.

    In this tutorial, we will connect the ESP32 and ESP8266 using the ESP-NOW protocol.

    • We are using Arduino IDE as a compiler and upload into the ESP32 module. To know more about Arduino IDE and how to use it, follow our previous tutorial i.e., on the ESP32 programming series.

    Fig. 6: ESP-NOW Example Code in Arduino IDE

    Library file Required to implement ESP-NOW Protocol:

    • Download the library from the given link: https://github.com/yoursunny/WifiEspNow
    • In this example, we are using two ESP devices where one is ESP32 and another is ESP8266.
    • We will make ESP32 to act as a Master device and ESp8266 as slave device.

    Sender (ESP32) Source Code

    #include <esp_now.h>

    #include <WiFi.h>

    // REPLACE WITH YOUR RECEIVER MAC Address

    uint8_t broadcastAddress[] = {0xEE, 0xFA, 0xBC, 0xC5, 0xA4, 0xBF};

    typedef struct struct_message {

    char a[32];

    int b;

    float c;

    bool d;

    } struct_message;

    // Create a struct_message called myData

    struct_message myData;

    // callback when data is sent

    void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) {

    Serial.print("\r\nLast Packet Send Status:\t");

    Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail");

    }

    void setup() {

    // Init Serial Monitor

    Serial.begin(115200);

    // Set device as a Wi-Fi Station

    WiFi.mode(WIFI_STA);

    // Init ESP-NOW

    if (esp_now_init() != ESP_OK) {

    Serial.println("Error initializing ESP-NOW");

    return;

    }

    // get the status of Trasnmitted packet

    esp_now_register_send_cb(OnDataSent);

    // Register peer

    esp_now_peer_info_t peerInfo;

    memcpy(peerInfo.peer_addr, broadcastAddress, 6);

    peerInfo.channel = 0;

    peerInfo.encrypt = false;

    // Add peer

    if (esp_now_add_peer(&peerInfo) != ESP_OK){

    Serial.println("Failed to add peer");

    return;

    }

    }

    void loop()

    { strcpy(myData.a, "THIS IS A CHAR");   // Send message via ESP-NOW esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &myData, sizeof(myData));   if (result == ESP_OK) { Serial.println("Sent with success"); } else { Serial.println("Error sending the data"); } delay(2000); }

    Code Description

    • The first step is including the required libraries or header files.

    Fig. 7: Library Files

    • Replace the string with the MAC address of the receiver ESP device.

    Fig. 8: MAC Address

    • The next step is creating a structure that contains the type of data you want to share with the receiver node or device. We are using four different data variables which include char, int, float, and bool. You can the data type according to your requirements.

    Fig. 9: Variables

    • Create a variable of struct_message type to store the variable values. We created myData

    Fig.10

    • onDataSent() function is a callback function which will be executed when a message is sent. This function will print a string on serial monitor to show that the message is successfully sent.

    Fig. 11

    Setup()

      • Inside the setup function, the first task is the usual one i.e., initializing the serial monitor for debugging purpose.
      • Set the ESP device in STA mode or in Wi-Fi station mode before initializing ESP-NOW.

    Fig. 12: Serial monitor and Wi-Fi Initialization

    • Next step is, initializing ESP-NOW.

    Fig. 13

    • A callback function is registered which will be called when a message is send (after initializing the ESP-NOW successfully).

    Fig. 14

    • The next thing is pairing with another ESP-NOW device to communicate data.

    Fig. 15: Pairing with the ESP8266 Receiver

    • esp_now_add_peer () function is used to pair with the receiver.
    • This function is passing a parameter called This parameter contains the MAC address of the receiver (ESP8266) to which the sender want to connect and communicate data.
    • If somehow the sender is not able to pair with the receiver ESP device, the result will be printed on the serial monitor.

    Fig. 16

    Loop()

    • In the loop() function, the message will be sent.
    • We have globally declared a structure variable myData.
    • In the loop function values or message that we want to share with the receiver ESP device (ESP8266) is assigned to the variables.

    Fig. 17: Data to Be Shared

    • If the ESP32 (or sender) is successfully connected/paired with the receiver (ESP8266) send the message and once the message is sent, print the result on the Serial monitor.

    Fig. 18

    • Esp_now_send() function is used to send data to receiver (i.e., ESP8266) over ESP-NOW protocol.
    • This function is passing two parameters. First is the broadcastAddress i.e. the MAC address of the receiver and another is the data stored in the variables.

    Fig. 19: Send The Message

    • If there is some error in message sending then print the respective details on the serial monitor.
    • The next message will be sent with a delay of 2 sec (or 2000ms).

    Fig. 20

    ESP8266 (Receiver) Code

    #include <WifiEspNow.h>

    #if defined(ARDUINO_ARCH_ESP8266)

    #include <ESP8266WiFi.h>

    #elif defined(ARDUINO_ARCH_ESP32)

    #include <WiFi.h>

    #endif

    // The recipient MAC address. It must be modified for each device.

    static uint8_t PEER[]{0x02, 0x00, 0x00, 0x45, 0x53, 0x50};

    void printReceivedMessage(const uint8_t mac[WIFIESPNOW_ALEN],

    const uint8_t* buf, size_t count, void* arg)

    {

    Serial.printf("Message from %02X:%02X:%02X:%02X:%02X:%02X\n", mac[0], mac[1], mac[2], mac[3],

    mac[4], mac[5]);

    for (int i = 0; i < static_cast<int>(count); ++i) {

    Serial.print(static_cast<char>(buf[i]));

    }

    Serial.println();

    }

     

    void setup()

    {

    Serial.begin(115200);

    Serial.println();

    WiFi.persistent(false);

    WiFi.mode(WIFI_AP);

    WiFi.disconnect();

    WiFi.softAP("ESPNOW", nullptr, 3);

    WiFi.softAPdisconnect(false);

    Serial.print("MAC address of this node is ");

    Serial.println(WiFi.softAPmacAddress());

    uint8_t mac[6];

    WiFi.softAPmacAddress(mac);

    Serial.println();

    Serial.println("You can paste the following into the program for the other device:");

    Serial.printf("static uint8_t PEER[]{0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X};\n", mac[0],

    mac[1], mac[2], mac[3], mac[4], mac[5]);

    Serial.println();

    bool ok = WifiEspNow.begin();

    if (!ok) {

    Serial.println("WifiEspNow.begin() failed");

    ESP.restart();

    }

    WifiEspNow.onReceive(printReceivedMessage, nullptr);

    ok = WifiEspNow.addPeer(PEER);

    if (!ok) {

    Serial.println("WifiEspNow.addPeer() failed");

    ESP.restart();

    }

    }

    loop()

    {

    char msg[60];

    int len = snprintf(msg, sizeof(msg), "hello ESP-NOW from %s at %lu",

    WiFi.softAPmacAddress().c_str(), millis());

    WifiEspNow.send(PEER, reinterpret_cast<const uint8_t*>(msg), len);

    delay(1000);

    }

    Code Description

    • This code can be used for both ESP8266 as well as ESP32 receivers.
    • The first task is adding the required libraries.
    • h is for enabling wireless connectivity in ESP8266 and WiFi.h is for ESP32 module (if you are using this device).
    • h is to enable the ESP-NOW protocol and its respective function is the ESP device.

    Fig. 21: Header files in Receiver Code

    • printReceivedMessay() function is used to fetch the message details transmitted by ESP32 (sender node), and the MAC address of the transmitter.
    • If you are receiving data from multiple sender nodes then a unique MAC address will be fetched from multiple sender nodes along with the message received.

    Fig. 22

    Setup()

    • Initialize the serial monitor with a 115200 baud rate for debugging purposes.
    • Wi-Fi should be enabled to implement the ESP-NOW protocol and wireless connectivity. It could be either AP or STA mode and does not require to be connected.

    Fig. 23: Serial Monitor Wi-Fi Initialization

    • Print the MAC address of the sender on the serial monitor.

    Fig. 24

    • Initialize the ESP-NOW using begin() function.
    • If somehow the ESP device is unable to initialize the ESP then print the respective details on the serial monitor.

    Fig. 25

    • Once ESP-NOW and Wi-Fi are successfully initialized, the ESP receiver (ESP8266) is ready to receive the data packets from sender.

    Fig. 26

    • Testing (Receiving a message in ESP8266 from ESP32 )
    • Select the ESP8266 development board you are using in Arduino IDE.
    • For that, go to Tools >> Boards and select the right development board.
    • We are using the ESP8266 Generic module as shown below:

    Fig. 27: Selecting The ESP 8266 Development Board

    • Upload the Receiver code in the ESP8266 module.
    • Open the serial monitor with a baud rate of 115200.
    • Press the reset (Rst) button from the ESP8266 development board.
    • MAC address of the receiver will be printed on the serial monitor as shown below:

    Fig. 28: MAC Address of Receiver

    • Copy the MAC address of the receiver and paste into the sender (ESP32) code.
    • Again change the development board from ESP8266 to ESP32.

    Fig. 29: Selecting ESP32 Board in Arduino IDE

    • Upload the code into sender (ESP32).
    • Open the serial monitor with a 115200 baud rate.
    • Press the enable (EN) button from the ESP32 development board.
    • Results are shown below:

    Fig. 30: Message Sent

    • If you want to read the data received at ESP8266, remove the ESP32 and power it with a different power source.
    • Connected the ESP8266 with a laptop.
    • Again select the ESP8266 development board on Arduino IDE’s Tools >> Boards
    • Open the serial monitor with a 115200 baud rate.
    • Press the reset (RST) button from the ESP8266 developments board.
    • Results are shown below:

    Fig. 31: Message Received

    This concludes the tutorial. I hope, you found this helpful and I hope to see you soon for the new ESP32 tutorial.

    Syed Zain Nasir

    I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

    Share
    Published by
    Syed Zain Nasir