r/arduino • • 10h ago

Look what I made! Micro servo robot arm

51 Upvotes

It's a tiny ~120mm 4dof robot arm powered by 4 mg90's, 1 sg90 and an Arduino Nano ESP32.

I spent all my free time in the past few weeks modelling and remodelling robot arms in freecad, learning as I go. The first few designs didn't look very nice, it was too heavy or I just couldn't get everything to fit in my length/weight constraints. I finally decided to just model the most rudimentary arm I could finish — no wire management, no smooth flowing anesthetics like some of the robot arms I've seen on the internet... Just reach the finish line and make it move.

I quite like it now, and I think I'll keep working on it and see how that goes. It's open source too github (very incomplete)


r/arduino • • 2h ago

Software Help Having trouble displaying a bitmap with u8g2 and ST7920

21 Upvotes

I'm using the programs that convert a pixel drawing into the array for the bitmap and using drawXMBP to display it.

It displays but there are always two pixels cut off the side. This is supposed to be 10 pixels wide, but it is 8. But the height is correct. I ave tried changing the canvas size but no difference. Always displays incorrectly:

const unsigned char wifiFull[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

if (signalStrength < -1)
{
  u8g2.setFontMode(1);
  u8g2.setBitmapMode(1);
  u8g2.drawXBMP(0, 0, 128, 64, wifiFull);
}

It's just a small icon in the corner. Instead of being 10 pixels wide, two pixel colums are truncated on the left, no matter where I put the bitmap. I cant work it out. I've done this before with no problem.

Suggestions?


r/arduino • • 10h ago

Look what I made! I made this Cocktail Machine with Arduino

Thumbnail
youtu.be
16 Upvotes

I hope you like it!


r/arduino • • 11h ago

Hardware Help LED and resistor

Post image
17 Upvotes

Does it look like it's in the right place?
Red LED
Long leg A10
Short leg A15
330Ω resistor B5 to B10
Red wire Arduino D13 to A5
Brown wire B15 to the 12th hole on the negative

Green LED
Long leg E25
Short leg E28
resistor E20 to D25
Green wire Arduino D12 to D20
Black wire D28 to the 10th hole on the negative


r/arduino • • 6h ago

ToF Sensor VL53L1X accuracy issues

Thumbnail
gallery
6 Upvotes

Reading the datasheet and user manual, there is an expected offset but that's not really my issue. A consistent offset would be nullified in what I'm doing because I'm calculating height differences (so offset is canceled out). I'm seeing inconsistent offset depending on range. For example, at a measured 2.7" and 6", the sensor measured 1.9" and 6.3" respectively.

I've ruled out wall interference by measuring outside the container with identical results. I also took 15 sample points to confirm there isn't a noise issue, which there isn't.

The user manual suggests this could be a crosstalk issue as a result of the protective glass over the sensor and the solution is to deliberately recalibrate the instrument on a new curve derived from readings from measured distances. That just seems ridiculous to me. Has anyone else dealt with this?

I have it on short distance mode and was using 8x8 SPAD but am switching to 16x16 and will see how it performs tomorrow.


r/arduino • • 18h ago

Getting RPM data out of these cheap 12v fan by using it single phase hall effect latch

Thumbnail
gallery
22 Upvotes

This is a pretty simple process if you have mess with them before, do beware that some have sealed hole.

Just connect the 2nd or the 3th pin to the your MCU digital pin, and make sure to use high value resistor like 1M ohm or somthing, my arduino crash if i connect it raw, and your may too, even death is possible.

I wasnt able to find that fan hall effect latch data sheat, but i figure they are the same anyway.

My fan hall effect latch, output high at 180 and 360, so the my code divide it by 2.

Doing some coding and thats it.

I did check it accuratecy using slowmo, they spit out the same number so that good enough.

Mine is in RPS but converting it to RPM is easy.
Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time), 1);  //rps
Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time) * 60.0, 1);//rpm

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT);
  pinMode(3, INPUT);
}



void loop() {
  static uint16_t fan1_rotation_accumulate = 0;
  static uint16_t fan2_rotation_accumulate = 0;
  static unsigned long start;
  static unsigned long end;
  static float measure_time = 1;  // rps every second
  static bool fan1_high_flag = false;
  static bool fan2_high_flag = false;


/*
  //fixed time acumulation
  start = micros();
  while (1) {
    //fan 1
    if (digitalRead(2) == HIGH) {


      if (fan1_high_flag == false) {
        fan1_high_flag = true;
        fan1_rotation_accumulate++;
      }
    } else {
      fan1_high_flag = false;
    }
    //fan 2
    if (digitalRead(3) == HIGH) {


      if (fan2_high_flag == false) {
        fan2_high_flag = true;
        fan2_rotation_accumulate++;
      }
    } else {
      fan2_high_flag = false;
    }


    end = micros();
    if ((end - start) / 1000000.0 >= measure_time) {
      Serial.print("fan_1:");
      Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time), 1);  //rps
                                                                        //  Serial.println(((fan1_rotation_accumulate / 2.0) / measure_time) * 60.0, 1);//rpm
      fan1_rotation_accumulate = 0;
      Serial.print("fan_2:");
      Serial.println(((fan2_rotation_accumulate / 2.0) / measure_time), 1);
      fan2_rotation_accumulate = 0;
      break;
    }
  }


*/
  
  //avg by time
  // fit for stable ouput
  // instead of waiting 60s to see result, you can see the result get more narrowed down with time
  // run longer time frame by changing the time_frame measuring window
  // it wont be good for fast changing rpm


  static uint8_t acum_time = 1;
  static uint8_t time_frame = 60;  //in second


  start = micros();


  while (1) {
    //fan 1
    if (digitalRead(2) == HIGH) {


      if (fan1_high_flag == false) {
        fan1_high_flag = true;
        fan1_rotation_accumulate++;
      }
    } else {
      fan1_high_flag = false;
    }
    //fan 2
    if (digitalRead(3) == HIGH) {


      if (fan2_high_flag == false) {
        fan2_high_flag = true;
        fan2_rotation_accumulate++;
      }
    } else {
      fan2_high_flag = false;
    }


    end = micros();
    if ((end - start) / 1000000.0 >= measure_time) {
      //Serial.println(acum_time);


      Serial.print("fan_1:");
      Serial.println(((fan1_rotation_accumulate / 2.0) / (measure_time * acum_time)), 2);


      Serial.print("fan_2:");
      Serial.println(((fan2_rotation_accumulate / 2.0) / (measure_time * acum_time)), 2);
      acum_time++;
      if (acum_time >= time_frame) {
        fan1_rotation_accumulate = 0;
        fan2_rotation_accumulate = 0;
        acum_time = 1;
      }
      break;
    }
  }
  
}

r/arduino • • 10h ago

Hardware Help Any idea why my lock isn’t working in this L298N module?

Post image
4 Upvotes

Im sorry in advance, Im way out of my depth here, im just an X-ray student that had to build some type of circuit related to xray physics for a project due this Thursday.

Im having a hard time getting my lock to move. The pushbutton works, the batteries work, and I can feel the spring inside the lock moving when I press the push button. However the lock doesn’t depress on its own without putting pressure on it first. It only needs light pressure, such as lightly holding a finger on top of it while you press the push button. I thought it could be a problem with the lock, so I bought a new one, but it works even worse. So I bought two more locks of different brands, and these don’t even move at all. So then I thought maybe the circuit needs more power? I plugged an additional 9V battery in, but that still didn’t work.

I have 2 9V batteries, a 12V/1A pushbutton, and a 12V/.43A battery attached. I also tried a 12V/.83A battery.
Any help is greatly appreciated. TIA!


r/arduino • • 13h ago

Beginner holiday build: 30-LED WS2812B Christmas light strip on an Arduino UNO (wiring, power tip, and starter code)

6 Upvotes

Sharing a quick 25-minute breadboard holiday build for anyone looking for a simple weekend project with an Arduino UNO and a strip of addressable LEDs.

Parts used:

  • 1x Arduino UNO Rev3 (or clone)
  • 1x WS2812B addressable LED strip (30 LEDs, 5 V)
  • 1x 470 ohm resistor (in series on the data line)
  • 1x 1000 uF electrolytic capacitor (across the 5 V supply rails)
  • 1x 5 V / 3 A external power supply
  • Breadboard and jumper wires

Wiring:

  1. Connect the 5 V external supply positive and ground to the breadboard power rails, with the 1000 uF capacitor across +5 V and GND (watch the polarity stripe on the negative leg).
  2. Power the WS2812B strip from the external 5 V and GND rails.
  3. Connect Arduino GND to the same breadboard GND rail (common ground is essential so the data signal has a reference).
  4. Connect Arduino pin 6 through the 470 ohm resistor to the strip's DIN (data in) pad, checking the arrows printed on the strip so data flows in the right direction.

The one trap beginners hit: do not power 30 LEDs straight from the Arduino's 5 V pin. At full white each pixel can pull around 60 mA (up to 1.8 A total), which will brown out or overheat the board. Giving the strip its own 5 V supply and tying grounds together keeps everything rock solid.

Starter sketch (using the FastLED library):

#include <FastLED.h>

#define DATA_PIN 6
#define NUM_LEDS 30
CRGB leds[NUM_LEDS];

void setup() {
  FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setBrightness(80);
}

void loop() {
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i] = (i % 2 == 0) ? CRGB::Red : CRGB::Green;
  }
  FastLED.show();
  delay(600);
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i] = (i % 2 == 0) ? CRGB::Green : CRGB::Red;
  }
  FastLED.show();
  delay(600);
}

If you want a printable wiring diagram and live supplier pricing for the parts list, the full step-by-step guide is here: https://usefootprint.app/projects/ws2812b-neopixel-strip?utm_source=reddit&utm_medium=post&utm_campaign=reddit&utm_content=arduino_neopixel


r/arduino • • 8h ago

Fast FFT class for LGT8F328P Arduino

2 Upvotes

FFT class to take different sizes eg 128, 64, 32, 16, 8 bins.

Speeds: 128: 6.1us, 64: 2.7us, 32: 1.12us.

https://github.com/beaka/uDSU_DSP


r/arduino • • 1d ago

Look what I made! I made a thing for people that lost one of their arms so they can still use a pc.

57 Upvotes

It does't work that well cuz I used very cheap components but still. :))

It can simulate mouse movement and some kind of edge scrolling, when the pointer leaves an imaginary circle it keeps going, then simulate clicks and some keyboard presses.

Overall I should have used an esp instead of arduino or make use of a wifi module with arduino and make use of the wifi instead of using a very cheap radio transmiter.
And I should have used more accelerometer/gyroscopes, the more expensive ones for better precision, and so I can have more ways to detect and calculate input.

The glove has one arduino nano, one radio transmiter, one accelrometer gyrscope, the usb dongle has one arduino micro pro and a radio receiver.


r/arduino • • 19h ago

Beginner's Project Pro micro button box

Post image
7 Upvotes

Hey all, looking for a bit of help and direction. Making a button box for sim racing. Pretty basic and just emulates ignition wipers lights.
- it has 4 toggles and 1 button all led and using vcc on the board for power

- The left most toggle controls the button. Meaning when it is off the button is off. When on ignition turns on. Then pressing the button will start the car.

- the other toggles will be off or on. And just be used to control lights or wipers in the game.

As the game uses key presses I’m unsure if I should be using the keyboard library or joystick library.

Can someone help point me in the right direction on the correct way to go library wise, maybe a basic toggle example


r/arduino • • 1d ago

Safe prototype

27 Upvotes

So ive been working on this for a day now and got a prototype and eventually am going to 3d print a frame and desing a pcb,yall got any other ideas that i should add to it


r/arduino • • 14h ago

Uno Q Can we install N-map in the Arduino UNO Q

1 Upvotes

just trying to set up an home lab for the penetration testing and network security stuff is anyone has and idea to download the external packages from apt like n-map to download in the Arduino-OS


r/arduino • • 20h ago

How many copies of the ESP32 core do you have? Wrong answer, there's one more.

3 Upvotes

The installed Arduino (CLI) Univere is a f******* mess and far away from 'Keep It Simple'.

Quick inventory of my machine because its running out of space.

  • AppData\Local\Arduino15: cores, download cache, indexes. Shared by IDE 1.8, IDE 2 and arduino-cli, so of course they step on each other
  • Documents\Arduino\libraries: libs. Not next to the cores. Why would they be
  • AppData\Roaming\arduino-ide: IDE 2 settings, a browser cache, and an arduino-cli.yaml (+ .bak)
  • ~\.arduinoIDE: another IDE 2 folder. Just because
  • AppData\Roaming\Arduino IDE: a log file for every day I dared to open it since 2024
  • ~\.platformio: its own toolchains, its own libs, its own universe
  • VS Code extension of the week: "point me to your IDE install" or "I'll download my own cli, thanks"

And where does all of this live? Not in a directory you picked. 20GB buried in AppData, hidden by default, somewhere you'd never look. Your user profile just quietly grows. Disk cleanup won't touch it. Backup tools happily copy it every night.

Result: the same core several times at ~1.5 GB each, two versions of a library fighting over which one gets picked, and a sketch that compiles in one tool and dies in the other.

New PC? Good luck. Backing up "your Arduino setup"? Which one?

All I want is one folder. Boards, libs, config. Copy it, zip it, done.

Is it just me, or does everyone have an Arduino-old-DONT-DELETE lying around?


r/arduino • • 18h ago

Why would a print statement solves an input or timing problem?

2 Upvotes

I built a very simple system with a momentary switch that activates a linear actuator, which then goes through a sequence of motions (hence the Arduino instead of a simple switch).

My main loop has a variable that tracks the previous status of the switch and then I assign a digitalRead() to a second variable. By comparing the digitalRead to the previous status, the code only responds once to status changes (I don't know how long the user will hold the button down).

It worked, but had unexpected problems - the actuator would only complete part of its sequence and then branch into other parts or re-start its sequence. I figured the mechanical switch was bouncing or something like that, so I added in delays and so forth, but nothing solved the problem.

To try to figure it out, I added a print statement immediately after where I assign the digitalRead() status so I could see what status was being read. This was just a debug attempt, but it completely solved the problem and everything worked properly. I thought that was a coincidence, I must have made some other change somewhere so when everything was working properly, I commented out the print statement, and the timing problems came back.

I tried other variations like just doing a second digitalRead() after the first one (without printing anything) and assigning the second digitalRead() to a dummy variable, but none of those fixed the problem; the print statement seemed to clear some buffer or something.

Can anyone explain this, or is there a better way to fix the problem? Thanks.

void loop() {

buttonPush = digitalRead(buttonPin);

Serial.println(digitalRead(buttonPin)); <--- This is the debug line that fixed everything

if (buttonPush == HIGH && buttonState == LOW) { // Button released

// Go through button release sequence

}


r/arduino • • 1d ago

I'm turning an old phone into a rover that will cross 3.9 km of fields to the next village. Day 0

5 Upvotes

Hi all! This is Kevin – an old Android phone that spent years in a drawer. Now he's getting a second life.

The plan: build a small rover around the phone and send it 3.9 km across fields and dirt roads to the next village here in Slovakia. Alone.

Current parts:

- old smartphone (brain, camera, face)

- Arduino

- 4x yellow TT gear motors + wheels

- motor driver

- power: the phone's own battery + a power bank

Big unknowns so far:

- will the power bank last for a 4 km trip

- how the motors will handle mud and grass

- how the phone should talk to the Arduino (USB OTG vs Bluetooth)

What would you change before I start building? Any tips for driving through fields with TT motors are very welcome 🙏

I'll post updates as Kevin progresses.

YouTube: https://youtube.com/@kevintherover

Website: www.kevintherover.com


r/arduino • • 1d ago

Beginner's Project My First College Engineering Project An Arduino-Based Line Follower Robot

Thumbnail
gallery
22 Upvotes

r/arduino • • 1d ago

lsdx, a LGT8F328P transceiver using DSU functions

17 Upvotes

lsdx is a standalone, single-chip HF SSB/CW transceiver built on the LGT8F328P (32 MHz LQFP48 Nano board). By exploiting the LGT8F328P's hardware DSP unit (uDSU FMACSS instructions) and 12-bit ADC, lsdx runs both a quadrature phasing SDR receiver and a polar Envelope Elimination and Restoration (EER) SSB exciter on an 8-bit microcontroller with only 2 KB of SRAM.

Key Features

  • Dual-Mode DSP Engine (15.625 kSPS):
  • Receive: 12-bit simultaneous I/Q sampling, digital DC-offset removal, I/Q gain & phase trim, 4th-order Butterworth biquad roofing filters (switchable 400 Hz CW, 2.2 kHz Narrow SSB, 2.8 kHz Wide SSB), 47-tap Hilbert transform, and fast digital AGC with noise-floor hold.
  • Transmit (Polar EER): Automatic mic DC tracking, fast-attack/slow-release speech compressor & soft-knee limiter, 47-tap Hilbert analytic splitter, hardware dsu_mag() / dsu_atan2() polar conversion, 125 kHz fast PWM envelope output (OC2B), and direct 40-bit phase/frequency modulation of an AD9850 DDS.

Dual Synthesizer Architecture:

  • RX LO: Si5351A generating hardware quadrature (CLK0 / CLK1 90° phase offset) across 100 kHz – 30 MHz.
  • TX Exciter: AD9850 driven via direct-port bit-banging (~125 MHz reference clock), powered down automatically during RX.
  • Non-Blocking UI & Persistence:
  • Incremental 16×2 I2C character LCD driver (PCF8574) with S-meter / TX envelope bargraph (updates 1 character per loop pass so audio DSP never stutters).
  • Built-in calibration menus for I/Q Gain, I/Q Phase, and Si5351 Crystal Offset, saved automatically to I2C FRAM

Putting the code up for anyone interested in cheap SDR but the filters an math library might be useful for music or motor control.

Will put some pics up when progress from breadboard to pcb.

https://github.com/beaka/lsdx


r/arduino • • 1d ago

need help for maze solving robot

1 Upvotes

hi guys, second year cs student here. we are trying to make a maze solving line tracking robot using an arduino uno r3 and a l293d microcontroller. heres the maze we need to traverse through:

the main challenge here is how to prioritise the robot so it does the specified action we need it to, ie keep going forward, go right/left, hit the obstacle outside. we are using 5 IR sensors, for front, left, right, and 2 to keep the bot on the line. the qs is, to keep wall sensing the first priority then the line tracking as second, how many more sensors will be required, how will the sensors be mounted, ie downward facing or facing the wall, and is it optimal to use a simple if/else system for the turns or a FSM to determine which action to take at a particular junction?


r/arduino • • 1d ago

Beginner's Project help

Thumbnail
gallery
28 Upvotes

If I place an IR break beam sensor below the end of the water tube and adjust the flow regulator so that the water falls in drops will the sensor be able to detect and count each drop accurately?

++ what would be the best way to attach both the transmitter and receiver to the metal ring of this stand knowing that they need to be perfectly aligned and at the same height?

(((Sorry if this is a dumb question it’s my first Arduino project and I’m just worried if I might mess something up ))


r/arduino • • 1d ago

is it possible to control speed and rotation of servo motor at the same time?

1 Upvotes

Hello i have a project due next week for arduino, they require me to include a servo motor and add another component to the project. They mostly evaluate the coding. I have an idea in mind but im just wondering if this is possible. I am not experienced enough with arduino yet and do not have enough time to test the components and play with the coding. ive only done a blinking led project so far.

So what i had in mind was to include a joystick to control the movement of the servo and add a potentiometer to control the speeding rotation. Is it possible to control the speed of the potentiometer? Im not sure of the limits of what u can do on arduino. Ive seen cases where people were able to control the movement of the servo with a joystick and a potentiometer but not both together that serve a different purpose each.


r/arduino • • 1d ago

Solved! Any chance there are soldered screw terminals that would fit this faster?

Post image
12 Upvotes

I'm looking for some kind of a screw terminal for this. Just wondering what size I should buy.


r/arduino • • 2d ago

ESP32 ESP32 Web Oscilloscope: a free oscilloscope in your browser

Thumbnail
debjoy-howlader.github.io
46 Upvotes

Yes, I built another esp32 oscilloscope. I started this project partly out of necessity, cuz I can't afford a bench scope, yet, and procuring a good used scope is also a pain where I live (also I didn't look up the numerous projects that already existed, till after I already started working on this :p), but this was a great learning experience.

Disclaimer:

  • This was mostly designed and tested with Claude. I ran the tests on the board, and fixed what didn't match my meter.
  • The scope does a 46 point self-test at startup and there's a full Verification Guide with roughly 40 manual tests which were performed on the test board a ESP32-DevKit-v1 and is suggested u perform before trusting readings from the scope. There's also a 2 point manual calibration option to bring the scope within ~4mV of your meter.
  • The scope is designed and tested on ESP32-DevKit-v1 and thus compatibility/ functionality is limited to original esp32 boards only.
  • This is not a lab instrument/ a bench scope replacement and shouldn't be considered/ used as such.

What it is: flash the firmware from the web page (no toolchain), open the scope page in Chrome/Edge, and your ESP32 becomes a scope.

  • Up to 4 channels, 250 kSa/s real-time (shared between channels)
  • Equivalent-time sampling for repeating signals, so you can see fast edges (a 1 kOhm source rose in ~20-40 ns on the screen)
  • Trigger, FFT, X-Y, cursors, measurements, math channels
  • Built-in square/sine generator to test it against itself
  • Docs written for beginners: how the/a scope works, how to verify the scope against a multimeter

Limits:

  • Original ESP32 only
  • input 0 - 3.3V (voltages shouldn't be less than 0V or more than 3.3V, that means no AC voltages). For measuring voltages outside this range a divider or bias circuit is required (check the docs)
  • no anti-alias filter

r/arduino • • 2d ago

Today I created a radar using servo motor, ultrasonic sensor, Arduino uno and a beeper.

37 Upvotes

Yeah it was hard but it's cool as it's a big step for me. Ignore my parents btw 😭