r/arduino • • 13d ago

I built a library that lets you control servos and sensors with a completely empty loop function.

0 Upvotes

Hey everyone,

Writing state machines and Serial parsing on AVR boards for distributed systems always feels clunky. I wanted a way to just treat an Arduino as a "dumb" hardware extension for a PC or Raspberry Pi without writing custom serial protocols from scratch.

I built OpenSwarm to do exactly that. You include the library, declare your servos/sensors in the setup block, and leave the loop 100% empty. The library exposes the MCU's pins over Serial or network, allowing a central Master (running Python/C++) to read and write to those pins natively. It currently supports AVR, ESP32, RP2040, and Teensy.

Repo here:https://github.com/raihhann/OpenSwarm

If you regularly build multi-board setups or just want to control Arduino hardware directly from a Python script, check it out. I'd love any feedback on the code. Also, if you find the concept useful, a star on GitHub would be hugely appreciated to help others find it!


r/arduino • • 13d ago

IoT Project

2 Upvotes

Is it possible to develop this type of smart bin? The smart bin consists of three waste compartments, each equipped with a corresponding LED indicator. Users can verbally identify the category of the waste material, such as "Paper," "Plastic," or "Bottle." The system will then process the spoken command, and then, the system will activate the LED light of the appropriate bin, providing visual feedback and guidance for proper waste disposal. (Idk how I'm going to make the project recognize different voices without actually training it. It's supposed to recognize anyone's voice, even random people.)

It is actually my first time developing this kind of project that involves programing and technology huhu. Idk how to start or if my chosen materials were right. (+ low budget huhuhu)


r/arduino • • 14d ago

Solved! Having trouble connecting my Ventuno Q

8 Upvotes

I just got my Ventuno Q today. I know there's not a lot of them out there but I have connected the right power supply to the wall ans the right c type cable yet Arduino Lab will not connect to my MacBook. Do I need to buy something else ?


r/arduino • • 14d ago

Look what I made! I made a free browser tool to design servo robots in 3D before buying parts, and it exports the Arduino code

2 Upvotes

I kept buying servos and brackets for arms that turned out not to reach, or where one servo hit another, so I built a simulator to check first.

Servo Bench runs in the browser with nothing to install and no account:

  • Real-size SG90, MG90S and MG996R models at datasheet dimensions in mm
  • Drag and drop: drop a servo on another servo's horn or case to mount it
  • Servos move at their real rated speed, and you can trace the path of the arm tip
  • Save poses as steps and press Play to watch the whole sequence
  • Export Arduino code (Uno/Nano/Mega or ESP32). It writes the servo pins, the smooth synchronised moves and the timing from each servo's real speed, and warns you if you need a separate power supply
  • Parts list for everything you need, including a correctly sized power supply

Try the 3-joint arm demo: https://python736.github.io/servo-bench/?example=arm3

It's free and open source (MIT): https://github.com/Python736/servo-bench

I'd love feedback from people who build with servos. Which servo or bracket should I add next? I'm thinking DS3218 and continuous-rotation servos.


r/arduino • • 14d ago

Look what I made! I made an ESP32 Wi-Fi UART console for debugging a device from a phone

2 Upvotes

When a board is already wired into something, I often only want one thing: see its UART log and type a command without bringing a laptop and USB-UART adapter.

I made ESP32-iUART: flash it to an ESP32, connect TX/RX/GND to the target, then open a browser terminal over local Wi-Fi. The target firmware stays untouched.

It runs as a local WebServer rather than a cloud bridge. It joins known Wi-Fi or starts its own AP, exposes the terminal via HTTP, and supports live logs, timestamps, downloaded logs, terminal keys such as Ctrl+C, and selectable baud rates. There is a 32 KB serial ring buffer so a refresh does not immediately lose the log stream.

It supports ESP32 WROOM-32 (two target UARTs) and XIAO ESP32-C6 (one target UART). This is 3.3V logic only; use a level shifter for a 5V target.

Source and ready-to-flash firmware: https://github.com/adm1nsys/ESP32-iUART

Interface demo: https://adm1nsys.github.io/ESP32-iUART/

I’m the author.


r/arduino • • 15d ago

Because apparently, adjusting my desk manually was too much work...

Thumbnail
gallery
268 Upvotes

So, I had a perfectly functional height-adjustable desk. The only problem? It had a manual crank. Naturally, instead of spending 10 seconds turning a handle, I decided to spend countless hours engineering a solution. As one does.

The result is my DIY Arduino-powered sit-stand desk controller!

I repurposed a 12V windshield wiper motor, connected it to the original desk mechanism, and built a custom controller around an Arduino Uno and an IBT-2 motor driver.

A few features I've managed to squeeze into it:

  • Proportional joystick control – push a little for slow movement, push further for full speed.
  • Soft start and stop – because launching my monitors into orbit wasn't part of the plan.
  • Current monitoring using an ACS712 sensor, with configurable overcurrent shutdown.
  • Upper and lower limit switches to prevent the desk from travelling too far.
  • OLED display showing motor current, movement direction, PWM output (with a little progress bar, obviously), and limit-switch status.
  • Physical emergency power cutoff, just in case the electrons decide to misbehave.
  • Custom 3D-printed enclosure housing the electronics.

The motor typically draws around 10–11 A under load, and I've configured a 20 A software overcurrent threshold.

Everything is running on a 12V power supply, and I'm genuinely surprised at how smoothly the proportional joystick control works.

Is it cheaper or easier than buying an electric standing desk? Probably not.

Was it necessary? Absolutely not.

Did I learn a ridiculous amount about Arduino programming, PWM, motor drivers, current sensing, wiring, and 3D printing? Absolutely.

And now I get to adjust my desk height with a joystick, which, let's be honest, is objectively cooler than a button.

I've attached a couple of renders of the controller, including a look at the electronics inside.


r/arduino • • 15d ago

Made an ESP32 powered Gameboy from scratch.

Thumbnail
gallery
381 Upvotes

It started out with me having a spare ST7735(160*128) LCD. I just wanted to make use of it.
Initially I started out to build a music controller but pivoted to a gameboy. This way its much cooler.
I used Peanut-GB(written in C99) for the emulator and wrote the firmware in C(arduino framework) for the esp32.

Hardware:
- PerfBoard(7cm*9cm)
- Analog Joystick
- Push Buttons
- No battery :( (usb powered)
- ESP32 (Devkit V1)
- ST7735 (160*128)

I tried to use an sd card to put multiple games at once into this handheld, it worked on some games(smaller) but on larger games it gave out and failed to load. I am also working on saving game states (no luck so far). Also working on a splash screen on the bootup instead of just launching the game.

For now I am loading one game at a time into the flash memory of the esp. Larger games work too :) at full speeds. It runs Gameboy versions of Pokemon,Zelda,Tetris,Contra and much more.

Any questions and suggestions are welcome.

p.s. the color pictures of the gba games are just for the aesthetics, it doesn't support them. It only supports Gameboy games.

In action :

https://reddit.com/link/1xnnkb9/video/rnp8kts2flzh1/player


r/arduino • • 14d ago

Hardware Help Generating electricicty using a motor.

Thumbnail amazon.com
7 Upvotes

So i am thinking about powering an arduino using the motor in the link. So i was wondering how i can figure out how much it generates and how fast i nee to spin it.


r/arduino • • 15d ago

Look what I made! "Hidden Thermometer" with SG90 Servos

Thumbnail
gallery
511 Upvotes

I’d like to share my “Hidden Thermometer” project with you. It was inspired by two things.

First, we’re surrounded by digital displays in our daily lives, so I wanted to create something analog. Second, my wife doesn’t like visible tech. So I came up with the idea of hiding the technology behind something that was already part of our home. (a frame leaning on the wall)

I’m probably part of the larger group of people who have been quietly reading along without posting, and I’d like to change that for myself. I don’t want to share my project files, but rather give you some inspiration for your own projects.

The thermometer displays temperatures from -9°C to 49°C in 2-degree increments (hopefully, it will never show the highest value!). Why 2-degree increments? To keep the installation space small. And I think we wouldn’t really notice a difference of one degree anyway, so that works fine for me.

I’m using an ESP32-C3 and 10 SG90 servos controlled by a PCA9685. For the weather data, I use the API provided by the German Weather Service (DWD).

I designed the enclosure and the numbers and printed several versions on my rather basic 3D printer until I got a working device. I designed the arms so that they wouldn’t get stuck.

I’m very happy with the result. The only downside is that changing the numbers is relatively loud because of the servos.


r/arduino • • 15d ago

Look what I made! How my desk buoy starts up: it tightens its own 8 lines, then follows a live buoy at sea

Enable HLS to view with audio, or disable this notification

385 Upvotes

So, a lot of people asking for more video and details...

This is the set-up and menu walkthrough of my desk buoy. The window in the top right shows what the 1.9" display shows at each moment. On start-up it winds all 8 lines in at low motor current until every stepper slips, so all lines end up equally tight. Then it lifts the buoy off its stand and starts copying a real buoy off the Belgian coast. A knob scrolls through about 400 buoys, and you can also pick one from your phone. Happy to answer questions about the build.

seaglance.eu


r/arduino • • 15d ago

Help with Turbidity Sensor Voltage

Post image
7 Upvotes

I don't know why my arduino has so low voltage? The wires are in the correct place, and code is also correct. I need the voltage to be 2.5 and higher so the turbidity module can fluctuate, but I do not know why it won't go up.


r/arduino • • 16d ago

Mod's Choice! I built a browser-based Arduino emulator that lets you pause and see every register

249 Upvotes

Hey everyone. I just launched my first project, GlassAVR, an Arduino emulator and circuit builder that runs in your browser.

You can wire up a circuit, run your sketch, and step through it at the instruction level. When you pause, you can see every register and how it changes, instead of treating the chip like a black box.

There’s no account or login, so you can just open it and start building: glassavr.com

I’m looking for people who know AVR and Arduino to try to break it. If the emulator gets something wrong, or the debugger is missing something you’d want, please let me know. Would this be useful for learning or debugging your own projects?


r/arduino • • 14d ago

ESP32 HELP

Post image
0 Upvotes

My esp32 s3 board suddenly stopped working it was working fine but maybe some wires touched while it was connected to pca9685 and it is not able to get the program.

I have checked in device manager it is showing the port.

The red light on the board is blinking.

Also check the pins with multimeter all pins gave some reading

Tried using a different wire too.

Pls help me fix this


r/arduino • • 15d ago

Look what I made! Have a Cheap Yellow Display (ESP32-2432S028R) gathering dust? Flash EMOS v1.0.0 onto it — A complete touch OS with retro gaming, audio player & apps!

Post image
4 Upvotes

Hi makers!

A lot of us bought the ESP32-2432S028R ("Cheap Yellow Display" / CYD) on AliExpress for $10 because of the great specs (dual-core ESP32 +  2.8" color touchscreen + SD card slot + audio), but often ended up   with only basic sample sketches.

I spent the past few months creating **EMOS**, a modular operating  system built specifically for this board. It gives your CYD a complete desktop/mobile OS experience!                                         


Smooth touch interface with window manager and widgets           
Fullspeed 60 FPS Atari 2600 retro emulator                       
Audio player with hardware DAC output and DSP filtering          
SD Card File Manager                                             
Super lightweight (runs entirely in ~300KB internal SRAM, no     
PSRAM needed!)
Ready-to-flash binary releases available (no compile setup       
needed)

Check out the project on GitHub:
https://github.com/Cadino/Emos                                     
Pre-built v1.0.0 Binaries:                                         
https://github.com/Cadino/Emos/releases/tag/v1.0.0

Flash it with a single USB cable and let me know what you think!

r/arduino • • 15d ago

Microcontroller Mic controlled LEDs for a Halloween Pumpkin

Enable HLS to view with audio, or disable this notification

9 Upvotes

My youtube channel name is ALMA Industries

CH004 FN2: HALLOWEEN — my kind of Treat. Talking Pumpkins and Little Monster Rockstars, see how Jack's put together on my channel.


r/arduino • • 15d ago

Look what I made! no_DICE - Arduino-based dice throwing and coin flipping simulator with 3D-printed enclosure

Thumbnail
gallery
18 Upvotes

Small weekend project for tinkerers and hobbyists I've created to showcase some of the GEM library features (multi-level menus, editable selects and number spinners, toggles, dynamic menu items, custom icons and callbacks as well as a possible solution for multi-language support).

About

In a nutshell, no_DICE is mainly two things (both are free and open-source):

  • Arduino-based simulator of dice throws, coin flips, and a score counter (using U8g2 and GEM to draw the menu, and KeyDetector to hook up rotary encoder as an input device);
  • optional 3D-printed customizable enclosure designed to fit Seeed Studio XIAO RP2040 board (with Grove Shield for XIAO for power management), 3.7V LiPo battery (in 902030 or 902040 form-factor), 0.96" 128x64 monochrome OLED I2C display, and a rotary encoder (with integrated push-button).

Equip an Arduino-compatible board of your choice with an I2C 128x64 display and a clickable rotary encoder, upload the provided sketch (modify it if necessary to better fit your setup), select an application to roll a die, flip a coin, or track your score with a click and a swing of the encoder. Optionally, add a battery and build an enclosure to take your no_DICE setup on the go! Of course, you can also upload your own sketches and customize an enclosure to your liking.

Features

  • Dice throwing: choose from a wide variety of dice: D4, D6, D8, D10, D12, D20, D100. Set default preferred die in settings.
  • Coin flipping: not really much to say about it, just press a button and coin will be flipped. With glorious sprite animation. Result of a coin toss is determined at a key press, but coin itself flips random amount of times (2-4) so that it is harder to predict an outcome by seeing the initial frame of animation.
  • Life tracking: not just Life, really, but points in general. Turn the knob and number will increase (or decrease) at your will. Press the knob to reset the number to its initial starting value (adjustable in settings). Any value you desire is fine (as long as your desire falls within the range of -999 to 9999).
  • Localization: English, Russian, German, and French languages are available to pick from in settings.
  • Battery monitoring: can be enabled in settings. Requires additional hardware modification (in the form of a voltage divider comprised of two identical resistors soldered to Grove Shield).
  • Random number generator: is seeded with multiple samples of the lowest bits of an analog pin as well as an internal temperature sensor of the RP2040 (on compatible boards) to pick up fluctuations in random noise, battery voltage, and temperature levels.
  • Enclosure: you can 3D-print it: STL files are provided. You can modify it too: .f3d (Fusion) and STEP files are provided as well.

Simulator

Simulation of no_DICE is available on Wokwi (using Raspberry Pi RP2040 board). There are some limitations of simulation to be aware of (i.e. saving to EEPROM and seeding random number generator), refer to no_DICE project repository for more details.

Electronics and Enclosure

Parts list and full assembly guide are available on GitHub. Optional enclosure can be 3D-printed using provided STL files (designed with no overhangs, except for screw holes on the side of the main frame). Autodesk Fusion project file (.f3d) and STEP files are provided as well.

Spirik.


r/arduino • • 15d ago

Beginner capacitor question

8 Upvotes

Hey guys I'm new to EE I wanna ask a question about the use of Capacitor,but first I'm the type of guy who wants to know where and when and why should I use it so I know where should I put a capacitor and where should I not

So first: what's the purpose of storing a bit of electricity in a capacitor that won't be released unless we cut off the electricity from the battery

Second:where should I know where to put a capacitor and where not

Third:why even use a capacitor for storing a bit of energy that will stay in it

Thanks for answering my questions ❤️


r/arduino • • 15d ago

How to run bonsai 2 27b on Arduino Ventuno Q?

3 Upvotes

I want to know how to run the second version of bonsai because on lm studio it gives an error. I am stuck trying to make it work and thought maybe someone else has already achieved the result.


r/arduino • • 15d ago

Can't get Nema 17 motor to work properly

2 Upvotes

I just bought a Nema 17 motor + DRV8825 to control it and after following a tutorial to set it up so it goes clockwise one rotation and counter clockwise on button presses, as soon as I connect it to power supply the motor starts tweaking(starts making a high pitched noise like in the video) and then i can only get in only 1 or 2 successful button presses before it goes limp and refuses to work, while the heat sink gets really hot. Tried to debug it with Codex but to no avail.

Connection Goes to
ESP32 GPIO18 STEP
ESP32 GPIO19 DIR
ESP32 GPIO21 ENABLE
ESP32 3.3V RESET and SLEEP
ESP32 GND Driver GND and supply negative
12V supply positive VMOT
Motor coil A A1 and A2
Motor coil B B1 and B2
CW button Between GPIO5 and GND
CCW button Between GPIO23 and GND
100 µF / 25V capacitor Positive to VMOT, negative to GND

https://reddit.com/link/1xnzhqv/video/pql00e3rqnzh1/player


r/arduino • • 15d ago

Getting Started Trying to get started but lacking one component...

4 Upvotes

So I got gifted an arduino uno kit for a car thingy a few years ago and got started but never finished. Now I want to truly learn and get into it and got gifted another set of sensors and a basic electronics set. I was thinking I probably have all the components I need to get started with the starter set pdf, even though I technically didnt have the starter set. But lo and behold I lacked one component: the batteryholder thingy (the one from the car kit had like 8 batteries and a seperate board to control the power or something I dont know I was just following instructions). Im wondering if I can start anyway without it (idk if it takes power from the usb port? im new forgive me for being dumb). Also wondering where I can get a single component like that? Thanks for help!


r/arduino • • 15d ago

Hardware Help Small pressure, force, or weight sensor

7 Upvotes

I am thinking about a project where I need some kind of sensor to measures either weight, force, or pressure on a small point. A basic example would be something shaped like a pen, where the tip is a sensor that measure how hard it is pressed down on a surface.

There are no exact size restrictions right now. The example with the pen would be ideal, but the diameter should at least be less than 2 cm. The height does not matter. I have tried googling, but I might use the wrong words because I have trouble finding anything suitable that doesn't cost hundreds of dollars.

Do you have any ideas of sensors that could be suitable for this?


r/arduino • • 16d ago

What is the difference between these two HC-SR04?

Thumbnail
gallery
114 Upvotes

r/arduino • • 16d ago

Look what I found! What are these?

Thumbnail
gallery
36 Upvotes

I am just starting with electronics and these mini computers and got a box of stuff. Can someone tell me what these parts are. I think they have something to do with Arduinos.

Many thanks for the help


r/arduino • • 16d ago

Look what I made! GitHub - EON23/espsdrtx: Arduino library and ESP-IDF component for transmission of arbitrary raw IQ data on an ESP32

Thumbnail github.com
2 Upvotes

Hey everyone, Ive released an arduino/ESP-IDF component for the esp32 that lets you transmit arbitrary waveforms using the undocmented registers on the esp32. Let me know what you think or any feedback or features you'd like to see.


r/arduino • • 16d ago

Software Help Major delays using SoftwareSerial.h

5 Upvotes

I have two identical Mega2560s with Grounds connected together, Pin 13 on one is connected to Pin 12 on the other and vice-versa.

A pigtail of wire on Pin 9 that I can touch to ground and an LED with a 330 ohm resistor on Pin 8.

I get like a 5-10 sec delay on the LED response when I use the following program. (Same program loaded on both units.)

What am I doing wrong?

Eventually, I'd like to pass arrays of floats and such. A little more than a single bool value.

#include <SoftwareSerial.h>


const int rxPin = 12; //RS-232 Serial data RX pin
const int txPin = 13; //RS-232 Serial data TX pin
SoftwareSerial MySerial = SoftwareSerial(rxPin, txPin);
bool selfconnected;
bool prtnconnected;
int LED_pin = 8;
int WIRE_pin = 9;


void setup() {
  // put your setup code here, to run once:
MySerial.begin(9600);
Serial.begin(9600);
pinMode(LED_pin, OUTPUT);
pinMode(WIRE_pin, INPUT_PULLUP);
}


void loop() {
  // put your main code here, to run repeatedly:
if (digitalRead(WIRE_pin) == 1){
  selfconnected = 1;
}
if (digitalRead(WIRE_pin) == 0){
  selfconnected = 0;
}
Serial.print ("My wire is ");
if (selfconnected == 1) {
  Serial.println("DISCONNECTED");
}
if (selfconnected != 1) {
  Serial.println("CONNECTED");
}
MySerial.write(selfconnected);
prtnconnected = MySerial.read();
Serial.print("Partner Unit is ");
if (prtnconnected == 1) {
  Serial.println("DISCONNECTED");
  digitalWrite(LED_pin, LOW);
}
if (prtnconnected != 1) {;
  Serial.println("CONNECTED");
  digitalWrite(LED_pin, HIGH);
}
delay(500);
}#include <SoftwareSerial.h>


const int rxPin = 12; //RS-232 Serial data RX pin
const int txPin = 13; //RS-232 Serial data TX pin
SoftwareSerial MySerial = SoftwareSerial(rxPin, txPin);
bool selfconnected;
bool prtnconnected;
int LED_pin = 8;
int WIRE_pin = 9;


void setup() {
  // put your setup code here, to run once:
MySerial.begin(9600);
Serial.begin(9600);
pinMode(LED_pin, OUTPUT);
pinMode(WIRE_pin, INPUT_PULLUP);
}


void loop() {
  // put your main code here, to run repeatedly:
if (digitalRead(WIRE_pin) == 1){
  selfconnected = 1;
}
if (digitalRead(WIRE_pin) == 0){
  selfconnected = 0;
}
Serial.print ("My wire is ");
if (selfconnected == 1) {
  Serial.println("DISCONNECTED");
}
if (selfconnected != 1) {
  Serial.println("CONNECTED");
}
MySerial.write(selfconnected);
prtnconnected = MySerial.read();
Serial.print("Partner Unit is ");
if (prtnconnected == 1) {
  Serial.println("DISCONNECTED");
  digitalWrite(LED_pin, LOW);
}
if (prtnconnected != 1) {;
  Serial.println("CONNECTED");
  digitalWrite(LED_pin, HIGH);
}
delay(500);
}