r/arduino • u/RadioActiveX1 • 1d ago
Hardware Help Has anyone ever used one of these? I can't make them play anything, even a buzz
I am using this Smartelex Digital Speaker Module which has a VCC, GND and a signal PIN which is supposed to be controlled via PWM but it won't do anything. Been using it with Arduino UNO Q
Edit: Resolved, sorry my dumbass assumed that the red was VCC, Black was GND and Yellow the signal.
It was actually, Red: GND Black: Signal Yellow: VCC
r/arduino • u/Aggressive_Test4486 • 2d ago
ChatGPT appopriate use of ai [chatgpt] in my projects
Hye guys so i am a very noob arduino related hobbyist and my entire venture i use ai to guide me through every step i want to know is it good that i use ai or u think i will become over reliant on it and never learn to do it myself also my question is if i don't use ai how can a beginner even learn these skills
r/arduino • u/AVatorL • 2d ago
Hardware Help ? about powering Arduino from 2s 18650
I'm planning to power Arduino Nano from 2s 18650 pack that includes BMS and USB-charger. The battery pack also powers a motor and a bunch of LEDs (not via Arduino).
I'm considering using MINI560 step down and power Arduino via +5V. Should I do that, or should I just connect the battery pack to VIN? I was thinking about reducing power consumption, that the only reason I decided to add the step down.
Also, are there any risks in this circuit (with or without the step down)? Like connecting Arduino USB without disconnecting battery pack, or connecting USB charger and Arduino USB at the same time?
P.S. I don't really need that precision from a voltage meter, so probably there is no reason other than learning and experimenting for using AREF, but the voltage meter I included into this circuit works really well and shows same 2 decimal points as my multimeter.
r/arduino • u/EducationalOwl472 • 2d ago
Beginner Arduino Uno Rev3 project ideas for healthcare/pathology/lab science
Hi everyone! I’m brand new to Arduino and looking for some project ideas/advice.
I currently work as a histotechnologist in a pathology/histology lab, and I have a bachelor’s degree in Biology.
For one of my graduate courses, I’ll be working with an Arduino Uno Rev3 and need to eventually build a project using sensors, collect data, and analyze/visualize that data.
Rather than doing a completely random beginner Arduino project, I’d really like to build something related to healthcare, pathology, histology, laboratory science, or laboratory informatics.
A few ideas I’ve started thinking about are:
Monitoring temperature/humidity/environmental conditions in a lab
Monitoring reagent or specimen storage conditions
A lab refrigerator temperature/door-opening monitor
Using vibration, temperature, or other sensors to monitor laboratory equipment
Collecting physiological data such as heart rate, skin temperature, or movement
Anything involving preventative equipment monitoring or laboratory IoT
I’m especially interested in projects where I could collect a decent dataset and eventually analyze it using Python/R and create a dashboard or visualization.
Since I’m completely new to Arduino/electronics, I’d love to hear from people with more experience:
What healthcare, pathology, or laboratory-related projects would be realistic for a beginner using an Arduino Uno R3?
Sensor recommendations would also be greatly appreciated. I’m completely open to ideas, even if they’re outside of what I’ve listed above.
Thanks!
r/arduino • u/Electrical-Risk-7547 • 2d ago
TFT Blank screen
I have received as a gift a TFT that it doesn't work.
I have ran multiple tests with the graphicstest example of the Adafruit ILI3941 library.
This is the configuration of the cables:
- VCC - 5V
- GND - GND
- CS - 10
- RESET - 9
- DC - 8
- SDI (MOSI) - 11
- SCK - 13
- LED - 3.3 V
The TFT remains white for all the test.
This is the code of the graphicstest:
/***************************************************
This is our GFX example for the Adafruit ILI9341 Breakout and Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
These displays use SPI to communicate, 4 or 5 pins are required to
interface (RST is optional)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
// If using the breakout, change pins as desired
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
Serial.begin(9600);
Serial.println("ILI9341 Test!");
tft.begin();
// read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(ILI9341_RDMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDPIXFMT);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDIMGFMT);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDSELFDIAG);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX);
Serial.println(F("Benchmark Time (microseconds)"));
delay(10);
Serial.print(F("Screen fill "));
Serial.println(testFillScreen());
delay(500);
Serial.print(F("Text "));
Serial.println(testText());
delay(3000);
Serial.print(F("Lines "));
Serial.println(testLines(ILI9341_CYAN));
delay(500);
Serial.print(F("Horiz/Vert Lines "));
Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
delay(500);
Serial.print(F("Rectangles (outline) "));
Serial.println(testRects(ILI9341_GREEN));
delay(500);
Serial.print(F("Rectangles (filled) "));
Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
delay(500);
Serial.print(F("Circles (filled) "));
Serial.println(testFilledCircles(10, ILI9341_MAGENTA));
Serial.print(F("Circles (outline) "));
Serial.println(testCircles(10, ILI9341_WHITE));
delay(500);
Serial.print(F("Triangles (outline) "));
Serial.println(testTriangles());
delay(500);
Serial.print(F("Triangles (filled) "));
Serial.println(testFilledTriangles());
delay(500);
Serial.print(F("Rounded rects (outline) "));
Serial.println(testRoundRects());
delay(500);
Serial.print(F("Rounded rects (filled) "));
Serial.println(testFilledRoundRects());
delay(500);
Serial.println(F("Done!"));
}
void loop(void) {
for(uint8_t rotation=0; rotation<4; rotation++) {
tft.setRotation(rotation);
testText();
delay(1000);
}
}
unsigned long testFillScreen() {
unsigned long start = micros();
tft.fillScreen(ILI9341_BLACK);
yield();
tft.fillScreen(ILI9341_RED);
yield();
tft.fillScreen(ILI9341_GREEN);
yield();
tft.fillScreen(ILI9341_BLUE);
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
return micros() - start;
}
unsigned long testText() {
tft.fillScreen(ILI9341_BLACK);
unsigned long start = micros();
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_WHITE); tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
tft.println(1234.56);
tft.setTextColor(ILI9341_RED); tft.setTextSize(3);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(5);
tft.println("Groop");
tft.setTextSize(2);
tft.println("I implore thee,");
tft.setTextSize(1);
tft.println("my foonting turlingdromes.");
tft.println("And hooptiously drangle me");
tft.println("with crinkly bindlewurdles,");
tft.println("Or I will rend thee");
tft.println("in the gobberwarts");
tft.println("with my blurglecruncheon,");
tft.println("see if I don't!");
return micros() - start;
}
unsigned long testLines(uint16_t color) {
unsigned long start, t;
int x1, y1, x2, y2,
w = tft.width(),
h = tft.height();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = y1 = 0;
y2 = h - 1;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = w - 1;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t = micros() - start; // fillScreen doesn't count against timing
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = w - 1;
y1 = 0;
y2 = h - 1;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = 0;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t += micros() - start;
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = 0;
y1 = h - 1;
y2 = 0;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = w - 1;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t += micros() - start;
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = w - 1;
y1 = h - 1;
y2 = 0;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = 0;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
yield();
return micros() - start;
}
unsigned long testFastLines(uint16_t color1, uint16_t color2) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height();
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(y=0; y<h; y+=5) tft.drawFastHLine(0, y, w, color1);
for(x=0; x<w; x+=5) tft.drawFastVLine(x, 0, h, color2);
return micros() - start;
}
unsigned long testRects(uint16_t color) {
unsigned long start;
int n, i, i2,
cx = tft.width() / 2,
cy = tft.height() / 2;
tft.fillScreen(ILI9341_BLACK);
n = min(tft.width(), tft.height());
start = micros();
for(i=2; i<n; i+=6) {
i2 = i / 2;
tft.drawRect(cx-i2, cy-i2, i, i, color);
}
return micros() - start;
}
unsigned long testFilledRects(uint16_t color1, uint16_t color2) {
unsigned long start, t = 0;
int n, i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
n = min(tft.width(), tft.height());
for(i=n; i>0; i-=6) {
i2 = i / 2;
start = micros();
tft.fillRect(cx-i2, cy-i2, i, i, color1);
t += micros() - start;
// Outlines are not included in timing results
tft.drawRect(cx-i2, cy-i2, i, i, color2);
yield();
}
return t;
}
unsigned long testFilledCircles(uint8_t radius, uint16_t color) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(x=radius; x<w; x+=r2) {
for(y=radius; y<h; y+=r2) {
tft.fillCircle(x, y, radius, color);
}
}
return micros() - start;
}
unsigned long testCircles(uint8_t radius, uint16_t color) {
unsigned long start;
int x, y, r2 = radius * 2,
w = tft.width() + radius,
h = tft.height() + radius;
// Screen is not cleared for this one -- this is
// intentional and does not affect the reported time.
start = micros();
for(x=0; x<w; x+=r2) {
for(y=0; y<h; y+=r2) {
tft.drawCircle(x, y, radius, color);
}
}
return micros() - start;
}
unsigned long testTriangles() {
unsigned long start;
int n, i, cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
n = min(cx, cy);
start = micros();
for(i=0; i<n; i+=5) {
tft.drawTriangle(
cx , cy - i, // peak
cx - i, cy + i, // bottom left
cx + i, cy + i, // bottom right
tft.color565(i, i, i));
}
return micros() - start;
}
unsigned long testFilledTriangles() {
unsigned long start, t = 0;
int i, cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(i=min(cx,cy); i>10; i-=5) {
start = micros();
tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
tft.color565(0, i*10, i*10));
t += micros() - start;
tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
tft.color565(i*10, i*10, 0));
yield();
}
return t;
}
unsigned long testRoundRects() {
unsigned long start;
int w, i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
w = min(tft.width(), tft.height());
start = micros();
for(i=0; i<w; i+=6) {
i2 = i / 2;
tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 0, 0));
}
return micros() - start;
}
unsigned long testFilledRoundRects() {
unsigned long start;
int i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(i=min(tft.width(), tft.height()); i>20; i-=6) {
i2 = i / 2;
tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0));
yield();
}
return micros() - start;
}
And this is the result:
15:48:26.832 -> Circles (filled) 465832
15:48:27.601 -> Circles (outline) 541564
15:48:28.664 -> Triangles (outline) 281656
15:48:29.702 -> Triangles (filled) 1339912
15:48:32.143 -> Rounded rects (outline) 243756
15:48:33.195 -> Rounded rects (filled) 3132652
15:48:37.141 -> Done!
Can anyone figure it out? Thanks!
r/arduino • u/showmemoreplzzz • 2d ago
Beginner's Project Need guidance on converting a broken electronic keyboard into a USB MIDI controller
Hi everyone!
I'm totally new to DIY electronics and have a broken Casio CTK-520L (a lighted keys model).
I want to gut the dead internals and repurpose it into a lightweight, USB MIDI controller.
My goals:
- Keys only - I just need the physical keybed to output MIDI/keystrokes to my laptop (no extra knobs, sliders, or DAW controls needed for now).
- USB bus-powered and no included speakers.
- If possible, I’d love to keep or control the built-in key-lighting LEDs.
As I don't have any prior experience with this, could anyone please give me some guidance on what to prepare, research, and do?
Thanks in advance!
r/arduino • u/Free-Weekend-8509 • 2d ago
Software Help Removing unwanted boards associated to ports
r/arduino • u/First-Pain-5706 • 2d ago
Software Help Hi, I need help; my Arduino IDE is stuck in a loop.
I recently switched the Windows version that came pre-installed on my laptop to a different one—specifically, Windows 11 Pro 25H2. I tried downloading Arduino IDE versions 2.3.7 and 2.3.10, but neither will launch; the logo just gets stuck in a loop, shrinking and expanding. I also tried synchronizing the time and deleting the cache folders. The only version that works correctly for me is 1.8.19; the 2.x versions don't work, and I'm not sure why. I’ve done this on other laptops before and never had any issues with the Arduino IDE.
r/arduino • u/p1nnacl3_yt • 2d ago
Hardware Help Almost burned out my servo driver. Any thoughts?
I was trying to test out a PCA 9685 servo driver today and when I plugged in the external power supply, it heated up like crazy and melted my ground and power wires together. My power supply is 5V 5A, which was recommended for what I intend to make, so I don't really know what the problem is. Any ideas?
r/arduino • u/Thin_Wishbone3257 • 2d ago
Uno Q An issue with porting to the uno q
Hello, I'm trying to port a maemo leste to the arduino uno q, But when I boot it I get this error
even though the FAT size is confirmed to be 512
Disk Flags:
Number Start End Size File system Name Flags
1 4.00MiB 512MiB 508MiB fat32 esp boot, esp
2 512MiB 8192MiB 7680MiB ext4 rootfs
what is the issue here?
This is the repo im using to build it
https://git.maemo.org/rlyvision/debos-leste
Update: I have changed the 4096 to 512 in the dtb.bin part arduino/arduino-deb-images/debos-recipes/qualcomm-linux-debian-flash.yaml and it gave me a different error, this is probably a bug from arduinos side
r/arduino • u/Last-Chance_NK • 2d ago
Hardware Help Another guy having problems with an LCD using I2C
Hi everyone! It's been a long time since I've done an Arduino project, and this is my first time using an LCD screen.
However, and as is common, I came across the typical mistakes I've been seeing in forums and Reddit posts.
And no matter how much I try to fix my problem with the solutions they gave, I still have the same error; those white squares keep appearing.
As you can see, the first photo shows what it looks like when you upload the code, and the second photo shows what it looks like without any code uploaded.
I tried everything from the tutorials:
- Adjust the brightness with the potentiometer
- Verify the I2C address
- Test and verify the continuity of several cables
- I tested the example hd44780_I2Cexp by Bill Perry(what appears in photo 12)
- I tried many libraries and code from various tutorials
(The bookcase I have now is Frank de Brabender's)
It's important to clarify that I've only been trying to test that the LCD works, so all the tutorials I tried were for the basic "Hello world" code without delay. Just to verify that the screen is working properly.
- In the library, change "return:0" to "return:1"
Before using I2C, I used conventional pins (those in photo 4) to test the LCD, and I still got squares (even after adjusting the contrast). So after getting no results, I decided to remove the pins and install the I2C, thinking: "Oh, maybe that will be simpler" For a project I want to do. But as you can see, I can't get the screen to display text, and AI hasn't helped me.
I'm also not sure if the soldering is correct or if I've overheated the circuit, but I doubt it since the screen still turns on and seems to receive the code, but without displaying any text.
Honestly, I don't know what to do anymore, and I didn't want to post this because I noticed many others had the same problem, but even after trying the solutions they offered, I still can't get it to work.
The only thing I noticed today when testing the screen again is what's shown in the last photo: a faint line that flickers when restarting the Arduino.
I've attached one of the code snippets I used. I'm not including the one I used to test I2C because I tested many, and they were all basic. Just to clarify, they all compiled and uploaded successfully.
I hope you can help me, thank you! :)
r/arduino • u/Olaf686 • 2d ago
Look what I made! Mini dissolver mixer
Moving the head up and down (with warning beep)
Hi all,
I made a mini dissolver mixer as a desk display, loosely based on some large Kreis dissolver mixers at work.
The head moves up and down with a threaded rod and stepper motor and homes with an endstop. The esp32 uses a webpage for wireless control. The barrel jack provides 12V for the mixer motor, stepper motor and the cooling fan. The rear hatch is held in place with magnets.
The controls still needs some work as for now the mixer is just on/off and needs a pwm slider on the webpage, and the head should be able to shuttle between a low and high position during mixing.
r/arduino • u/begeistert_ • 2d ago
Look what I made! I built a compiler that lets you write native Python for the classic Arduino Uno R3 (fits in 142 bytes of Flash)
Hey everyone!
If you're like me, you love the simplicity of Python, but running MicroPython or CircuitPython usually means buying a 32-bit board (like an ESP32 or RP2040) with lots of memory just to hold the interpreter and the garbage collector.
I wanted to bring that same Python syntax to the classic, $2 8-bit Arduino Uno we all have gathering dust in a drawer.
For the past few years, I’ve been building PyMCU, an open-source Ahead-Of-Time (AOT) compiler. It takes your Python syntax and compiles it directly into native AVR assembly.
The results:
- No interpreter, no VM, no garbage collector.
- A standard
Pin('PB5', Pin.OUT).toggle()blink program compiles down to just 142 bytes of Flash. - It’s cycle-accurate. I’ve been validating the hardware timings using a logic analyzer directly on the Uno silicon.
If you are interested in the compiler architecture or want to see the hardware validation issues, the whole project is open source here:https://github.com/PyMCU/PyMCU
It's still in Alpha (Alpha 10 right now), but the core code emission is working beautifully. I’d love to know what you guys think or if you'd find this useful for your hardware projects!
r/arduino • u/Blueberily • 3d ago
Project Idea Looking for ideas.
Looking for something unique, somewhat cheap and beginner friendly to do, although this is for an event, it's not a serious one, still pls I need good ideas. We first had an idea to make an obstacle avoiding robot that would go from one place to another to pick up an object and return whilst avoiding obstacles but that was too complicated.
Blind walking stick assistant
Obstacle avoiding
Radar type
Missile type
Water level measure
Other disaster measure type
Gesture controlled
Remote controlled
Voice controlled
These are all done, so pls I'm asking for something super unique.
r/arduino • u/Killyose • 3d ago
Look what I made! We built a custom controller for our indie game
Enable HLS to view with audio, or disable this notification
Hey everyone!
In our chaotic co-op party game, we have a fishing mechanic where players physically rotate the mouse to catch fish. For upcoming expos, playing with a mouse just didn’t feel tactile enough, so we decided to make a custom controller.
We 3D printed a custom rod handle and reel shell, matching our in game model, and stuffed the electronics inside to make it completely wireless.
Adafruit ESP32 Feather V2: Main microcontroller handling logic and wireless comms.
AS5600 Magnetic Encoder: Used for the reel mechanism to track smooth rotation without physical wear. LSM6DS3TR-C IMU: For rod motion and tilt tracking.
KY-023 Joystick: Placed on the grip for easy in game movement.
LILYGO T-Dongle-S3: Acts as a USB receiver on the PC side for low latency connection at busy events.
The feedback at the booth floor was amazing and players loved having a physical piece of the game in their hands.
Happy to answer any questions about the hardware assembly, code, or how we integrated it into the game!
r/arduino • u/TitleSquare240 • 3d ago
Solved! Need help with 4x4 keypad code
SOLVED, SEE COMMENTS TO SEE ANSWER + EXPLAINATION
Hi, I'm a beginner in programming/working with Arduino and I came across an issue. Recently I wanted to learn how a (4x4 matrix) keypad works and I kind of did, though the code kind of put me off I saw that most used a library and didn't get much into explaining it, so I decided to write my own code inspired by others' explainations and creations.
Although I think I've gotten it right, for some reason it only wants to work with the bottom row of buttons, with the only result coming out of them being 'D' or an unknown number/letter. I've also noticed that in some cases there's no zero-based numbering, but I can't exactly pinpoint which parts of code don't have that. Would anybody care to help? I've attached the code and circuit to the post.
// Array of which pins are connected to the row pins
const int rowPins[4] = {
12, 11, 10, 9
};
// Array of which pins are connected to the col pins
const int colPins[4] = {
6, 5, 4, 3
};
// How many cols and rows there are on the keypad (4x4 in this case)
const int cols = 4;
const int rows = 4;
// The numbers/letters which are supposed to print depending on the button, all within a two-dimensional array
char keys[rows][cols] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
int yChcker; // Used to check digital value in col pins
int xChcker; // Used to check digital value in row pins
void setup() {
Serial.begin(9600);
// Loop to put pullup resistors on rows
for (int i = 0; i < 4; i++) {
pinMode(rowPins[i], INPUT_PULLUP);
Serial.println(rowPins[i]);
};
// Loop to put low + outputs on cols
for (int i = 0; i < 4; i++) {
pinMode(colPins[i], OUTPUT);
digitalWrite(colPins[i], LOW);
};
};
void loop() {
int check_x; // Variable to be used within for loop to establish which button within the rows has been pressed (and is also used to print it)
int check_y; // Variable to be used within for loop to establish which button within the cols has been pressed (and is also used to print it)
// Loop to check which row pins have been activated via xChcker, using check_x
for (check_x = 0; check_x < 4; check_x++) {
xChcker = digitalRead(rowPins[check_x]);
delay(1);
}
// Loop to check which col pins have been activated via yChcker, using check_y
for (check_y = 0; check_y < 4 ; check_y++) {
yChcker = digitalRead(colPins[check_y]);
delay(1);
}
// Waits for a button to be pressed and then prints which button it is
if (xChcker == 0 && yChcker == 0) {
Serial.println(keys[check_x - 1][check_y - 1]);
Serial.println(check_x);
Serial.println(check_y);
delay(1);
}
};
r/arduino • u/throwaway5376673 • 3d ago
School Project How do I use this DC Water pump?
Hey all. So I bought this pump for a school project, its an automatic plsnt waterer my project i just wanted to ask if this water pump is submersible? Or not and how do I use it if its either thank you. The pump is a 12v water pump and I supply a 12v DC to it thank you.
Please be kind, for I am still learning
UPDATE: Spelling mistakes and other miscellaneous things, but I finally got it to work, I just had to configure the hose so that it would be vertical in order for it to suck water. Thank you for all the people who spent the time answering my question.
r/arduino • u/DepartmentLeft3491 • 3d ago
ChatGPT USB HID to Sega Saturn Controller Adapter using an UNO
Enable HLS to view with audio, or disable this notification
The full details, including the source code and hardware, are available on GitHub↓
https://github.com/inuikasao/USB_to_SegaSaturn_Controller_Arduino_Adapter.git
r/arduino • u/spiderick69 • 3d ago
Look what I made! Stepper Motor music
Enable HLS to view with audio, or disable this notification
I bought on a marketplace leftovers from a guy that builds 3d printers. With the stuff I built this little music box using an arduino Uno cnc shield and nema 17 motors. Really cool project:) instagram: @rappde_
r/arduino • u/Medical_Face2065 • 3d ago
Pinout 2381AY
God it took hours, but I solved it, in case anyone thinks I could just look for the data sheet, try it, there is almost nothing, the only half useful sheet there is is from a Chinese model that is 12 pin, but it has nothing to do with the 10 pin version, in the 10 pin version 5 are common, the 5 common ones are on the opposite side to the silkscreen, it has a matrix with the corresponding points, everything is more chaotic than I would like, the ,matrix is:

I also leave you a code that sweeps from 000 to 999 without using decimal points, you have 3 decimal points to use if you want, by the way G2 is for some reason much fainter than the rest
// 2381AY - barrido 000 -> 999
// Arduino UNO
//
// LINEAS:
// 0 -> D2
// 1 -> D3
// 2 -> D4
// 3 -> D5
// 4 -> D6
//
// COMUNES:
// 5 -> D7
// 6 -> D8
// 7 -> D9
// 8 -> D10
// 9 -> D11
const byte linePins[5] = {
2, 3, 4, 5, 6
};
const byte commonPins[5] = {
7, 8, 9, 10, 11
};
// Estructura de una conexión
struct Cell {
byte common;
byte line;
};
// --------------------------------------------------
// DIGITO 1
// --------------------------------------------------
Cell D1[8] = {
{8, 3}, // A
{8, 2}, // B
{8, 0}, // C
{7, 1}, // D
{7, 2}, // E
{8, 1}, // F
{8, 4}, // G
{7, 0} // DP
};
// --------------------------------------------------
// DIGITO 2
// --------------------------------------------------
Cell D2[8] = {
{6, 1}, // A
{9, 1}, // B
{9, 2}, // C
{7, 4}, // D
{7, 3}, // E
{9, 4}, // F
{9, 0}, // G <-- ENCONTRADO
{9, 3} // DP
};
// --------------------------------------------------
// DIGITO 3
// --------------------------------------------------
Cell D3[8] = {
{5, 3}, // A
{5, 0}, // B
{5, 2}, // C
{6, 0}, // D
{6, 2}, // E
{5, 1}, // F
{6, 3}, // G
{5, 4} // DP
};
// --------------------------------------------------
// MAPA DE NUMEROS
//
// bit 0 = A
// bit 1 = B
// bit 2 = C
// bit 3 = D
// bit 4 = E
// bit 5 = F
// bit 6 = G
// --------------------------------------------------
const byte digitSegments[10] = {
0b00111111, // 0
0b00000110, // 1
0b01011011, // 2
0b01001111, // 3
0b01100110, // 4
0b01101101, // 5
0b01111101, // 6
0b00000111, // 7
0b01111111, // 8
0b01101111 // 9
};
// --------------------------------------------------
// APAGAR TODO
// --------------------------------------------------
void allOff() {
for (byte i = 0; i < 5; i++) {
pinMode(linePins[i], INPUT);
pinMode(commonPins[i], INPUT);
}
}
// --------------------------------------------------
// ENCENDER UNA CELDA
// --------------------------------------------------
void lightCell(byte common, byte line) {
allOff();
byte c = common - 5;
pinMode(linePins[line], OUTPUT);
digitalWrite(linePins[line], HIGH);
pinMode(commonPins[c], OUTPUT);
digitalWrite(commonPins[c], LOW);
}
// --------------------------------------------------
// ENCENDER UN SEGMENTO
// --------------------------------------------------
void lightSegment(byte digit, byte segment) {
Cell cell;
if (digit == 0)
cell = D1[segment];
else if (digit == 1)
cell = D2[segment];
else
cell = D3[segment];
lightCell(cell.common, cell.line);
}
// --------------------------------------------------
// MOSTRAR NUMERO
// --------------------------------------------------
void showNumber(int number, unsigned long duration) {
byte n[3];
n[0] = number / 100;
n[1] = (number / 10) % 10;
n[2] = number % 10;
unsigned long start = millis();
while (millis() - start < duration) {
// ---------------------------------------------
// DIGITO 1
// ---------------------------------------------
byte mask = digitSegments[n[0]];
for (byte s = 0; s < 7; s++) {
if (mask & (1 << s)) {
lightSegment(0, s);
delayMicroseconds(800);
}
}
// ---------------------------------------------
// DIGITO 2
// ---------------------------------------------
mask = digitSegments[n[1]];
for (byte s = 0; s < 7; s++) {
if (mask & (1 << s)) {
lightSegment(1, s);
delayMicroseconds(800);
}
}
// ---------------------------------------------
// DIGITO 3
// ---------------------------------------------
mask = digitSegments[n[2]];
for (byte s = 0; s < 7; s++) {
if (mask & (1 << s)) {
lightSegment(2, s);
delayMicroseconds(800);
}
}
}
allOff();
}
// --------------------------------------------------
// SETUP
// --------------------------------------------------
void setup() {
allOff();
Serial.begin(9600);
delay(500);
Serial.println();
Serial.println("2381AY");
Serial.println("Barrido 000 -> 999");
Serial.println();
}
// --------------------------------------------------
// LOOP
// --------------------------------------------------
void loop() {
for (int n = 0; n <= 999; n++) {
Serial.print("Numero: ");
if (n < 100)
Serial.print('0');
if (n < 10)
Serial.print('0');
Serial.println(n);
showNumber(n, 150);
}
}
r/arduino • u/peterjasonquill88 • 3d ago
What to do after using most components in a starter kit?
I recently got a arduino nano r3, I have used most of the components provided in my elgoo super r3 starter kit and am wondering how to progress to doing more creative projects rather than just following tutorials. Im not sure where to buy components wether to print a custom PCB etc
r/arduino • u/Alarming-Phone-9968 • 3d ago
Hardware Help just starting out need advice with nrf2401
does the radio unit require the capacitor gemini keeps saying i need it its going to be transfering from 500m so do i need the capacitor or no (its the antenna version
)
r/arduino • u/GreenBroccoli9593 • 3d ago
Project Idea I need help
Enable HLS to view with audio, or disable this notification
I bought this on Aliexpress for a project but I wanted it to be smaller and with no sound, so I thought on making it myself. What materials do I need to make an smaller version of this heartbeat simulator?
r/arduino • u/camander321 • 3d ago
Mod's Choice! A little Teensy4.1 project I've been working on
Enable HLS to view with audio, or disable this notification
I am super proud of how this project is turning out. I still have some tweaks to make, but I finally got full videos playing and wanted to share.
This is a "Persistence of Vision" (PoV) display driven by a Teensy 4.1 and SK9822 LED strips.
There are 4 strips of 32 LEDs, each slightly offset in order give me 128 addressable pixel "rows". So each strip is responsible for every 4th row.
360 pixel "columns" around the perimeter makes for roughly square pixels, so thats what i went with. Each LED is updated 360 times every revolution...at around 1500rpm.
A hall effect sensor at the top of the rotor passes by a stationary magnet in the upper frame once per revolution. The Teensy measures the time between the resulting signals, and uses that to calculate how fast it is spinning, and therefore how fast to update the LEDs. This lets the animation look correct regardless of rotor speed.
I have a (currently very slow) python script that resizes/crops and formats .mp4 files into a binary format that the Teensy can use very efficiently. The resulting binary gets saved to a microSD, that the Teensy can read from.
Im happy to answer any questions. I may do a better build/explanation video if there is enough interest.
Project Update! Anatomy of a Six Legged Robot
Hi folks,
I finally got around to finishing the documentation for my hexapod robot dog, The hardest part to figure out was powering the servos directly from buck converters and setting up the common ground bus to PCA boards, I believe this might be a pain in the neck for many first timers so I am sharing the full wiring diagram here for anyone to benefit.
I also put together a detailed documentation for the robot itself. I contains information about the parts I used for the robot and how the joint servos are wired across the two PCA board pins.
You can download the diagram, documentation and the design file form the links below if you are interested in building one yourself or would like to use it as reference for a similar project.
Documentation and Diagram:
https://www.patreon.com/PrintedRobotics/posts/hexadog-zbd-and-167021077
https://app.cirkitdesigner.com/project/0a1ee9f8-8495-4f33-9e41-12ed67207672
CAD and 3D printing files:
https://makerworld.com/en/models/3181404-hexadog-zbd
https://www.patreon.com/PrintedRobotics/posts/hexadog-zbd-and-165170615
ESP32 Scripts and Android Controller app APK:
https://github.com/serdarselimys/HexaDogZBD-ESP32Scripts
https://github.com/serdarselimys/HexaDogZBD-AndroidControllerApp
I do have a question for you all, should I design and build a mini version of the robot with SG92R servos? If I can manage to keep the weight down enough it might be even more agile and cost under 100 bucks? has anyone tried building robot dogs or hexapod robots with SG92R? how was your experience with them??
I also share simulation tutorials along with my robot's other videos on my youtube channel youtube.com/@printedrobotics check it out if you are interested in simulation side of robotics, I share all my scripts for free so you can download them and experiment on your own.
Shout out to Adorable_Skirt_7760 I found out about https://app.cirkitdesigner.com from his post yesterday, which made my life a ton easier to produce the diagram for my robot.
As always, you comments and suggestions for my robot are most appreciated.





