Blink

Use this page with AI

Explore with your favorite AI

Gemini & other AI

Copy this page’s context into your AI to explore how it works and what you can build.

Open Gemini

Copy the prompt, then paste it into Gemini’s message box.

View prompt

Table of contents

Overview

Turns on and off the LEDs on the AVR MCU leaf every second.

Leaf to use

Use the following leaves.

TypeNameQ’ty
AZ62Connector Cover1
AZ01USB1
AP01AVR MCU1
AV01CR20321
CR2032 coin cell battery1
M2*10mm screw2

Assembly

Let’s assemble leaves as shown in the figure below.

assemble1

Source code

Write the following program in the Arduino IDE.

//=====================================================================
//  Blink
//
//    (c) 2020 Trillion-Node Study Group
//    Released under the MIT license
//    https://opensource.org/licenses/MIT
//
//      Rev.00 2020/05/05  First release
//=====================================================================

void setup() {
  // LEDピンを出力ピンに設定
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // LEDを点灯
  delay(1000);                       // 1秒待つ
  digitalWrite(LED_BUILTIN, LOW);    // LEDを消灯
  delay(1000);                       // 1秒待つ
}

Blink.ino

Execution Results

The LED on the AVR MCU leaf turns on and off every 1 second.

Leaf photo
Search documentation, sample apps, and Q&A