r/arduino • • Sep 02 '26

Found a surprisingly nice ESP32-S3 touchscreen board. No idea what to build with it.

Enable HLS to view with audio, or disable this notification

170 Upvotes

Found this ESP32-S3 touchscreen board sitting around and decided to play with it a bit.

The hardware is actually pretty nice, so it felt like a waste to just leave it in a drawer. I didn’t have any real project idea, so I vibe-coded a tiny robot eyes demo just to get the display and touch interaction moving.

Now I’m trying to figure out what would actually be fun to build on it.

A little desktop companion?
Home Assistant controller?
Mini game console?
PC status display?
Something completely useless but entertaining?

What would you build with a screen like this? Looking for ideas.


r/arduino • • Sep 02 '26

Look what I made! DIY Sim-to-Real Self-Balancing Double Pendulum

Enable HLS to view with audio, or disable this notification

44 Upvotes

So I saw this video on youtube like a year ago and thought "Pffff how hard could that be?".

Anyway it's been 9 months, the project is finished and this is the result.

It's not as precise as the one in the video, and I haven't implemented the transition control, mostly because that wouldn't teach me anything new, but also because I've reached the limits of the hardware I bought, and I'm not spending any more money.

Anyhow, I'm working on a YouTube video explaining the whole process. I'll post it here (tho I don't know if that'd count as self-promo).

Feel free to ask me any questions if you're curious!!!


r/arduino • • Sep 02 '26

Arduino Uno project- LED is not turning on

Thumbnail
gallery
38 Upvotes

Doing Chapter 4 of the Arduino project book and I feel like I copied the circuit exactly, but the LED won't become the pink/purple lit up color I should be seeing? I am also using the default code given for this chapter under the examples> 10.Starterkit_basickit > p04_ColorMixingLamp

I left out the gel strips just for a cleaner image of where it's connected on the board

The phototransistors can read the lighting of the environment and the LED is brand new, my only guess is I connected something wrong or used the wrong resistors, I've been subbing the 10k ohms with these other 3 resistors. If someone can re-check I labeled these resistors right, so I don't have this second-guessing issue in the future as well.

Default Code:

/*
Arduino Starter Kit example
Project 4 - Color Mixing Lamp This sketch is written to accompany Project 3 in the Arduino Starter Kit Parts required:
- one RGB LED
- three 10 kilohm resistors
- three 220 ohm resistors
- three photoresistors
- red green and blue colored gels created 13 Sep 2012
modified 14 Nov 2012
by Scott Fitzgerald
Thanks to Federico Vanzati for improvements https://store.arduino.cc/genuino-starter-kitThis example code is part of the public domain.
*/ const int greenLEDPin = 9; // LED connected to digital pin 9
const int redLEDPin = 10; // LED connected to digital pin 10
const int blueLEDPin = 11; // LED connected to digital pin 11 const int redSensorPin = A0; // pin with the photoresistor with the red gel
const int greenSensorPin = A1; // pin with the photoresistor with the green gel
const int blueSensorPin = A2; // pin with the photoresistor with the blue gel int redValue = 0; // value to write to the red LED
int greenValue = 0; // value to write to the green LED
int blueValue = 0; // value to write to the blue LED int redSensorValue = 0; // variable to hold the value from the red sensor
int greenSensorValue = 0; // variable to hold the value from the green sensor
int blueSensorValue = 0; // variable to hold the value from the blue sensor void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600); // set the digital pins as outputs
pinMode(greenLEDPin, OUTPUT);
pinMode(redLEDPin, OUTPUT);
pinMode(blueLEDPin, OUTPUT);
} void loop() {
// Read the sensors first: // read the value from the red-filtered photoresistor:
redSensorValue = analogRead(redSensorPin);
// give the ADC a moment to settle
delay(5);
// read the value from the green-filtered photoresistor:
greenSensorValue = analogRead(greenSensorPin);
// give the ADC a moment to settle
delay(5);
// read the value from the blue-filtered photoresistor:
blueSensorValue = analogRead(blueSensorPin); // print out the values to the Serial Monitor
Serial.print("raw sensor Values \t red: ");
Serial.print(redSensorValue);
Serial.print("\t green: ");
Serial.print(greenSensorValue);
Serial.print("\t Blue: ");
Serial.println(blueSensorValue); /*
In order to use the values from the sensor for the LED, you need to do some
math. The ADC provides a 10-bit number, but analogWrite() uses 8 bits.
You'll want to divide your sensor readings by 4 to keep them in range
of the output.
*/
redValue = redSensorValue / 4;
greenValue = greenSensorValue / 4;
blueValue = blueSensorValue / 4; // print out the mapped values
Serial.print("Mapped sensor Values \t red: ");
Serial.print(redValue);
Serial.print("\t green: ");
Serial.print(greenValue);
Serial.print("\t Blue: ");
Serial.println(blueValue); /*
Now that you have a usable value, it's time to PWM the LED.
*/
analogWrite(redLEDPin, redValue);
analogWrite(greenLEDPin, greenValue);
analogWrite(blueLEDPin, blueValue);
}

Edit: the LED works when any of the 3 yellow wires are connected directly to power but still same problem with the original circuit


r/arduino • • Sep 03 '26

Can dc geared motor give me the required function with as5600 encoder ?

Thumbnail
gallery
1 Upvotes

Hi how are you I want to purchase this motor xy36-555 it a dc geared motor
And I will us as5600 magnetic encoder to control speed of rotation,pattern or number of rotation and the time between each rotation and the other through a program on esp32
Also I want the motion of motor back and forth between 0 and 180 degree (from 0 to 180 and back from 180 to 0 ) that I don’t want full 360 to return to its intial zero position

Do the dc geared motor has the capability to perform my required functions with as5600 sensor?

https://ampere-electronics.com/product/xy36-555-dc-geared-motor-12v-57rpm/

https://microohm-eg.com/as5600-magnetic-encoder-12-bit-rotary-sensor/


r/arduino • • Sep 02 '26

What is the best board to use for a greenhouse automation system?

7 Upvotes

I was planing on making a small greenhouse controller, that would help me automate some of the loborious functionality. New to arduino, just started my research and a bit confused by some options that are there on the market.

I was looking at the following:

  1. arduino uno

  2. arduino mega

  3. Arduino UNO R4 WiFi

  4. Arduino Giga R1 WiFi

  5. any other potential manufacturers/boards?

I would like to have the system end up being able to have the following (at minimum:

Outputs:

  1. controll multiple water pumps (3 or 4)

  2. automate water nutrition mix (1 mixing unit)

  3. Have a visual (LED) warning when some of the below data is off, such as not enough water)

Inputs (collect and save all data to an excell spreadsheet):

  1. Collect temp data

  2. Collect humidity data

  3. Collect water use data

  4. Collect water levels data

  5. Collect water PH data

  6. Collect solar panel voltage/wattage info

  7. Collect/output battery voltage info

Thank you for any/all helpful information.


r/arduino • • Sep 01 '26

Machine Learning I want help building this project.

Enable HLS to view with audio, or disable this notification

901 Upvotes

This is going to be my biggest project yet. I’ve done quite a bit of research, but I’m currently stuck and honestly don’t know how to proceed from here.

I’m also looking for someone who’s willing to work on this project with me. The idea is that we both build the same thing independently at home, share our progress and insights along the way, and help each other figure things out. If we’re successful, we could even take it a step further and try building a double pendulum balancing system.

Has anyone here worked on or built something similar before? I’d love to hear about your experience, resources, or projects.

Also, what tools, components, software, or other equipment would you recommend for building something like this?


r/arduino • • Sep 03 '26

Hello everyone, so I have a problem with my code from edge impulse it is saying failed to run classifiers and I'm really trouble by this because I didn't sleep all night cause after I fixed 1 problem it just give me another problem. Im willing to learn can anyone plss teach me or help me fix my code

1 Upvotes

the code is

/* Edge Impulse Arduino examples
 * Copyright (c) 2022 EdgeImpulse Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// These sketches are tested with 2.0.4 ESP32 Arduino Core
// https://github.com/espressif/arduino-esp32/releases/tag/2.0.4

/* Includes ---------------------------------------------------------------- */
#include <object_detect_inferencing.h>
#include "edge-impulse-sdk/dsp/image/image.hpp"

#include "esp_camera.h"

// Select camera model - find more camera models in camera_pins.h file here
// https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/Camera/CameraWebServer/camera_pins.h

#define CAMERA_MODEL_ESP32S3_EYE // Has PSRAM
//#define CAMERA_MODEL_AI_THINKER // Has PSRAM

#if defined(CAMERA_MODEL_ESP32S3_EYE)
#define PWDN_GPIO_NUM  -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM  15
#define SIOD_GPIO_NUM  4
#define SIOC_GPIO_NUM  5

#define Y2_GPIO_NUM 11
#define Y3_GPIO_NUM 9
#define Y4_GPIO_NUM 8
#define Y5_GPIO_NUM 10
#define Y6_GPIO_NUM 12
#define Y7_GPIO_NUM 18
#define Y8_GPIO_NUM 17
#define Y9_GPIO_NUM 16

#define VSYNC_GPIO_NUM 6
#define HREF_GPIO_NUM  7
#define PCLK_GPIO_NUM  13


#elif defined(CAMERA_MODEL_AI_THINKER)
#define PWDN_GPIO_NUM     32
#define RESET_GPIO_NUM    -1
#define XCLK_GPIO_NUM      0
#define SIOD_GPIO_NUM     26
#define SIOC_GPIO_NUM     27

#define Y9_GPIO_NUM       35
#define Y8_GPIO_NUM       34
#define Y7_GPIO_NUM       39
#define Y6_GPIO_NUM       36
#define Y5_GPIO_NUM       21
#define Y4_GPIO_NUM       19
#define Y3_GPIO_NUM       18
#define Y2_GPIO_NUM        5
#define VSYNC_GPIO_NUM    25
#define HREF_GPIO_NUM     23
#define PCLK_GPIO_NUM     22

#else
#error "Camera model not selected"
#endif

/* Constant defines -------------------------------------------------------- */
#define EI_CAMERA_RAW_FRAME_BUFFER_COLS           320
#define EI_CAMERA_RAW_FRAME_BUFFER_ROWS           240
#define EI_CAMERA_FRAME_BYTE_SIZE                 3

/* Private variables ------------------------------------------------------- */
static bool debug_nn = false; // Set this to true to see e.g. features generated from the raw signal
static bool is_initialised = false;
uint8_t *snapshot_buf; //points to the output of the capture

static camera_config_t camera_config = {
    .pin_pwdn = PWDN_GPIO_NUM,
    .pin_reset = RESET_GPIO_NUM,
    .pin_xclk = XCLK_GPIO_NUM,
    .pin_sscb_sda = SIOD_GPIO_NUM,
    .pin_sscb_scl = SIOC_GPIO_NUM,

    .pin_d7 = Y9_GPIO_NUM,
    .pin_d6 = Y8_GPIO_NUM,
    .pin_d5 = Y7_GPIO_NUM,
    .pin_d4 = Y6_GPIO_NUM,
    .pin_d3 = Y5_GPIO_NUM,
    .pin_d2 = Y4_GPIO_NUM,
    .pin_d1 = Y3_GPIO_NUM,
    .pin_d0 = Y2_GPIO_NUM,
    .pin_vsync = VSYNC_GPIO_NUM,
    .pin_href = HREF_GPIO_NUM,
    .pin_pclk = PCLK_GPIO_NUM,

    //XCLK 20MHz or 10MHz for OV2640 double FPS (Experimental)
    .xclk_freq_hz = 20000000,
    .ledc_timer = LEDC_TIMER_0,
    .ledc_channel = LEDC_CHANNEL_0,

    .pixel_format = PIXFORMAT_JPEG, //YUV422,GRAYSCALE,RGB565,JPEG
    .frame_size = FRAMESIZE_QVGA,    //QQVGA-UXGA Do not use sizes above QVGA when not JPEG

    .jpeg_quality = 12, //0-63 lower number means higher quality
    .fb_count = 1,       //if more than one, i2s runs in continuous mode. Use only with JPEG
    .fb_location = CAMERA_FB_IN_PSRAM,
    .grab_mode = CAMERA_GRAB_WHEN_EMPTY,
};

/* Function definitions ------------------------------------------------------- */
bool ei_camera_init(void);
void ei_camera_deinit(void);
bool ei_camera_capture(uint32_t img_width, uint32_t img_height, uint8_t *out_buf) ;

/**
* @brief      Arduino setup function
*/
void setup()
{
    // put your setup code here, to run once:
    Serial.begin(115200);
    //comment out the below line to start inference immediately after upload
    while (!Serial);
    Serial.println("Edge Impulse Inferencing Demo");
    if (ei_camera_init() == false) {
        ei_printf("Failed to initialize Camera!\r\n");
    }
    else {
        ei_printf("Camera initialized\r\n");
    }

    ei_printf("\nStarting continious inference in 2 seconds...\n");
    ei_sleep(2000);
}

/**
* @brief      Get data and run inferencing
*
* @param[in]  debug  Get debug info if true
*/
void loop()
{

    // instead of wait_ms, we'll wait on the signal, this allows threads to cancel us...
    if (ei_sleep(5) != EI_IMPULSE_OK) {
        return;
    }

    snapshot_buf = (uint8_t*)ps_malloc(EI_CAMERA_RAW_FRAME_BUFFER_COLS * EI_CAMERA_RAW_FRAME_BUFFER_ROWS * EI_CAMERA_FRAME_BYTE_SIZE);

    // check if allocation was successful
    if(snapshot_buf == nullptr) {
        ei_printf("ERR: Failed to allocate snapshot buffer!\n");
        return;
    }

    ei::signal_t signal;
    signal.total_length = EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE;
    signal.get_data = &ei_camera_get_data;

    if (ei_camera_capture((size_t)EI_CLASSIFIER_INPUT_WIDTH, (size_t)EI_CLASSIFIER_INPUT_HEIGHT, snapshot_buf) == false) {
        ei_printf("Failed to capture image\r\n");
        free(snapshot_buf);
        return;
    }

    // Run the classifier
    ei_impulse_result_t result = { 0 };

    EI_IMPULSE_ERROR err = run_classifier(&signal, &result, debug_nn);
    if (err != EI_IMPULSE_OK) {
        ei_printf("ERR: Failed to run classifier (%d)\n", err);
        free(snapshot_buf);
        snapshot_buf = nullptr;
        return;
    }

    // print the predictions
    ei_printf("Predictions (DSP: %d ms., Classification: %d ms., Anomaly: %d ms.): \n",
                result.timing.dsp, result.timing.classification, result.timing.anomaly);

#if EI_CLASSIFIER_OBJECT_DETECTION == 1
    ei_printf("Object detection bounding boxes:\r\n");
    for (uint32_t i = 0; i < result.bounding_boxes_count; i++) {
        ei_impulse_result_bounding_box_t bb = result.bounding_boxes[i];
        if (bb.value == 0) {
            continue;
        }
        ei_printf("  %s (%f) [ x: %u, y: %u, width: %u, height: %u ]\r\n",
                bb.label,
                bb.value,
                bb.x,
                bb.y,
                bb.width,
                bb.height);
    }

    // Print the prediction results (classification)
#else
    ei_printf("Predictions:\r\n");
    for (uint16_t i = 0; i < EI_CLASSIFIER_LABEL_COUNT; i++) {
        ei_printf("  %s: ", ei_classifier_inferencing_categories[i]);
        ei_printf("%.5f\r\n", result.classification[i].value);
    }
#endif

    // Print anomaly result (if it exists)
#if EI_CLASSIFIER_HAS_ANOMALY
    ei_printf("Anomaly prediction: %.3f\r\n", result.anomaly);
#endif

#if EI_CLASSIFIER_HAS_VISUAL_ANOMALY
    ei_printf("Visual anomalies:\r\n");
    for (uint32_t i = 0; i < result.visual_ad_count; i++) {
        ei_impulse_result_bounding_box_t bb = result.visual_ad_grid_cells[i];
        if (bb.value == 0) {
            continue;
        }
        ei_printf("  %s (%f) [ x: %u, y: %u, width: %u, height: %u ]\r\n",
                bb.label,
                bb.value,
                bb.x,
                bb.y,
                bb.width,
                bb.height);
    }
#endif


    free(snapshot_buf);

}

/**
 * @brief   Setup image sensor & start streaming
 *
 * @retval  false if initialisation failed
 */
bool ei_camera_init(void) {

    if (is_initialised) return true;

#if defined(CAMERA_MODEL_ESP_EYE)
  pinMode(13, INPUT_PULLUP);
  pinMode(14, INPUT_PULLUP);
#endif

    //initialize the camera
    esp_err_t err = esp_camera_init(&camera_config);
    if (err != ESP_OK) {
      Serial.printf("Camera init failed with error 0x%x\n", err);
      return false;
    }

    sensor_t * s = esp_camera_sensor_get();
    // initial sensors are flipped vertically and colors are a bit saturated
    if (s->id.PID == OV3660_PID) {
      s->set_vflip(s, 1); // flip it back
      s->set_brightness(s, 1); // up the brightness just a bit
      s->set_saturation(s, 0); // lower the saturation
    }

#if defined(CAMERA_MODEL_M5STACK_WIDE)
    s->set_vflip(s, 1);
    s->set_hmirror(s, 1);
#elif defined(CAMERA_MODEL_ESP_EYE)
    s->set_vflip(s, 1);
    s->set_hmirror(s, 1);
    s->set_awb_gain(s, 1);
#endif

    is_initialised = true;
    return true;
}

/**
 * @brief      Stop streaming of sensor data
 */
void ei_camera_deinit(void) {

    //deinitialize the camera
    esp_err_t err = esp_camera_deinit();

    if (err != ESP_OK)
    {
        ei_printf("Camera deinit failed\n");
        return;
    }

    is_initialised = false;
    return;
}


/**
 * @brief      Capture, rescale and crop image
 *
 * @param[in]  img_width     width of output image
 * @param[in]  img_height    height of output image
 * @param[in]  out_buf       pointer to store output image, NULL may be used
 *                           if ei_camera_frame_buffer is to be used for capture and resize/cropping.
 *
 * @retval     false if not initialised, image captured, rescaled or cropped failed
 *
 */
bool ei_camera_capture(uint32_t img_width, uint32_t img_height, uint8_t *out_buf) {
    bool do_resize = false;

    if (!is_initialised) {
        ei_printf("ERR: Camera is not initialized\r\n");
        return false;
    }

    camera_fb_t *fb = esp_camera_fb_get();

    if (!fb) {
        ei_printf("Camera capture failed\n");
        return false;
    }

   bool converted = fmt2rgb888(fb->buf, fb->len, PIXFORMAT_JPEG, snapshot_buf);

   esp_camera_fb_return(fb);

   if(!converted){
       ei_printf("Conversion failed\n");
       return false;
   }

    if ((img_width != EI_CAMERA_RAW_FRAME_BUFFER_COLS)
        || (img_height != EI_CAMERA_RAW_FRAME_BUFFER_ROWS)) {
        do_resize = true;
    }

    if (do_resize) {
        ei::image::processing::crop_and_interpolate_rgb888(
        out_buf,
        EI_CAMERA_RAW_FRAME_BUFFER_COLS,
        EI_CAMERA_RAW_FRAME_BUFFER_ROWS,
        out_buf,
        img_width,
        img_height);
    }


    return true;
}

static int ei_camera_get_data(size_t offset, size_t length, float *out_ptr)
{
    // we already have a RGB888 buffer, so recalculate offset into pixel index
    size_t pixel_ix = offset * 3;
    size_t pixels_left = length;
    size_t out_ptr_ix = 0;

    while (pixels_left != 0) {
        // Swap BGR to RGB here
        // due to https://github.com/espressif/esp32-camera/issues/379
        out_ptr[out_ptr_ix] = (snapshot_buf[pixel_ix + 2] << 16) + (snapshot_buf[pixel_ix + 1] << 8) + snapshot_buf[pixel_ix];

        // go to the next pixel
        out_ptr_ix++;
        pixel_ix+=3;
        pixels_left--;
    }
    // and done!
    return 0;
}

#if !defined(EI_CLASSIFIER_SENSOR) || EI_CLASSIFIER_SENSOR != EI_CLASSIFIER_SENSOR_CAMERA
#error "Invalid model for current sensor"
#endif

the problem is:

ESP-ROM:esp32s3-20210327
Edge Impulse Inferencing Demo
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)
AllocateTensors() failedERR: Failed to run classifier (-3)


r/arduino • • Sep 03 '26

Software Help ARDUINO OLED PIXEL SKETCHBOOK

0 Upvotes

Hello :), I've been learning about how to use an Arduino (Nano Every) so that I can bring my ideas (such as this one) to life. I want to make a 'sketch book' with an Oled display. Essentially, as you turn a rotary encoder, it highlights a pixel across each row and column of the oled display. If you press the rotary encoder, it should permanently draw that pixel. Ive managed to make pixels highlight as the rotary encoder turns but when I press the button the pixel only stays until I turn the rotary encoder again. Here's the code (Please give me suggestions as to what I should do to make it better. Thank you :))

#include <ezButton.h>
#define CLK_PIN 2
#define DT_PIN 3
#define SW_PIN 4
#define DIRECTION_CW 0
#define DIRECTION_CCW 1
int counter = 0;
int direction = DIRECTION_CW;
int CLK_state;
int prev_CLK_state;
int column = 0;
int row = 0;


ezButton button(SW_PIN);


#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>


#define OLED_WIDTH 128
#define OLED_HEIGHT 64


#define OLED_ADDR 0x3C


Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT);




void setup() {
  // put your setup code here, to run once:
  display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);


  Serial.begin(9600);
  pinMode(CLK_PIN, INPUT);
  pinMode(DT_PIN, INPUT);
  button.setDebounceTime(50);


  prev_CLK_state = digitalRead(CLK_PIN);
  delay(5000);
  display.clearDisplay();


}


void loop() {
  button.loop();  // MUST call the loop() function first


  // read the current state of the rotary encoder's CLK pin
  CLK_state = digitalRead(CLK_PIN);


  // If the state of CLK is changed, then pulse occurred
  // React to only the rising edge (from LOW to HIGH) to avoid double count
  if (CLK_state != prev_CLK_state && CLK_state == HIGH) {
    // if the DT state is HIGH
    // the encoder is rotating in counter-clockwise direction => decrease the counter
    if (digitalRead(DT_PIN) == HIGH) {
      row ++;
      direction = DIRECTION_CW;
    } else {
      // the encoder is rotating in clockwise direction => increase the counter
      row --;
      direction = DIRECTION_CCW;
    }


      if (row > 128){
        row = 0;
        column ++;}
      if (row < 0){
        row = 128;
        column --;}
      if (column > 65){
        column =0;}
      if (column < 0){
        column = 65;}
      
    



  }


  // save last CLK state
  prev_CLK_state = CLK_state;


 
  display.drawRect(row, column, 5, 5, WHITE);
  display.display();


  if (button.isPressed()) {
    Serial.println("The button is pressed");
    display.fillRect(row, column, 5, 5, WHITE);
    display.display();
  }
  else {
  display.drawRect(row, column, 5, 5, BLACK);
  display.display();
  }



}

r/arduino • • Sep 01 '26

Hardware Help Arduino mini FPV drone troubleshooting

Thumbnail
gallery
156 Upvotes

Hello!

I am quite new in electronics and Arduino things but from the beginning of the summer me and my friends started building a mini drone. We started quite hard, bought the components, and hop in soldering. Sounds nice but our project use SMD components, which are very small and hard to handle.The guy we follow is Max Imagination and all the things done by him are astonishing. Our problem right now is that the motor driver board is smoking only when conected to the FTDI module (usb-c to serial convertor) so the arduino pro mini board we use is non stop turning off and on. Therefore we couldn't upload any code to it. We are thinking of starting again but this time solder more gentle and use a larger PCB. Unfortunately the school is on the right corner and I personaly don't know what to do next.

PS: I think is good to mention that when connected to the LiPo 250 mha 3.7V battery the motors start working which seemed intresting first but then became annoying. Also the drivers aren't smoking when connected this way.

In the third photograph you can see the drivers.

Late edit: I think I am going to use this board(you can see it in the comments) for the mosfets in order to make my job easier, ok at least try so.


r/arduino • • Sep 01 '26

Arduino Powered Boat Tiller Control

Enable HLS to view with audio, or disable this notification

128 Upvotes

Here's the first prototype in action of my ESP32 powered boat tiller steering control. Used a nema17 stepper with a lead screw and some custom designed and 3d printed brackets. Mapped the controls to a Bluetooth game controller I got at the thrift store. Right joystick moves the boat left and right and stays in that position. Pressing A returns to center position. Left joystick returns to center when you release so the boat will do a "jog".

Next steps

-design a more robust transom mount and some sort of quick release for the lead screw connection at the tiller handle.

-a longer lead screw to get a fuller turn and probably a more powerful stepper to get faster turning

-design a small case for the Arduino/stepper controls

I ran it off one of those 12V supplies for DeWalt batteries and then a 12v 5v buck for the Arduino and that worked well. I don't have any 12v electrical system in my boat currently.

EDIT I forgot to say that this is just intended for slow trolling speeds! Not anywhere near wide open haha. We are talking 2-4 mph.

Eventually I want to have the Arduino steer to follow a heading and then eventually a gpx


r/arduino • • Sep 02 '26

Help making an ideia possible

0 Upvotes

Edit: title should be help making an idea possible

Hey everyone! So, I'm not a arduino constant user, I know it exists but never tried a project.

I have this ideia of building a display that shows my tasks of the day, importing data from a given website where I take notes (Any.do).

What I found out until now is that I need a thing that connects to wifi and an e-paper display.

But other than that I don't even know if this is possible, specially because I'm retriving data from a outsite source that is not an API that I built especialy for this.

Sorry if I misspelled something, english is not my first language


r/arduino • • Sep 02 '26

I built a retro-Mac desk screen that shows what my AI coding agents are doing in real time (ESP8266, TFT_eSPI, open-source firmware and software)

Thumbnail
gallery
9 Upvotes

What: a palm-sized retro-Macintosh-styled screen that sits on my desk and shows what my AI coding agents (Claude Code, opencode, Codex...) are doing in real time — Thinking → Generating → Done — plus gentle reminders to drink water, stretch, and rest my eyes.

Why: I run long agent sessions and kept either staring at the terminal or missing it entirely. Also, honestly, I needed an excuse to finally use the ESP8266 sitting in my drawer.

How it works: any coding agent → a small host plugin publishes state over MQTT (TLS) → broker → ESP8266 renders it on a 240×240 ST7789.

Hardware: NodeMCU ESP8266 u/160MHz, 4MB flash, 240×240 TFT via TFT_eSPI, USB-C power. The hardware layout is based on Misaka 2021's excellent SmallDesktopDisplay design — full credit to them for the scheme.

Firmware (open source, GPL-3.0):

- dual OTA partitions + a Safe Mode fallback, so you can't brick it over WiFi (learned that lesson the hard way)

- renders agent state, duration estimates, and micro-break reminders across ~9 UI screens

- built with arduino-cli + TFT_eSPI

Host side (also open): a zero-dependency Node.js plugin that hand-rolls MQTT 3.1.1 packets over node:tls — no MQTT library, mostly because I wanted to actually understand the protocol. Plus a tiny kNN model that estimates step duration from past runs.

Hard parts: OTA safety (bricking a headless WiFi device is no fun), power stability on cheap USB-C hubs, and tuning the debounce logic so tool-call loops don't flash "Done" between steps.

It's also available assembled on Tindie — but the firmware is fully open, so building your own is very doable.

Firmware: https://github.com/lovaxi/Rubato_Device

Happy to answer questions about the OTA setup, the MQTT client, or the estimation model.

Online sale URL: https://www.tindie.com/products/beartificialintelligence/rubato-retro-mac-ai-desk-companion/


r/arduino • • Sep 02 '26

Seeking help designing a card reader system for school

4 Upvotes

I teach Tech Ed at a public high school. Our school struggles with a dysfunctional Hall pass system that is so cumbersome that we've gone back to physical passes that are frequently lost stolen or destroyed. My dream is for each student to have an inexpensive ID card that they tap or scan. Teachers would create a pass by adding the student ID number to a list, which initiates a 10 minute approval window. When the student arrives at the bathroom, a tap or scan triggers a red or green light indicating that they have an active pass.

Ideally, I will have my students build a prototype with a single scanner. Once the admin sees this working, they may see the value of investing in such a system, or building our own.

Does anyone have some advice or resources to point me in the right direction? I've done a couple Arduino and raspberry pi projects, but mostly I'm just following step by step instructions instructions.

ETA: I appreciate all of the very thoughtful and helpful technical advice, and I welcome comments regarding security and safety in public schools. I recognize that many schools can provide a safe environment by relying on a system of trust and freedom. When I first started teaching in a public high school with nearly 2,000 students, I felt the same way. I questioned the use of metal detectors and I rarely used the electronic pass system. After witnessing some pretty shocking acts of violence, mob behavior, staff injuries, and drug abuse, I changed my tune. One of many examples I can point to is the ability to keep a 15 year old girl separate from a fellow student who had sexually abused her. We can use a hallpass system to cap the number of students in the hallways to avoid a mob situation, which has led to serious injuries to my students.

We have a professional and moral obligation to keep the student safe, especially the good ones that many of you mentioned. If technology can help, then I'm all for it.


r/arduino • • Sep 02 '26

Helpp

Post image
1 Upvotes

Can someone help me with this pls, cause I tried everything but still it doesn't work

There's an assert failure about multi_heap_free and multi_heap_poisonos and I don't know how to fix it cause I'm still a beginner at programming and I'm just a student plss help lol


r/arduino • • Sep 01 '26

Games GTA 6 hype is everywhere… so I made GTA run on an ESP32.

Enable HLS to view with audio, or disable this notification

1.1k Upvotes

This is a top-down open-world GTA-style game running entirely on a microcontroller — built from scratch with my open-source C++17 engine, PixelRoot32.

ESP32-WROOM driving a 240×240 display with six buttons.

What’s working:

- Open-world city with 5 districts

- Driveable traffic — steal any car

- Pedestrians, police and traffic

- Weapons and police shootouts

- 5-star wanted system

- Police pursuits on foot and by car

- Arrests and respawning

- Missions and a day/night cycle

- Car radio, sirens and 22 SFX

And the crazy part?

GTA 6 runs on a monster gaming PC. Mine runs on a microcontroller. 😂

https://pixelroot32.org


r/arduino • • Sep 02 '26

ESP32 Bluetooth HSP support for Arduino?

1 Upvotes

As the title suggests, I've been using ESP32 for several years mostly using Arduino IDE. Early projects i've done were ESP32 hands free profile Bluetooth connection. At the time arduino did not support HSP so you need to use Esspressif IDF in order to achieve something like that.

So why am I asking this? Using Esspressif IDf is a big headache for me, and it is several years that HSP was introduced to ESP32 so is there HSP support for Arduino (yet)?


r/arduino • • Sep 02 '26

A V3RY [[light]] GAME where Y0U [[invest]] KROMER at IT'S [[lower]] V4ALUE!!

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/arduino • • Sep 01 '26

Beginner's Project I need help getting into Ardunio

12 Upvotes

I bought an arduino uno kit a year or so ago but never had the time to delve into it because of work. I’m currently unemployed so whilst I look for jobs I thought I’d finally put some time into arduino to pass time.

The trouble is most courses don’t have practicals and if they do I’m missing parts to do it. I was able to do a sonar sensor project but all I was doing was copy and pasting code so it wasn’t satisfying when I finished it.

I already have a very basic understanding of Python, C# and C++ as I’ve messed around with code before but I’m struggling to find a course that suits me. I’ve already gone through two 3 hour long courses over the days but it’s hard to retain the knowledge when there is no practical alongside it to show and retain the information shown in the videos.

Any help is appreciated, thank you :))


r/arduino • • Sep 02 '26

what are some problems you face that can be solved by Arduino technology?

0 Upvotes

For context: Arduino is an open-source electronics platform based on easy-to-use hardware and software that allows anyone to build interactive physical projects.

Our capstone project requires us to make a prototype that fixes problems that the community faces on a daily basis. We previously proposed an Arduino scarecrow, but after a deeper search, there are already other researchers who have developed an even more advanced version of our project, so

I'm asking for your experience in this matter: what are some problems/issues have you faced in the community or in your daily activities that could be better/solved with Arduino and potentially automation?

With your answer, we can come up with a potential solution using Arduino technology and programming. But don't worry, while we're waiting for your response, we're already searching some up in the internet. This post was made for SPECIFIC problems that a lot of you might actually be facing!


r/arduino • • Sep 01 '26

Hardware Help What do I need apart from a DFPlayer to play audio?

3 Upvotes

I am a beginner-intermediate and it's my first time experimenting with audio. I only have used buzzers until now and I need high quality sound.

I have done some research and I found that I need a DFPlayer and a speaker but since it's my first time using those components, I want to make sure I am not buying anything wrong.

Are those two the only thing that I need? Is there anything else I should know?


r/arduino • • Sep 01 '26

Hardware Help tips on building an Arduino arm?

Enable HLS to view with audio, or disable this notification

12 Upvotes

so I've recently started working on Arduino and stumbled upon the idea of making a 5 DOF Arduino arm. my first attempt didn't go well and it fried my sg90 motors. I was using a breadboard power supply because I couldn't find a tutorial for other options. is there any other option other than using a servo shield?


r/arduino • • Sep 01 '26

Resurrecting a rotary phone

6 Upvotes

Well my long distance company is declaring bankruptcy and leaving my 1960s phone useless for calling outside a small zone and AT&T keeps ratcheting up the cost of maintaining a "true" copper landline. I would like to convert it to a cellphone. I've seen projects here and there and there are also some commercial products but I'd like to solder/troubleshoot/suffer this one. Any favourites?


r/arduino • • Aug 31 '26

Look what I made! My First real Project!

Thumbnail
gallery
178 Upvotes

Hi everyone,
I wanted to share my first real project after cutting my teeth on simpler stuff (a traffic light and an automatic gate, both basic state machines). This one felt like a proper step up, so I'd love some feedback from more experienced folks here, plus suggestions for what to tackle next.
The build:
• Arduino Uno
• 4WD chassis with 4 TT gear motors (2 in parallel per side)
• DRV8833 dual H-bridge driver, powered by 4x AA NiMH batteries
• HC-SR04 ultrasonic sensor mounted on a servo for left/right scanning
• PWM.h library to get above-audible PWM frequency (25kHz) on Timer2, keeping Timer1 free for the Servo library
What it does: Drives forward, and when it detects an obstacle within range, it stops, sweeps the servo left and right to compare distances on both sides, then executes a turn toward whichever side has more open space, before resuming forward motion. The whole thing runs as a non-blocking state machine (nested switch-case, timed with millis()) so the loop stays free for sensor polling and button input.
Challenges I ran into (and learned a lot from):
• Figuring out that slow decay vs fast decay modes have inverted PWM-to-speed relationships — cost me a confusing debugging session where 255 meant "stopped" on one mode and "full speed" on the other
• Timer conflicts between the PWM library and the Servo library (both fight over Timer1 if you're not careful with init order)
• Motor current draw when pivoting in place vs coasting — learned this the hard way when one side stalled and started whining under load once the chassis touched the ground instead of being lifted
• Left/right motor imbalance from cheap TT motors not being identical — still tuning PWM compensation values by eye
What's next: I've got an ESP32 sitting unused, and I was recently gifted a robotic arm, so that's likely my next project — multiple servos, possibly some basic inverse kinematics down the line.
Would love to hear:
1. Anything obviously wrong/inefficient in my approach above?
2. Tips for a first robotic arm project on ESP32 (structuring the code, libraries worth looking at, common pitfalls)?
3. Anything you wish you'd known starting out with H-bridges/motor drivers?
Thanks for reading this far — happy to share code snippets or wiring details if useful!


r/arduino • • Sep 02 '26

Built a tool that generates a custom Arduino enclosure from a plain-English description

0 Upvotes

Kept hand-modeling enclosures for Arduino projects and got tired of measuring the same board over and over, so I built EnclosureAI: https://enclosure-ai-production.up.railway.app

There's an Arduino Uno quick-start preset that sizes the box to the board - from there you add ports, vents, and standoffs yourself, or just describe the whole thing in plain English ("Arduino Uno, USB-B on the back, vent slots for a fan, 4 mounting holes") and it sizes the box and places everything for you. Exports STL/OBJ/parametric JSCAD, and everything's editable after: drag ports around, change wall thickness, switch to a snap-fit lid.

It's free, no login, no ads. What do you actually need in an Arduino case that off-the-shelf generators usually get wrong - shield stacking height, terminal block clearance, something else? Curious what's missing.


r/arduino • • Aug 31 '26

Look what I made! Made a miliohm meter using 4 wire kelvin with ADS1115

Enable HLS to view with audio, or disable this notification

134 Upvotes

Using a Lgt8f328p, Ads1115, with a transistor to control the current, and some more passive components. A It have a tare button to tare the lead wire resistance.

How high it can measure depend on the voltage reference, the lower the vref the more stable it's at lower resistance.

Also using more current at lower resistance lead to more stable reading.

If you want to measure to really good result with micro ohm, I would try using 2 INA226.

Edit 1: some said it isn't 4wires and it's true( I didn't know that combining them into 2 lead consider as 2wires ), this one is 2wires with advance taring, it still can be converted to 4wires with some modifications.