Serial UART And How It Works

If you have read through the Arduino Serial guides you should now have a good grasp on using serial communication but did you ever stop to ask yourself what actually is serial UART? If you did you are in the right place. UART stands for Universal Asynchronous Receiver-Transmitter which probably doesn’t help explain what it … Read more

Simple Serial Monitor

Simple Serial Monitor is yet another stand alone replacement for the Arduino serial monitor. It is text only and is far from being a fully fledged terminal app. It does have a couple of features that make it a little better than the regular Arduino serial monitor, especially when used with UART modules like the … Read more

Arduino and Visual Basic Part 3: Send And Receive Serial Data Between An Arduino And Visual Basic

Although Part 2 was more advanced than part 1, part 2 still only sent data one-way, from the Arduino to the Visual Basic app, and the data was very basic. It’s time to spice things up with more complex commands and 2-way communication. Although I used the sketch and Visual Basic app from the previous … Read more

HM-10 Programmable Pins

The HM-10 has 10 pins that can be user controlled, a couple are input only, the others can be input or output. Unfortunately, the pins we can control are not available on the breakout board so we need to attach a connection directly to the actual HM-10 (the small daughter board). Pin function The pins … Read more

HM-10: Add A Second Custom Characteristic

HM-10: Add a second Custom Characteristic By default the HM-10 comes with a single custom characteristic under a custom service. A second write only characteristic can be added using the “AT+FFE2” command. “AT+FFE2” was added in firmware 5.45 and extended in version 5.50. The second custom characteristic only has a WRITE property no READ and … Read more

HM-10 As An iBeacon

What is a iBeacon You can think of a iBeacon as an electronic light house. It simply sends out timed signal letting people know it is there. When an app on a mobile device constantly finds a signal it can react is a specific way. For example, in a shop a special discount may be … Read more

HM-10: Use An Arduino To Talk To A HM-10

Have a HM-10 and want a chat with it? You need to know what to say and how to say it. Let’s try talking to a HM-10 with some of the more common AT commands Note: AT commands only work when the HM-10 is not connected to another wireless device. After a connection is made … Read more

HM-10: Updating the firmware

 
Note: Updating the firmware is non-reversable. Once you issue the OK+SBLUP command there is no going back.

There have been a lot of firmware updates since I originally did this post so I thought it was time to have an update. Updating the updating as you will.

Read more

Buying Bluetooth Modules

It’s been a while since I have done any real in depth tests on new Bluetooth modules. I keep buying them but never find the time to play with them, and fror my own projects I have started to move away from using Bluetooth and into using web apps (ESP82666 and ESP32). For the times … Read more

Arduino. Short Press. Long Press.

Using short presses and long presses together adds versatility and gives extra function to a single button switch. No longer are you restricted to pressed or not pressed. No. Now you have pressed a bit, pressed for a bit more. This guide follows on from the previous post about timing a button switch press and … Read more

Arduino. Time A Push Button Switch

AKA: Time How Long A Push Button Switch Is Closed. Ever wanted to know how long a button switch was pressed for? YES. Read on. A couple of examples that do exactly the same thing, time how long a button switch was closed/pressed, but in slightly different ways. Circuit Both examples below use the same, … Read more

ESP8266 and the Arduino IDE Part 10c: IOT Website. Add a LCD

25.06.2020: Updated the circuit diagrams.

So far I have kept to the plan.

1. Test the sensors with a basic sketch
2. Create a basic website using websockets to show the sensor data.
3. Enhance the website, add dials and a graph.
4. Add a LCD
5. Add Wifi Manager.
6. Maybe add time to the LCD version using a NTP server.
7. Put the project in to a stand

Sections 1 to 3 are complete and in this part I want to add a LCD.

Read more

ESP8266 and the Arduino IDE Part 10b: IOT Website. Enhancing the Website

 

Enhancing the Website

We are now ready to implement the final webpage.

The hard part is the html and javascript for the widgets. The code for the sketch is pretty much the same as in the previous example.

In the last post we ended with a working but very basic website. Now it’s time to make the webpage look nicer. Be aware that I am not a graphic artist and use the word nicer very loosely.

Read more

ESP8266 and the Arduino IDE Part 10a: IOT Website. Temperature and Humidity Monitor

It’s been a while since my last post on using the ESP8266 with the Arduino IDE. Life became busy and what free time I had I spent updating the dropController. Eventually guilt got the better of me though.

In previous posts we looked at various different things; using the ESP8266 to serve a webpage, using Wifi Manager to create a connect portal, creating a self updating page, using websockets, and more. Now we finally start putting everything together.

In part 8 we set up a self refreshing webpage that displayed the temperature and humidity from a DHT11. In part 9 we took a first look at websockets. In part 10 we combine the two and add a few embellishments.

Websockets can be fast, very fast, and since the webpage will not be updating very often this is not one of the best examples of websockets, it does continue the gentle introduction started last time though.

For a while now I have been wanting to create IOT/web widgets such as graphs and gauges. I wanted widgets similar to the things Blynk offers but I didn’t want the back end server. I wanted every thing self contained on the ESP8266. This project is the start of that.

The goal of this guide is to create a environment monitor station that has a LCD display and also a webpage using an ESP8266, a DHT11, a LDR, javascript, and websockets.

As always I will do this is steps so that each part is clear.

Read more

Arduino Serial Part 4: ASCII data and using markers to separate data

This page has been updated. Please see the following newer guides:

Introduction, Using The Serial Monitor, and More
A Look at the Different Serial Libraries
Serial Commands Explained
Serial Data
Getting Started With Using Serial Communication To Send Commands
ASCII Data and Using Markers to Separate Data

 
 
 
 

In part 3 we sent and received single characters to control LEDs using a fairly simple technique. If all you need is to remotely turn a few things on and off then this method is probably the best. It is simple, easy to program, and reliable. Sometimes though single characters are not enough and we need to use more complex commands or we may want to send sensor data that comprises more than one character.

In this post I look at a few different techniques for sending complex data and commands; starting with functions that are built in the Arduino language and moving to our own functions that, IMHO, perform better and allow for better code.

Read more

Arduino Serial Part 3: Getting started with serial communication

This page has been updated. Please see the following newer guides:

Introduction, Using The Serial Monitor, and More
A Look at the Different Serial Libraries
Serial Commands Explained
Serial Data
Getting Started With Using Serial Communication To Send Commands
ASCII Data and Using Markers to Separate Data

 
 
 
 

In the last post I briefly talked about different data formats and how I recommend keeping things as simple as possible. With this is mind for a first project let’s create a simple blinking LED. We will have one Arduino controlling an LED on a second Arduino. Controls to turn the LED on or off will be sent via serial from the first Arduino to the second Arduino. This is as basic as it gets. Arduino Blink by remote control. The LED has only two states so simple control codes can be used and to start I am using 1 of on and 0 for off.

In these examples I am using Arduino Nanos but any kind of Arduino can be used and for this series I am using Arduino to Arduino communication. The techniques are exactly the same for any UART to UART device. For example, in Arduino to Arduino by Bluetooth I use exactly the same serial communication techniques wirelessly over Bluetooth.

Read more