Arduino IDE Settings for AVR MCU
Leafony only works when you write a program.
For example, in Quick Start, a program has been written to read the four sensors and send data via Bluetooth LE.
If you are starting to use Leafony, you can make it work the way you want it to by writing a program that describes what you want it to do.
NextInstall the software needed to write a program in Leafony
What to prepare
- Basic Kit
- PC (Windows, Mac OS X or Linux)
Installing Arduino IDE
The Arduino IDE is a development environment for the Arduino, an open source hardware platform for electronics.
. The development environment allows you to write programs, write programs to the Arduino board, and display the data coming from the board.
. Leafony can be developed with the Arduino IDE.
Let’s download the Arduino IDE right away.
- From the Arduino website, go to “SOFTWARE” and then “DOWNLOADS” to get to the Arduino IDE download page.
- Download the installer for your OS at the place where it says “Download the Arduino IDE”.
- Run the downloaded installer and follow the on-screen instructions to install the Arduino IDE.
NextLet’s write a program in Leafony and make it work!
Connecting to PC
Connect to your PC with a USB cable.
Configuration of the microcontroller board
To develop Leafony in the Arduino IDE, let’s follow the steps below to configure the IDE.
- Go to
Tools → Boardand select
Arduino Pro or Pro Miniand
ATmega328P (3.3V, 8MHz)for
- Go to
Tools → Serial Portand select the serial port that Leafony is connected to
Checking the operation of the microcontroller board
- In the Arduino IDE, click on
File → Sketch Examples → 01.Basics → Blinkto open the sample app.
- The program is written to Leafony by pressing the
write to microcontrollerbutton.
- If you can confirm that the LED on the AVR MCU leaf is blinking, you are done.
When in doubt.
If it doesn’t work, go to “Solution” to find a solution.
NextA number of programs are available in Sample App. To make development easier, install the library and get started.
To use some of the leaves, you will need to install additional libraries.
Follow the steps below to install all libraries in advance.
1. Library to use
The libraries used in each Kit are as follows.
|Leaf||Required Library||Recommended version||Description|
|4-Sensors||Adafruit_Sensor.h||Unified Sensor Driver|
|Adafruit_BusIO_Register.h||Bus IO Library|
|HTS221.h||Temperature and humidity sensor library|
|ClosedCube_OPT3001.h||Illuminance sensor library|
|AVR MCU||MsTimer2.h||Timer interrupt library|
2. Download Library
Clicking on the links in the table above will take you to the library’s GitHub repository.
Code → Download ZIP to download the library.
3. Include Library
Launch the Arduino and choose
Sketch → Include Library → Install ZIP Library to load the zip file you just downloaded.