กลับไปหน้ารวมไฟล์
arduino-opla-iot-kit-blink-example-and-symon-says-game-f127c6-en.md

Arduino OPLA IoT Kit Blink Example and Symon Says Game

The Arduino Opla IoT Kit is a premium, versatile toolkit specifically designed for learning and developing Internet of Things (IoT) projects. While the word "Opla" is an acronym for "Open-source Programmable Logic Analyzer," in the context of this kit, it represents a hardware and software ecosystem that facilitates the easy and efficient creation of internet-connected applications.

Arduino Opla IoT Kit

This kit comprises robust and comprehensive components, suitable for everything from basic sensor projects to highly complex systems requiring Cloud connectivity and in-depth data analysis. The kit includes the following key components:

  • MKR IoT Carrier: A feature expansion board with a built-in 3.7V Li-Ion battery slot.
  • Arduino MKR WiFi 1010: The main microcontroller board using a SAMD21 (Cortex-M0+) chip with a u-blox WiFi/Bluetooth module for wireless connectivity.
  • Plastic Case: For enclosing the Carrier kit for aesthetics and circuit protection.
  • Moisture Sensor & PIR Sensor: Soil moisture sensor and Passive Infrared (PIR) motion sensor for expanding capabilities.
  • Other Accessories: Connection cables and a Micro USB cable for data programming.

Components

A key highlight of the MKR IoT Carrier is its comprehensive integration of sensors and display modules onto a single board, including:

  • Temperature & Humidity Sensor (HTS221): For environmental monitoring.
  • Pressure Sensor (LPS22HB): For measuring atmospheric pressure.
  • Light & Gesture Sensor (APDS9960): For detecting light intensity and hand movement direction.
  • 5 Capacitive Touch Buttons: Touch buttons that require no mechanical force.
  • 2 Relays: Electronic switches for controlling high-voltage electrical devices.
  • Micro SD Card Reader: For Data Logging.
  • Round OLED Display: A circular color display that enhances aesthetics and clearly shows status.

On the official Arduino website dedicated to this kit, you will find detailed descriptions, illustrative images, assembly guides, and numerous example projects. For this initial use, I will present a simple project that effectively showcases the hardware's potential: the "Simon Says" game, which perfectly suits the circular shape of the module, the touch buttons, RGB LEDs, and the onboard sound system.

To create this project, we only need the MKR IoT Carrier and the Arduino MKR WiFi 1010. The first step is hardware assembly: install the microcontroller board onto the Carrier's socket. Ensure that the pin alignment and markings on the boards match to prevent damage.

Assembly Step

If you wish for portable use, you can install a 3.7V Li-Ion battery, ensuring correct polarity (+/-). Afterward, place the board into the plastic case. Besides protecting the hardware, this case also helps diffuse the light from the RGB LEDs, creating a softer and more beautiful ambient glow. Once assembled, we will move on to the software section.

First, download the Arduino IDE software from the official website (in this instance, I am using version 2.3.2).

Arduino IDE

In addition to the desktop IDE, you can also use the Arduino Web Editor, which connects directly to the Arduino IoT Cloud. Once the board is connected via a USB cable, the software will detect the device and recommend installing the necessary Board Support Package and Library. After selecting the correct COM Port, we will begin testing the system with a basic Sketch like "Blink".

Blink Sketch

A unique feature of the Opla kit is that the onboard LED of the MKR WiFi 1010 (Pin 13) is linked to a small Relay on the Carrier board. Therefore, when we upload the Blink code, we will not only see the LED flash but also hear the "click" sound of the Relay in sync, confirming that the hardware is fully functional both electrically and mechanically.

Once tested, we will upload the code for the Simon Says game. This original code was developed by Julián Caro Linares. We must first install the Arduino_MKRIoTCarrier Library via the Library Manager to avoid compilation Errors.

Library Manager

Regarding the program Logic, the Simon Says game works by randomizing a light and sound Sequence and storing it in an Array. It then displays this to the player via the RGB lights around the board. Players must press the Capacitive Touch buttons in the correct order. The device offers three difficulty levels: Easy, Normal, and Hard, which affect the speed and number of sequences to remember.

Game Difficulty

The game's objective is to guess the Sequence correctly as many times as possible, testing both the player's memory and the responsiveness of the onboard sensors simultaneously.

In conclusion, while the Arduino Opla IoT Kit is primarily designed to emphasize IoT connectivity, its aesthetics and comprehensive features also allow it to be effectively used as a high-performance Stand-alone device. This time, we've explored its basic functions and local sensor usage. In a future session, we will delve into connecting it to the Cloud system to create full-fledged IoT projects.

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino OPLA IoT Kit Blink Example and Symon Says Game"
description: "Two simple local projects to introduce you to the basic finctions, and some of the possibilities of this Arduino Kit."
author: "mircemk"
category: "Gadgets, Games & Toys"
tags:
  - "Games"
  - "Lights"
  - "Toys"
views: 2565
likes: 0
price: 2450
difficulty: "Easy"
components:
  - "1x Arduino Oplà IoT Kit"
  - "1x Screwdrivers"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "cdbfa7e656014b3ec8580b3b3fcd42dc5f02075ed7e1b23ecc749f419c8e0e14"
encryptedPayload: "U2FsdGVkX187AMx7i0/QtbXNCjInpg+74xD2nbeb840EzYWTq8bH/FhYOTLEphMZCpnU2d6fepxuKgwKPEyP35njhaS+6VoopNkyYnsfMYA="
seoDescription: "Learn Arduino OPLA IoT Kit basics with the Blink example and Symon Says game. Simple local projects for beginners."
videoLinks:
  - "https://youtu.be/uElg_UKJl0w"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-opla-iot-kit-blink-example-and-symon-says-game-f127c6_cover.jpg"
lang: "en"