All Mowers - WiFi & APP - Blynk2.0
Blynk 2.0 IoT
Recently the Blynk APP was updated to a new version and the Blynk Legacy App is not accepting new accounts. These are the instructions to create the Blynk APP using the new 2.0 method
Creating the APP.
Heres a video great tutorial on all the steps I'll describe below (for a basic starter app).
1. Go to https://blynk.cloud using a Web browser and create a new account. then Log In. This uses a browser interface to configure the Apps details/datastreams.
2. 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.
3. Add details to the template as shown:
Name: ReP AL Mower (or whatever you want)
Description: Here you can write whatever.
4. The firmware configuration that's now given will need to be copied to the start of the NodeMCU Arduino code. Copy this code now and keep it safe or you can already add it to the Arduino code. This will link the NodeMCU to the App you create and allow you to update the WiFi credentials on the NodeMCU.
5. Now create the Datastreams. These are the details of each button or slider that we are going to create in the APP. Think of it like an address we can reference in the arduino code to reference widgets you add to the app. It also gives some boundaries of what that datastream can do. I.e. Max min values.
Once a datastream is created on the webpage, the details of that datastream are automatically sent to the APP on your phone once saved is pressed.
6. By clicking on + New Datastream and selecting virtual , datastreams can be added to the APP.
Here is the datastream for Pin V12 which will represent an LED widget on the mobile phone APP to show when the mower is charging.
It has been assigned the address/pin V12, is an integer value and can be the value 0 or 1. The LED colour is green.
Add the following datastreams to the Website. be careful to add the correct Pin, Units, Names etc.
7. A web dashboard can also be created which can then be accessed from your home network. This is done on the tab "Web Dashboard".
Smartphone APP Configuration
The Smartphone APP can be downloaded from the Google Play or Apple Store to your smartphone.
1. Open the app and login in to your Blynk account.
2. Press the spanner icon to enter the developer mode. You should see a box which represents the configuration you just made in the Web browser.
3. The Smartphone Blynk App can now be configured with widgets (elements of the apps) to control the robot. These widgets can be added to the APP screen and assigned the addresses we provided in the Web browser.
In the free version of the Blynk2.0 APP there are limited widgets to choose from, but we only need the button, LED, slider and tabs widgets to complete the APP.
4. Start by adding a tab widget. This will give us different pages like an excel sheet with tabs. Label the tabs Mower and Settings. Now add buttons and LED widgets as shown: The lower widget to select the mower mode is a slider.
5. Open the top left button. This will now be assigned the datastream for the pause stop function: As you open the datastream tab, you should see all the datastreams you cretaed in the web browser earlier. Choose the Pause / Stop Datastream
6. Slider Widget. As the Blynk 2.0 only gives limited widgets we will use the slider as a selector switch for the Mowing Mode Seg Switch Datastream. This should have been given the values properties 1-4 in the web browser configuration. To get the title text aligned over the switch use spaces between the words.
Auto Spiral Parallel Manual
NodeMCU board Config
We will now upload the code to the NodeMCU board, connect itto the Blynk App and then to the local WiFi Network.
Adding NODEMCU capability to the ARDUINO IDE
As the NODEMCU board is not in the standard list of boards to choose from in the Arduino boards menu, we need to add the NODEMCU & ESP functionality to the Arduino IDE. If you already have the ability to upload to NodeMCU boards you can slip this section.
1. In the Arduino IDE, settings menu add this URL address to the "Additional Boards Manager URL's" box, then press OK. This will give the Arduino IDE the download address to install the necessary software to communicate with the NodeMCU board.
2. To complete the download of the NODEMCU software go to the Board: menu in the Arduino IDE and select Boards Manager.
In the next window type ESP in the search field.
The ESP8266 should appear in the window.
Install the latest version of the ESP board software.
Once the download is completed you should now have NodeMCU 1.0 as an additional option in the boards menu.
2. Ensure all the latest Blynk libraries are installed. The BLYNK libraries are included in the libraries used folder from the GITHUB site so you should have all the libraries required already.
Alternatively you can download the BLYNK libraries from the BLYNK website if you want to ensure you are using the same libraries.
Upload Arduino Code to the NodeMCU
1. Open the NodeMCU code (Blynk new) in the Arduino IDE.
2. Copy the template ID and the Device Name from the Web APP into the code
3. Be sure to select the NodeMCU 1.0 (ESP -12E Module) in the Arduino IDE and the correct port number and upload the code to the board.
4. The NodeMCU will now create its own WiFi hotspot which can be connected to by the Blynk 2.0 APP to finish the configuration.
Connect NodeMCU to the Blynk App and WiFi network.
1. Open the Blynk APP and click + Add New Device. Choose Device Nearby.
2. Place the NodeMCU board near to the smartphone. The smartphone will now detect the WiFi hotspot created by the NodeMCU. The NodeMCU and APP will now connect.
3. The WiFi credentials for you home network can now be transfered to the NodeMCU.
4. After this step the NodeMCU may need to be reset to aid connection.