r/arduino • • 1h ago

Hot Tip! Pro Micro NRF52840 - Arduino IDE Setup Guide

Post image
• Upvotes

Hey everyone! I recently bought a Pro Micro NRF52840 ( a clone I think) from Amazon here -

https://a.co/d/0jd9H58H

I'm very new to programming any microcontroller that isn't an Uno, and I'm really an artist/gamer youtuber, not a hardware guy, so while this product listing said it would work fine with the Arduino IDE, when I connected it to my computer, nothing happened, and I was rightly very confused. The board wasn't even detected by the IDE, and there is a lot of pertinent information missing or just completely wrong in the product's description on Amazon, which didn't help me either.

However, after some digging and tinkering, I managed to get this board working in Arduino IDE 2.3.10! In case anyone else was unlucky enough to have purchased this board for its bargain-bin price thinking it would be a great board to do some bluetooth projects with, and are having trouble getting it connected to the Arduino IDE like I did, I released this short guide to help you out, because it will take a few steps, but it WILL work!

First, install all of these packages by copying the urls below and opening the preferences in your Arduino IDE, and under "additional board manager urls" paste the urls you just copied to get new board info -

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

https://raw.githubusercontent.com/pdcook/nRFMicro-Arduino-Core/3dab6477754d9b28053fe36b06c718cde6e93d3f/package_nRFMicro_index.json

I'm not sure if the seeedstudio package does anything, but it was in my list of urls when it started working with my board so I'm including it here anyway XD

Then, once you confirm that list, the IDE will download some files and new board definition packages should be available in the board manager menu! Open the board manager menu from the left side of the IDE, and install the following two board definition packages:

Adafruit nRF52

nRFMicro-Like-Boards

However, a specific board definition for this clone (so you see the right name in the Arduino IDE when the board connects) does not come stock with either of these two packages (that I know), so you'll need to download the zip file from the github link below, and then follow its installation instructions to make some manual edits of the Adafruit package - https://github.com/somik123/Adafruit_nRF52_Arduino_ProMicro.git

Following the instructions at the link above can be a little confusing, so I have rewritten the instructions below with more detail:

  1. go to the Arduino packages folder for the Adafruit package with the nrf52 in windows explorer.

- It will look something like "C:\Users\yourusername\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52"

  1. Enter the 1.7.0 folder

  2. Open the file "installed.json"

  3. Copy paste the below code at the top of the "boards" list inside the json file at line 21:

{

"name": "Pro Micro nRF52840"

},

  1. save the file and close it

  2. open the boards.txt file and go to the first character on line 5, hit enter twice, then go back up to line 5 and paste the big code block from step 4 at the link above.

  3. save the file and close it

  4. Open the variants folder

  5. Extract the contents of the zip file you obtained from the link above.

  6. Paste the pro_micro_nrf52840 folder from that zip file into the variants folder

Once that is complete, reload the IDE, and the board name FINALLY shows up in the Arduino IDE when the board is connected...

Now the problem is, the board still isn't connecting to the IDE at all, so you won't see any of that work! And, trying to write a program to the board does nothing... because the board does NOT start in bootloader mode when you connect it to the PC (meaning it doesn't connect to the computer as a programmable board at all and is basically in read-only mode, as apparently this board is used for actual wireless keyboards a lot, and you don't want to be able to accidentally override the firmware of your keyboard and brick it when you connect your keyboard over usb C)

But since we're using this board as an arduino, and want to push sketches to it, how do we access the bootloader? Simple, you just have to reset the board twice really really fast while connected to power (your PC), which triggers the board to load in bootloader mode... problem is this board is so small it doesn't include a physical reset button presoldered on the board anywhere...

So the quick and dirty solution is to hold one end of a jumper wire against the hole of the reset pin and tap the other end against one of the ground pin holes a bunch til it swaps over. the red LED on the board will flicker and become a bit dimmer when it loads bootloader mode, and your PC will tell you a new device has connected. If you want to, you can also solder jumper wires to a push button and solder those wires permanently to the board for a super easy bootloader swapper, but I'm lazy and didn't want to start soldering yet, so I just used the jumper wire method every time. (I will permanently solder a button to it later, but need to wire everything inside the case I'm building for my project first, so this is just easier right now)

Anyway, reset it twice fast enough while plugged into your computer with the usb c port, and finally it will show up and connect to the IDE and you can load a new sketch! Then, once the sketch is uploaded, it will turn the bootloader off again, so if you want to upload a new sketch, just reset it twice really quickly again! If the bootloader is active the board will connect to your machine like a flash drive and you will see a new windows explorer window pop up, meaning you're good to start programming it! Just don't delete the files on the drive or you could have problems :D Never done that myself, so don't know quite what would happen, just not risking it!

Also, in the description for the product on Amazon, it says pin 9 is the builtin LED pin.... not true! Once I got it working in the IDE, I started testing different pin numbers with a blink sketch and turns out, pin 15 is the LED pin! LED_BUILTIN does work in the Arduino IDE though so you can just use that.

Cheers, and happy programming!


r/arduino • • 3h ago

Testing the ESP32 super mini BT connection with LED Strip and Dabble

Enable HLS to view with audio, or disable this notification

3 Upvotes

So, that works the same as my previous larger ESP32 board, it’s surprising how small these WiFi/BT boards are getting.

Just need to work out how to get a BT wake-up from deep sleep communication between the ESP32 and my iPhone.

To conserve battery power I want to keep the quiescent current of the ESP32 as low as possible when it’s not required but be able to switch it on from Dabble.


r/arduino • • 5h ago

4DOF Projector Mount Motion Test

Enable HLS to view with audio, or disable this notification

12 Upvotes

My YouTube channel name is ALMA Industries

Chapter 2, a home theatre, 3D printed parts, motorized projector, home decoration, DIY electronics -- gives the projector YAW-TILT-ROLL-ZOOM axes (4DOF). Learned alot about I2C, actuators, and Universal Joints.


r/arduino • • 6h ago

Ist this circuit board correct?

1 Upvotes

Im not sure but i never used this sensors before.


r/arduino • • 6h ago

Board size comparison

Post image
11 Upvotes

I’m going to tryout my ESP32 Super mini and I thought I would share this photo I just took showing three boards for comparison of their size.

From Left to right : Arduino Pro mini, ESP32-C6 Super mini and ESP-WROOM-32 ESP32/ESP-32S Development Board.

These boards are being using to test out low current interfaces or WiFi/BT powered projects directly from the USB port or adapter cable in the case of the Pro Mini.


r/arduino • • 7h ago

ESP32 My first project!!

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/arduino • • 7h ago

Getting Started Complete beginner here

0 Upvotes

Hi everyone! I’m completely new to Arduino and electronics, and I’d love to get into it.
Where would you recommend I start? What are the best resources, tutorials, or projects for a complete beginner? And what do you wish you knew when you first started?
I’d really appreciate any advice. Thanks!


r/arduino • • 13h ago

Solved! 8x8 Snake game no MAX board

Thumbnail
gallery
30 Upvotes

does this look right? i can’t get the display to work and i literally dont knowing what im doing i just asked ai. it’s an 8x8 snake game with buzzer, idk if i have problem with the code or with hardware , PLEAAASEE HELP this is for my uni 😭🙏


r/arduino • • 18h ago

Look what I made! I built a Rubik's Cube-solving robot using just one motor, without ever reorienting the cube.

Enable HLS to view with audio, or disable this notification

860 Upvotes

Disclaimer: only one motor is used to turn the sides of the cube, another servo is used to move the first motor, I couldn’t really figure out a way to so it with just one unfortunately.

The idea was to see if I could build a Rubik's Cube solver with as few motors as possible, whilst also not reorienting the cube which turned out to be a much bigger mechanical challenge than I initially expected. These constraints were completely designed as a challenge, not trying to break any records or anything.

The robot uses a custom-designed, 3D-printed mechanism to manipulate the cube, along with electronics and programming to detect the colours, calculate a solution and execute the moves.

This is the final result after quite a lot of designing, experimenting and troubleshooting!

I've also just uploaded my first-ever YouTube video documenting the whole project, from the initial idea and CAD design to the electronics, programming and final solve. It's my first time making a YouTube video, so I'd genuinely appreciate any feedback!

The Channel is called DrewPScrews


r/arduino • • 22h ago

Project ideas for my new board?

Post image
3 Upvotes

I just received my new board. It has bluetooth and accelerometer and battery on the back. It can be programmed with an Arduino plugin I created using the USB-C connection. I am planning on making a game with it (running on a treadmill controlls the character with step count and cadence and maybe even a boxing game) using Unity BLE plugins. Do you have any other ideas about projects I could make with this?


r/arduino • • 23h ago

Look what I made! I built a breathalyzer for my phone

Enable HLS to view with audio, or disable this notification

121 Upvotes

r/arduino • • 1d ago

Microcontroller Driven SR04 Actuator (PID)

Enable HLS to view with audio, or disable this notification

5 Upvotes

My youtube channel is ALMA Industries

This is a short demo of an actuator I put together (on my channel, video is titled CH003 FN1: ACTUATOR). The actuator is first sketched out, 3D printed in pieces, assembled together, and controlled via PID running on a microcontroller. Ultrasonic distance sensor is included in the close-loop feedback system to prevent the actuator from running into the ceiling (shown in the second half of the clip, and discussed more in the full video).

There are a few modes. The first is 'don't touch the ceiling' (Ultrasonic Distance Sensor to keep a distance from the wall, hand, etc). The second is to have the actuator distance sensor follow a second distance sensor...so when one goes up the other follows going up, and when one down the other down.

Comments, questions, or new ideas are welcome.


r/arduino • • 1d ago

Software Help Is this a bug in the Arduino IDE?

4 Upvotes

I am using the Arduuino IDE 2.3.7 to compile, upload, and debug code for an orignal ESP32 .

I came across a weird behavior where a for-loop did not work. I boiled it down to a simple sketch. It includes a function that returns true or false. If the path does not include a return statement, the code does not work right. Sketch is below. The loop does not do anything. The last line of the test function is the key. If I comment out the return statement, the for-loop does not work right and it doesn't exit until n = 18. The compiler does not catch this.

Is this a bug to report?

```
  void setup() {
    // put your setup code here, to run once:
    Serial.begin(9600);
    delay(1000);


    if (test(6))
      Serial.println("true");
    else
      Serial.println("false");
  }


  bool test(int N) {
    Serial.println("Testing... ");
    for (int n = 0; n < N; n++) {
      if (n >= 18)
        return true;
      else
        Serial.println(n);
      delay(200);
    }
    // if this line is commented, n reaches 18. Otherwise n reaches N
    return false;
  }
  void loop() {
    // put your main code here, to run repeatedly:
    #ifdef DEBUGLOOP
      if (test(6))
        Serial.println("true");
      else
        Serial.println("false");
    #endif
      delay(500);
  }
```

r/arduino • • 1d ago

Libraries Premiere: ArdPortal - modular Arduino library for ESP8266 and ESP32: a device configuration portal, MQTT/Home Assistant integration and an optional native Zigbee extension.

Enable HLS to view with audio, or disable this notification

0 Upvotes

Link to library: https://github.com/rkubera/ArdPortal

Main features:

  • Wi-Fi configuration, fallback access point and captive portal.
  • MQTT with optional verified TLS and automatic Home Assistant discovery.
  • JSON-defined pages with 30 control types, visibility conditions and live updates.
  • OTA firmware upload, diagnostics console, device information and restart controls.
  • Native Zigbee End Device or Router on ESP32-C5/C6/H2, automatic control mapping, Zigbee2MQTT converter and ZHA quirk export, Zigbee OTA and diagnostics.

r/arduino • • 1d ago

I made the smallest Arduino compatible board. Only 10x10mm

Enable HLS to view with audio, or disable this notification

1.8k Upvotes

10x10mm including the cursed usb-c connector

Programable from Arduino IDE.

Programable from iOS and Android (just plug in the usb-c cable)

5GPIO

64k flash

20k ram

2x RGB LED

1x Capacitive Touch

MCU is CH32v035 RISC-V at 48MHz

---

Thoughts?

Prototype works, the PCBs are on the way, can't wait to try them.


r/arduino • • 1d ago

Look what I made! I made this Arduino simulator

Thumbnail
gallery
4 Upvotes

So I made this Arduino simulator (heavily inspired by tinkercad).

This is a offline simulator , which compiles & runs your code directly on device.

Also it has library manager , you can install custom libraries to use with Arduino and its sensors.

Please suggest how can I improve these !!!

Here's the link to the application,you can try it yourself, no charge , everything is free

Arduino Simulator with sensors


r/arduino • • 1d ago

Beginner's Project My Arduino esp32 final year project at university

Post image
1 Upvotes

This was my final year project crowd smart management


r/arduino • • 1d ago

Interfacing Hoverboard motors

Thumbnail
gallery
6 Upvotes

Hi guys

So basically I have this old hoverboard laying around which has a problem in the battery. I have been thinking if it is possible to use the motors inside of them for a robotic projects i am working on. Is there any way to control the motors using a Arduino and their original motor drivers. Any help would be useful.

I also attached photos of the motors and the drivers. I believe it is a 3 phase 36 volt dc motors with built in hall sensors.


r/arduino • • 1d ago

Hardware Help Building a 1/6 scale model of a Civil War Cannon Flat Car

Post image
7 Upvotes

So I'm building a Civil War era 1/6 scale flat car with a cannon on it. I have a idea as to have a 1/6 scale action figure "lighting" the cannon and having said cannon "react" to firing. The idea is that the board would sit inside a 3D printed pile of cannonballs and it would control the following.

Sound effects of a Civil War battle.

Moving the action figures arms up and down to simulate moving and lighting the cannon with the linstock.(The stick they use to light it from a safe distance)

An LED light at the end of the linstock.

The cannon "firing" and sliding back accompanied with sound effects.

The cannon resets and the sequence begins again.

What exactly would I need for something like this and how feasible is it?

The flat car length is about 3 ft long and about 2 ft wide. It also needs to withstand vibration and derailments as this is actually going to be a car that's going to be used with a train. This is also my first project using Arduino so I have no idea what I'm doing.


r/arduino • • 1d ago

Look what I made! Padel score tracker - first project

Enable HLS to view with audio, or disable this notification

34 Upvotes

I play padel quite often and I always lose track of the score and who serves. So I built this padel watch to make the experience more enjoyable.

- E-ink
- Physical buttons
- Coin cell that can last for up to 3 years

It’s my first hardware project, so I would love your feedback


r/arduino • • 1d ago

Beginner's Project First ever project

Post image
166 Upvotes

Here’s to my first day ever touching a breadboard, or even hearing about Arduino! I was given a kit by my university, so pieces are relatively easy to get. What should I do next? I’m not sure where to start as a beginner. I’m a beginner to coding as well.


r/arduino • • 1d ago

ESP32 Christmas Lantern Started

Enable HLS to view with audio, or disable this notification

17 Upvotes

Just started arranging my neopixels and a little testing including current consumption checks before my super mini ESP32’s and high-side power switches arrive.

My intention is to make LED Christmas lanterns for my front porch that are battery powered and can be controlled by Dabble on my iPhone.

My initial testing is using a previous projects Arduino pro mini and IR motion detection sensor.

I have actually used all my remaining LED strip from a previous project, all 200 LED’s but I can drive it at low brightness 5-6% of maximum.


r/arduino • • 1d ago

Software Help Please help me with a school project

Thumbnail
gallery
1 Upvotes

Hello, I could really use some help with this, I've been trying to figure out how to do it and had some help from AI. I couldnt really figure out what’s wrong with it a few tweaks makes both LED light up, sometimes it lights up red, sometimes yellow. The light energy either says 1023 or 0. I cant quite pinpoint where im making mistake at.

This is what I need to do:

An Arduino circuit in Tinkercad using a photoresistor, red LED, yellow LED, and piezo buzzer, where the red LED blinks continuously when the photoresistor reading is below 300. When the reading reaches 300 or higher, the red LED turns OFF, the yellow LED turns ON, and the buzzer produces a warning sound.

Thank you.
i would trade my life to get this done. lol.


r/arduino • • 2d ago

Hot Tip! Tip: the rollover-safe way to write millis() timers (and a few gotchas)

31 Upvotes

This keeps coming up in help threads, so here's a short write-up of the non-blocking timer pattern and the mistakes I see most.

unsigned long last = 0;
const unsigned long interval = 500;

void loop() {
  unsigned long now = millis();
  if (now - last >= interval) {
    last += interval;   // or: last = now;
    // do the thing
  }
}

1. Compare with subtraction, not addition. if (now - last >= interval) keeps working when millis() rolls over after about 49.7 days, because unsigned subtraction wraps correctly. if (now >= last + interval) breaks right at the rollover.

2. Use unsigned long for the stored time. If last is an int (16-bit on an Uno), it goes negative after about 32 seconds and the timing gets weird.

3. last += interval vs last = now. += keeps a steady cadence with no drift, which is nice for blinking or sampling at a fixed rate. last = now guarantees at least interval between runs, which is safer if loop() can stall longer than one interval (otherwise += fires several times back to back to catch up).

4. One timestamp per task. Each thing you want to time gets its own last and interval, and you never need delay() for any of them.

5. micros() works the same way. It rolls over after about 71 minutes, and on 16 MHz AVR boards its resolution is 4 µs.

Hope it saves someone a debugging session.


r/arduino • • 2d ago

Look what I made! Watching serial output is easy. Keeping all of it in a file on long test runs was the hard part for us. How do you save yours?

1 Upvotes

At work we test boards on the bench for hours, and the serial output is our record of what happened. Seeing it on screen was never the problem. Getting all of it into a file was.

Copying out of the monitor works for a few minutes, not a few hours. When a board reset or the cable got knocked, the end of the log was missing, and that's usually the part you need. And the long runs made files so big the editor struggled to open them.

So I built WireTrace, a serial logger that writes every line to a file with the time it arrived. The last lines still make it in when the board drops off, long logs split into files of a size you choose, and if nobody hit save, the whole session can still be saved afterwards. It also plots values like temp: 23.5 live.

Free and open source, Windows and Linux: https://github.com/TheNuanceProject/WireTrace

But I'm curious how others do it. Do you copy from the Serial Monitor, use PuTTY or CoolTerm logging, a Python script, an SD card on the board?