Giter VIP home page Giter VIP logo

esp32moonboardled's Introduction

[modificated platformio.ini file to use it using ESP32 microcontroller]

ArduinoMoonBoardLED: A Simple Arduino MoonBoard Bluetooth Low Energy (BLE) LED System

Introduction

This project aims at providing an easy to use solution for building your own MoonBoard LED system using an Arduino. It is both compatible with a normal MoonBoard as well as with the MoonBoard Mini. You need an Arduino Nano 33 BLE (buy the original!), a WS2811 LED string with 25 cm wire length, and an appropriate power source.

As of November 2023 this project is only compatible with the "new" MoonBoard app. All features (show beta, show lights above hold) of the app can be used. One exception is the multi user feature: With this project, only one user at a time can connect to the LED system.

mini_benchmark

Please READ THIS FIRST

  • IMPORTANT: If you want a product that just works, please buy the one offered by Moon Climbing! This project is neither supported nor endorsed by Moon Climbing!
  • This is a project which requires some work and still might not work as well as the original.
  • To be absolutely clear: This project is provided as-is. I take absolutely no responsibility that it works as expected. In fact, it might break at any time. You have been warned!
  • Never power the Arduino only without powering the LEDs when the data wire is connected to the LED string! This may destroy the first LED! Just use the same power source for both of them and don't disconnect it.

Thanks

All the heavy lifting in this project is done by two awesome libraries: NeoPixelBus (for the LED string) and HardwareBLESerial (for BLE functionality). They make it possible to keep this project quite short, easy to understand, and easily maintainable.

Wiring

The LED strip has three wires: +5V, GND and data. Usually, blue is GND ("negative"), brown is +5V ("positive"), yellow/green is data. Please double-check!

Connect the data line to pin D2 of the Arduino (unless you changed it in config.h). It might be a good idea to use a resistor (e.g. 330 ohms) in the data line!

Important: Make sure that both the Arduino and the LED string share GND! Simply power both the LED string and the Arduino by the same power source. Use the USB connection for flashing and debugging only! If GND is not connected, the LED string will not work.

Note: You can use different lengths than 25 cm. If you use shorter cables, you might need to adjust the pattern in order to skip some LEDs (see below).

How to use (Windows and Linux via a Package Manager)

  1. Download and install Visual Studio Code.
  2. Install PlatformIO in Visual Studio Code.
  3. Download and open this project. To do so, either download it as a zip file or git clone it.
  4. Adjust config.h settings to your needs (Moonboard type, brightness).
  5. Compile and flash to an Arduino Nano 33 BLE.
  6. Use the MoonBoard app to connect to the Arduino and show the problems on your board!

How to use (Linux, command line)

  1. Download and install platformio
curl -fsSL -o /tmp/get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 /tmp/get-platformio.py

  1. Download, install and configure arduino-cli
mkdir -p ~/apps/arduino-cli; cd ~/apps/arduino-cli
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
~/apps/arduino-cli/bin/arduino-cli core install arduino:mbed_nano
  1. Clone the repository Press the green "Code" button on github and copy the HTTPS url. If you don't have git installed on your Linux distribution, please install it first.
mkdir -p ~/src; cd ~/src
git clone Put_HTTPS_URL_here
cd ArduinoMoonBoardLED/
  1. Adjust config.h

Follow the instructions in the file ~/src/ArduinoMoonBoardLED/src/config.h in order to adjust the configuration to your setup.

  1. Compile
~/.platformio/penv/bin/platformio run
  1. Attach the Arduino Nano BLE to your computer using a MicroUSB cable and upload the firmware
~/apps/arduino-cli/bin/arduino-cli upload -p /dev/ttyACM0 -i .pio/build/nano33ble/firmware.bin
  1. Optional: connect to the console output of the Arduino to see connections and problems
~/apps/arduino-cli/bin/arduino-cli monitor -p /dev/ttyACM0
  1. Use the MoonBoard app to connect to the Arduino and show the problems on your board!

Advanced: LED Mapping

The most common LED wiring pattern goes like this (front view):

  • start bottom left (A1),
  • up the column (to A12),
  • one column to the right (to B12),
  • all the way down (to B1),
  • one column to the right (to C1),
  • and repeat.

The MoonBoard App encodes holds in the same way. Hold A1 is 0, hold A2 is 1, hold A3 is 2 and so on.

If you need to wire differently, you'll need to adjust the ledmapping[] array in config.h which maps hold numbers to LED numbers. The standard mapping is n-->n (e.g. hold #0 is LED #0, hold #1 is LED #1 and so on).

Pictures

led_test mini_back box arduino_wiring

esp32moonboardled's People

Contributors

casamamaker avatar denkbrettl avatar fabianrig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.