Lifely Agrumino Lemon User manual

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤1├
Agrumino Lemon Dev Guide
rev 1.2 _ENG
Autore: LifelyTeam
Versione: March 2021

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤2├
1 INTRODUCTION
This document provides a guide to install Agumino Board and its libraries. Moreover it
describes some example sketches, part of the Agrumino libraries.
2 INSTALLATION
2.1 INSTALL THE USB DRIVER
Modern Windows installations seem to automatically install the USB driver. If you’re on
another platform, like Mac OS/Linux/Android or Windows, which doesn’t recognize the Serial
Port automatically, you can download the official driver from here: CP2102 Driver.
2.2 INSTALL THE AGRUMINO BOARD ON ARDUINO IDE
The Agrumino board is based on an ESP8266 WiFi chip. The official programming
environment is Arduino, this is possible thanks to the Open Source project ESP8266 Core for
Arduino. We have forked this project and created a custom Agrumino core that includes all
the libraries needed by the example sketches to ease the installation procedure.
Arduino allows installation of packages using Boards Manager. The package is available for
Windows, Mac OS, and Linux (32 and 64 bit).
1. Install the latest version of the Arduino IDE available from the official Arduino website
at the following link: https://www.arduino.cc/en/software.
2. Then open Arduino Ide and click on File->Preferences and in the URLs text box enter
the following url:
http://arduino.esp8266.com/stable/package_esp8266com_index.json
into Additional Board Manager URLs field. You can add multiple URLs, separating
them with commas.
3. Open Boards Manager (Tools → Board→ Boards Manager and enter Esp8266), at
which point the screen below will be visible.

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤3├
At this point we install version 3.0.0 or later.
4. Now you must select Agrumino via the menu Tools→ Board→ ESP8266 Boards and
select Lifely Agrumino Lemon v4.
If everything has been done correctly, you should see Lifely Agrumino Lemon at the bottom
of the Arduino IDE as in the spot highlighted in the image below.
!

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤4├
2.2.1 IF YOU HAVE PROBLEM WITH SETUP IN STEP 2.2
In order to use Agrumino Lemon, it is very simple to install the Official Lifely Agrumino Lemon
library. This can be done directly from the library manager in the Arduino IDE.
To do this go to Tools → Library Manager and then type in citrus lemon or simply Lifely.
Here is the screen, now you need to install the latest release of the library, in this case 1.4.3
by simply pressing the install button (always install the latest release anyway).
Installing the library will only take a few seconds.
In addition, installing the library will install some example sketches, which are useful for
starting to use Agrumino Lemon without having to write a line of code. Start Arduino and open
File->Preferences.
3 PROGRAMMING AGRUMINO LEMON
The Agrumino board can be easily programmed by selecting an example sketch (alternatively,
sketches can be created completely independently) from the Examples folder and then
uploading it by pressing the Upload button on the Arduino IDE.
Check that you have selected the correct board "Lifely Agrumino Lemon v4 " from the
menu (Tools → Board).

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤5├
The official Agrumino library comes together with the core installation. We provide a list of the
libraries below only as a reference. You don’t need to install any library.
● WiFiManager (2.0.3-alpha)
● ArduinoJson (6.15.2)
Thing Speak Json Post
● NTPClient (master 9beb84ba50ce37d4c60b08574e1c37b6f598cb6c)
OTA web:
● ESPAsyncWiFiManager (master bf342327f2fd0f0518bf4932b50c04732063b8d1)
● ESPAsyncTCP (master 15476867dcbab906c0f1d47a7f63cdde223abeab)
● ESPAsyncWebServer (master f13685ee97675be2ac9502d177d3024ebc49c1e0)
● AsyncElegantOTA (2.2.2)
4 Programming the board
The Agrumino Board can be easily programmed by pressing the “Upload” button on the
Arduino IDE.
"#! $%&#! '(! $#)#*'! +,-&%./0(! 1#.(0! 23! 4567899:;<! =(>%)#?@! A$! A! "(A&>! /0! 'B#! 46(()$! C!
"(A&>?!.#0%D
5 Arduino library usage
5.1 Examples using USB
On this paragraph, example sketches of the Agrumino library are briefly presented. Notice that
they are divided into three folders: QuickStart, Cloud, OTA and Advanced (File
C!
Examples
C
Agrumino).
Accessing Wifi network
For Cloud and OTA sketches, it is necessary to connect Agrumino Board to the WiFi network
(2.4 Ghz networks only). Then, after uploading the sketch to the Arduino IDE, proceed as
follows:
1. Using any available device with WiFI, log in via a browser to connect to the newly
created access point (look for SSIDs such as Agrumino-XXXX, where XXXXX is the
unique Id of the Lifely Agrumino Lemon card)
2. Enter the DNS server IP in your browser (192.168.4.1) and click on 'Configure Wifi'.
Choose one of the scanned access points, enter the password and click Save. From
now on Citrus Lemon will save the connection data and activate the 'Station' mode by
trying to connect to the previously configured network(s).

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤6├
3. If step 1 is unsuccessful (or if there is no previous configuration), the card is moved to
"Access Point" mode and reactivates the Web Server (default ip 192.168.4.1) and the
WiFi network configuration procedure must be repeated.
If the procedure was successful, the configuration page is interrupted. Otherwise,
reconnect to the AP and reconfigure, taking care to correctly enter the access
passwords for the selected network (respect upper and lower case).
Further informations at official library page: WifiManager.
5.1.1 QuickStart examples
These sketches display the basic data of Agrumino, such as reading sensor data, saving data
to flash memory and controlling the wifi connection.
● AgruminoSample
Simple sketch to read all the values from the Agrumino Board and print them in the
serial console every 30 sec.
● AgruminoBringUp
Simple sketch to test Agrumino board and FLASH Memory of ESP8266 Module. In
particular it is possible to read all the values of sensors and print them in the serial
console. Moreover it is possible to clean, read, write and commit on memory to verify
its integrity.
● WifiClient (ESP8266 example)
Sketch to check wifi connection. It is necessary to fill STASSID and STAPSK with
personal wifi SSID and password.
5.1.2 Cloud examples
Sketches to send sensor data of Agrumino board to various cloud backends. All the sketches
use deep sleep to save energy and keep a queue of samples in EEPROM (flash).
● AgruminoDweet
Sketch that reads every 1h all values from the Arduino board and update them to the
Dweet.io service every 4h. It integrates FLASH management to collect all data before
transmitting them. More details here.
● AgruminoThingSpeakHttpPost
Same as the AgruminoDweet sketch but data are sent to the Thing Speak website with
4 different Http Post.
● AgruminoThingSpeakJsonPost
Like the
AgruminoThingSpeakHttpPost
sketch, but in this case all data is sent in a
single Json file.
● AgruminoThingSpeakVeryEasy
Similar to the
AgruminoThingSpeakHttpPost
sketch but much simpler. The data is sent
to the server with a direct connection.
● AgruminoThingCloudWithPump
Sketch that is able to send all data to the Thinger.io platform and at the same time it
will be possible to activate or deactivate the integrated connector for the 3.7v pump,
thus activating irrigation remotely.
5.1.3 Advanced examples

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤7├
Example sketch with Citrus Lemon, using other sensors, actuators, third-party cards such as
OLED display, water pump etc. For the time being there is only one sketch for using and
displaying data via an I2C oled display
● AgruminoOledSample
5.1.4 OTA flashing to update firmware examples
Sketches that send sensor data to the cloud and at the same time demonstrate the usage of
Over The Air updates.
● AgruminoDweetWebOTA
This sketch is the same as the AgruminoDweet sketch moreover integrates the update
of the firmware via OTA using a web page. Users can choose an executable from pc
and upload it on the board using the address of the board.
● AgruminoDweetHttpOTA
This sketch is the same as the AgruminoDweet sketch moreover integrates the update
of the firmware via OTA using a remote HTTP server. Each time the executable (.bin)
loaded on the server is updated, the board downloads it automatically.
5.1.5 Diagnostics
Example sketches to check the correct functioning of the device
● AgruminoLemonTesting
This sketch can be used to test the operation of all connectors and integrated sensors. Inside
the sketch folder itself is a picture illustrating its use. The connection diagram is illustrated on
a screen fritzing
6 Hardware components
In the following paragraph are underlined the principal components of Agrumino Board, front
and back sides.
6.1 Agrumino board front

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤8├
6.2 Agrumino board back
I2C Connector and GPIO Connector are compatible with the Grove System.
Grove I2C and Grove Digital are supported out-of-the-box while Grove Analog can be used
with an external Grove-I2C-ADC.
SW1-1 (Left)
Battery
recharge ON-
User
Battery
Reset
Light
Temperatur
L
WiFi
Micro USB
connector for
Soil
Internal
Water
sensor
Wifi
Antenna
Pump
connecto
Soil
Mosture
External
LiPo
GPIO
Connector
I2C
connector

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤9├
7 FAQ & Common Errors
1. error: cannot access ...
EB#*F!G&(.!'B#!46(()$!C!H(&'?!.#0%!'BA'!'B#!$#)#*'#>!I(A&>!/$!'B#!*(&&#*'!(0#!A0>!
'BA'!/'J$!*(00#*'#>D!KG!('B#&!L;"!>#2/*#$!A&#!*(00#*'#>M!*B#*F!'B#!(0#!*(&&#$N(0>/0-!
'(!,-&%./0(!1#.(0D
2. espncom sync error
Press the reset button on the Agrumino (S2 on the Top-Left) and try again.
If the error happens again disconnect the Agrumino from the USB, remove and
reconnect the jumper P1 and try again.
Visual Guide
In the first place install Arduino IDE from this link on your Pc, Notebook or Mac
https://www.arduino.cc/en/software
After installing the Arduino Ide, connect Agrumino to your PC/MAC with micro usb cable
and go to the next step.
Open Arduino IDE and go to File Preferences, and click
Now in text box “Additional Boards Manager URLs” copy and paste this this link:
http://arduino.esp8266.com/stable/package_esp8266com_index.json

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤10├
and click Ok
Now go to: Tools Board Boards Manager and click
In the text box, type ESP8266 and click on Install.
Important, only install version 3.0.0 or later.

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤11├
After completing the installation click on Close.
Go to Tools Board Esp8266 Boards (3.0.0)
Agrumino Lemon v4
and click
If the choice was successful, you should see “Lifely Agrumino Lemon v4” at the bottom right
on Arduino IDE

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤12├
Now you have to install the official library, so go to:
Tools Library Manager and type “Agrumino Lemon” or simply “Lifely” (see image
below).
Having done this, you must now click on Install (always install the latest release).
With the installation of the library, all example sketches will also be installed.
Now connect Agrumino to the PC and go to Tools Port, select your port for your
Agrumino

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤13├
Now select the base sketch, to find it go to:
File Examples Lifely Agrumino Lemon QuickStart
AgruminoSample and then upload the sketch by pressing this button
Now that you have uploaded the sketch to Agrumino, to view the data acquired by the
sensors click on this button to open the serial monitor (see arrow no. 1)
next, change the "baud rate" to 115200 (see arrow no. 2)
and now you can finally view the data acquired by your Agrumino Lemon (see arrow no. 3)

Agrumino Lemon Dev Guide - rev 1.2_ENG
┤14├
From now on, you can manage your device.
Also try the other sketches in the examples folder of
Lifely Agrumino Lemon.
For support visit
www.lifely.cc
Other manuals for Agrumino Lemon
1
Table of contents
Other Lifely Lawn And Garden Equipment manuals
Popular Lawn And Garden Equipment manuals by other brands

Eterna
Eterna IK100M Safety and installation instructions

Ryobi
Ryobi RLT430CESD Original instructions

Hyundai power products
Hyundai power products HCOMBI55-1 Original instructions

PowerTek
PowerTek 12-13 Operation & maintenance manual

Simplicity
Simplicity 3538 Illustrated parts list

Toro
Toro 22305A Operator's manual