All Mowers - WiFi & APP

Overview

To operate the mower via Smatphone we are going to connect the mower to the home WIFI network.  To do this we will use a NodeMCU board and the BLYNK APP.

This means of course that your mower needs be able to receive WIFI in your garden.  The wiring diagram for the NODEMCU board which is used to handle the WIFI function can be found in the circuit diagrams for the mower

 

Blynk Legacy / 2.0 IoT

Recently the Blynk APP was updated to a new version and the legacy version of Blynk has now been shutdown.  This means all APPs need to be created with Blynk2.0.

Blynk2.0 offers a free plan with some limitations on what can be used in the APP (number of datastreams and number of APPs).  Even with these limitations the APP provides all we need to create a powerful smartphone APP for the mower project.

 

With the APP we will be able to Start/Stop/Dock the mower, see the voltage, manually steer the mower, choose which mow pattern the robot will use and adjust some of the settings..

 

 

Heres a video great tutorial on all the steps I'll describe below (for a basic starter app).  In summary we will create a Template and define the datastreams.  Then use these defined datastreams in the smartphone app to link the buttons to the actions.  

You will only be able to run the Blynk2.0 APP using the Robot Code V9.751 and above

 

Step 1: Create Account

Go to https://blynk.cloud using a Web browser and create a new account.  then Log In.  Blynk2.0 uses a browser interface to configure the App.

 

Step 2: Create Template

Create a    + New Template    .Here you will create and configure all of the buttons and variables on the website for the mobile APP.  All these details will be transferred to the mobile app automatically.  

Now add details to the template as shown:

Name: ReP AL Mower Free (or whatever you want)
Hardware: ESP8266  (For the NODEMCU)
Connection Type: WiFi
Description: Here you can write whatever.

 

 

 

Step 3: Create Datastreams

Now we need to create the channels of communication between the APP and NodeMCU.  These are called datastreams.  Each datastream needs to be configured so it can send the correct information to the NodeMCU.

We will create 8 datastreams with the variables below. 

Please use the exact same Name, Pin Numbers, Data Type and Min/Max ranges for each datastream as shown below. Color is not important.

Carefull!
The LCD datastreams use the Data Type String
The Slider datastreams have a Min = 1 and Max = 3 
  
Dont worry about the Id number.  If you delete something as you made a mistake and create a new datastream you may get a different Id number assigned, but this is not important.
 

The Datastreams can be configured using the settings 

 

If for some reason you didn't note down the Template ID codes for the NodeMCU you can find these in the Info Tab on the template.

The template should now be finished and it can be saved.

 

Step 4: Create New Device

In the main menu of the web browser we now create a + New Device  (The Free plan of Blank2.0 allows for 2 devices to be created)

Select From template and you should see the template you just created.  Select it.

 

 

 

Step 5: App ID and Name Codes

When you create the new device you will be given a Template ID and Template Name.  

 

You will need to copy this a paste it into the NODEMCU_VX.XX_Blynk_New_Free Arduino sketch.  This sketch is in the Robot X.XXX Arduino Code pack on the Arduino Downloads Page

 

Once the code is inserted, upload the sketch to your NodeMCU.   Select NodeMCU 1.0 as the board type in Arduino IDE when uploading the code

 

 

The NodeMCU will now create a WIFI hotspot and the Blynk APP will attempt connect to it.  Here the WIFI details will be exchanged and that NodeMCU will be paired to the the Blynk APP.  (If it doesn't connect, open your WiFi settings in your phone and connect to the WiFi hotspot the NodeMCU has created.  Then try the process again)

 

 

Step 6 - Create the APP on your phone.

Download the Blynk APP to your smartphone.  In the app options bar you have the option to Add a new device ON your APP (you should see the Mower App you created in the web browser).  

 

Now add and arrange the following + WIDGETS on the APP screen.  You will need 4 buttons, 2 LCD Screens and 2 sliders.  Once you have arranged and sized the widgets you can assign the datastreams to these widgets. 

 

 

Be careful to assign the correct datastreams to each widget and ensure the settings are as in the picture above. 

 

Step 7 - App Design

In the Design section of the WIDGETS the buttons can be labeled

Buttons

For the arrow key buttons I used the >  <  and / \  (backslash forward slash close together) icons to create the arrows.  These are put in the OFF Labels and center aligned.

The buttons title will be controlled by the NodeMCU as different button titles will be given depending on the APPs status.

Sliders

The Sliders Text will be controlled by the NodeMCU to give the relevant text for the current mode.  The text blocks can be modified in the NodeMCU code.

 

 

The APP should now be created and ready to use.

 

APP Theme Customisation.

I like the dark mode in apps.  I then changed the buttons colour to match the mowers printed covers colour.  There are countless possibilities for button shapes, colours and sizes in the APP.  Have a play around and see what theme you like best for your APP.

 

 

Legacy App being Tested by maker _Greg_

 

 

 

Basic APP Features:

The APP will give you access to the mower anywhere you have a cell phone data or wifi connection.

Please be patient with the buttons.  You will need to give the mower time to execute the command.  Pressing many buttons at once will just confuse it :)

 

In Automatic Mode these features can be used.

Start - Will start the mower (cant be used if the mower is docked)

Pause/Stop - Parks the mower and can be restarted with Quick Start

Exit Dock - Reverses the mower out of the docking station and tracks the garden to Zone 1. (Reverse movement can be modified in the code to suit)

Goto Dock - Stops the mowing and sends the mower back to the dock using the perimeter tracking feature.

Random   - Mows the garden in a random pattern mode

Parallel   - Mows the garden with a parallel pattern (under development)

Spiral  - Mows the garden with interlinked spirals

 

 

Auto  - Mower in automatic mode

Manual  - Arrow keys can be used to drive the mower

SETUP  - Allows some of the mower settings to be adjusted via a scrolling LCD menu and arrow keys