Author Archives: Arduino Team

Arduino on GitHub Actions

via Arduino Blog

This post is from Massimiliano Pippi, Senior Software Engineer at Arduino.

GitHub Actions is the name of the SDLC (Software Development Life Cycle) system introduced by GitHub about a year ago, currently in public beta and now approaching the general availability status. When you read SDLC, think about some sort of CI/CD system that’s generic enough to let you define a sequence of operations not necessarily limited to build, test, and deploy code: GitHub Actions can help you automate processes in code reviews, issue triaging, and repository management.

GitHub Actions have been part of the tools we use at Arduino for a while now; helping us solve a wide range of problems from automating workflows within our backend infrastructure, to managing the release process of our open source software. In the spirit of giving back to the community, we started publishing some of the Actions we developed internally so that they can be used right ahead from any GitHub account that’s been granted access to the public beta of GitHub Actions, and eventually in any GitHub repository.

Our Actions are available from this repository and there’s one in particular we think the Arduino community will be happy to have – it’s called setup-arduino-cli and under the hood it takes all the steps necessary to have the `arduino-cli` binary available in a Workflow.  This means that in any step of your Workflow you can leverage the long list of features of the Arduino CLI.

# This is the name of the workflow, visible on GitHub UI.
name: test
 
# Here we tell GitHub to run the workflow when a commit
# is pushed or a Pull Request is opened.
on: [push, pull_request]
 
# This is the list of jobs that will be run concurrently.
# Since we use a build matrix, the actual number of jobs
# started depends on how many configurations the matrix
# will produce.
jobs:
  # This is the name of the job - can be whatever.
  test-matrix:
 
    # Here we tell GitHub that the jobs must be determined
    # dynamically depending on a matrix configuration.
    strategy:
      matrix:
        # The matrix will produce one job for each configuration
        # parameter of type arduino-platform, in this case a
        # total of 2.
        arduino-platform: ["arduino:samd", "arduino:avr"]
        # This is usually optional but we need to statically define the
        # FQBN of the boards we want to test for each platform. In the
        # future the CLI might automatically detect and download the core
        # needed to compile against a certain FQBN, at that point the
        # following include section will be useless.
        include:
          # This works like this: when the platform is "arduino:samd", the
          # variable fqbn is set to "arduino:samd:nano_33_iot".
          - arduino-platform: "arduino:samd"
            fqbn: "arduino:samd:nano_33_iot"
          - arduino-platform: "arduino:avr"
            fqbn: "arduino:avr:uno"
 
    # This is the platform GitHub will use to run our workflow, we
    # pick Windows for no particular reason.
    runs-on: windows-latest
 
    # This is the list of steps this job will run.
    steps:
      # First of all, we clone the repo using the checkout action.
      - name: Checkout
        uses: actions/checkout@master
 
      # We use the arduino/setup-arduino-cli action to install and
      # configure the Arduino CLI on the system.
      - name: Setup Arduino CLI
        uses: arduino/setup-arduino-cli@v1.0.0
 
      # We then install the platform, which one will be determined
      # dynamically by the build matrix.
      - name: Install platform
        run: |
          arduino-cli core update-index
          arduino-cli core install ${{ matrix.arduino-platform }}
 
      # Finally, we compile the sketch, using the FQBN that was set
      # in the build matrix.
      - name: Compile Sketch
        run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./blink

Example

Let’s say you keep your sketches in a GitHub repository, and you want to be sure that every time you push a git commit or you merge a pull request, the sketches compile correctly on certain boards you own, for example a Nano 33 IoT and a Uno. To keep the configuration at minimum, we can use a “build matrix”, so that GitHub will start a different job for each one of the platforms we list in the matrix, without the need to configure them explicitly.

You can find a working example here: https://github.com/arduino/arduino-cli-example

You can find more info and docs for the Action on the GitHub Marketplace: if you like it, please leave us a star!
We’re eager to hear your feedback, feel free to hit the Action repository and open an issue should you find any problem, or a feature request in case you want more from the action.

James Bruton’s 512 LED DJ helmet adds more glow to his Performance Robots show

via Arduino Blog

If you’ve ever thought that your musical performance needed more LEDs, then James Bruton’s DJ helmet may be just the thing for you.

The YouTuber’s wearable device is built on the base of a protective face shield, substituting in a 3D-printed support for an 8×32 LED matrix, as well as four smaller 8×8 LED matrices arranged above and below the main section.

The 512 LEDs are powered using a portable LiPo battery and a 10A power regulator. Control is via an Arduino Mega, which is connected to an RJ45 jack that enables it to work with DMX lighting data. 

The result is a spectacular display, shown off nicely in an electronic concert (with his barcode guitar) starting at around 8:20 in the video below!

Rapidly create your own capacitive multi-touch sensors with this kit

via Arduino Blog

You likely use touchscreens every day when interacting with your phone — perhaps even to read this article — but prototyping your own capacitive matrix is unfortunately out of reach for most makers and electronics novices. As seen here, researchers have devised a new technique that will allow for easier prototyping of this type of interface, which can function on both flat and curved surfaces, over a variety of materials.

To accomplish this, the team developed an Arduino library, as well as one for Processing, and used OpenCV to track multiple finger positions. Interactions have been tested with an Uno, Mega and LilyPad, and would presumably work with almost any other Arduino board as needed!

We introduce Multi-Touch Kit, a low-cost do­ it-yourself technique to enable interaction designers, makers, and electronics novices alike to rapidly create and experiment with high-resolution multi-touch sensors of custom sizes, ge­ometries, and materials. 

In contrast to existing solutions, the Multi-Touch Kit is the first technique that works with a commodity microcontroller (our implementation uses a standard Arduino) and does not require any specialized hardware. As a technical enabler, we contribute a modified multi-touch sensing scheme that lever­ ages the human body as a transmission channel of MHz range signals through a capacitive near-field coupling mechanism. This leads to a clean signal that can be readily processed with the Arduino’s built-in analog-to-digital converter, resulting in a sensing accuracy comparable to industrial multi-touch con­ trollers. Only a standard multiplexer and resistors are required alongside the Arduino to drive and read out a touch sensor matrix. 

The technique is versatile and compatible with many types of multi-touch sensor matrices, including flexible sensor films on paper or PET, sensors on textiles, and sensors on 3D printed objects. Furthermore, the technique is compatible with sensors of various scale, curvature, and electrode materials (silver, copper, conductive yarn) fabricated using conductive printing, hand-drawing with a conductive pen, cutting, or stitching. 

An IMU ring for low-latency mixed reality input

via Arduino Blog

Because of their ability to visually sense the environment, head-mounted mixed reality (MR) systems can detect when a user touches a wall or other surface. These surfaces can then become interactive panels, with the small caveat that they traditionally treat a finger coming within 10mm of the surface as a touch. 

While this leads to sometimes inaccurate readings, researchers at Tsinghua University in Beijing have implemented an inertial measurement unit (IMU) ring apparatus for contact sensing to increase precision from around 85% to just under 99%. 

The experimental setup for this exercise used an Arduino Uno to read accelerometer data, along with a capacitive arrangement to confirm when a touch actually took place. Accelerometer data was compared with readings from a Leap Motion optical sensor, which in addition to greater accuracy, also reduced latency.

This suitcase game lets you bring the escape room experience anywhere

via Arduino Blog

To experience an escape room, you normally need a rather large dedicated space. This project, however, by creator Jason R, takes this physical clue-solving concept and shrinks it down to fit within a small suitcase!

To play, participants have to work their way through a series of problems, supplied in the ‘TOP SECRET’ documentation attached to and inside the device, connecting jumpers, flipping switches, and turning knobs as needed. 

A computerized voice guides you along the way, with LEDs and an LCD panel providing visual output as you save the day. The game is controlled via an Arduino Mega, while power supplied by a rechargeable USB power bank.

I created an “escape room-esque” game that is contained within a small suitcase. In total, there are about 15-20 puzzles and sub-puzzles that need to be solved in order to disarm the “explosives”. Players are given 60 minutes to arrange puzzles, decipher clues hidden in QR codes, connect cities in maps to form numbers, decode morse signals, and other similar things. 

This New Nano Pack Has EVERYthing You Need

via Arduino Blog

The Arduino Nano Every is now available in a 3 and 6 pack – perfect for running a course or powering all your projects with Arduino.

For those countless creations requiring a small and easy to use microcontroller board, the Nano Every has the tiniest Arduino form factor out there measuring just 45x18mm. Whether you’re working on a low-cost robotics project for the entire classroom or presenting a complex prototype with many functional blocks, this pack offers exactly what you need – a batch of Nano Every boards at a great price! 

This robust little board costs as little as €7.50 each ($9.30 each) in the 6 pack, saving €0.50 ($0.60) per board versus the single. It’s now more affordable than ever to forecast the local across town by building your own little band of Gnome Weather Forecasters in your class.

If you are interested in the ARDUINO NANO EVERY – PACK, visit the Arduino online store at this link.