Arduino IDE Settings for AVR MCU

Let’s write a program in Leafony!

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.

What to prepare

  • Basic Kit
  • USB cable
  • 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.

  1. From the Arduino website, go to SOFTWARE and then DOWNLOADS to get to the Arduino IDE download page.
  2. Download the installer for your OS at the place where it says Download the Arduino IDE.
  3. Run the downloaded installer and follow the on-screen instructions to install the Arduino IDE.

How to download old versions of Arduino IDE and check and change Arduino AVR Boards

Refer to Version of the Arduino IDE.

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.

  1. Go to Tools → Board and select Arduino Pro or Pro Mini and ATmega328P (3.3V, 8MHz) for Processor.

  1. Go to Tools → Serial Port and select the serial port that Leafony is connected to

Checking the operation of the microcontroller board

  1. In the Arduino IDE, click on File → Sketch Examples → 01.Basics → Blink to open the sample app.
  2. The program is written to Leafony by pressing the write to microcontroller button.
  3. If you can confirm that the LED on the AVR MCU leaf is blinking, you are done.

Specifying pins for a sketch

The pin should be specified by its name.

Installing Libraries

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
BLE TBGLib Bluetooth Library
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
Adafruit_LIS3DH.h 1.1.2 Accelerometer Library
LCD ST7032.h LCD Library
AVR MCU MsTimer2.h Timer interrupt library
RTC&MicroSD RTClib.h RTC Library

2. Download Library

Clicking on the links in the table above will take you to the library’s GitHub repository. Click 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.

When in doubt.

If it doesn’t work, go to “If it doesn’t work…” to find a solution.

Back to previous page

Last modified 01.01.0001