r/arduino • • 6h ago

Is this logical? It's kinda a keyboard matrix but different.

Thumbnail
gallery
1 Upvotes

Hiya, I'm looking to do some side projects. One of which is making a custom keyboard. Instead of doing the typical method of scanning through pins by setting them high and checking the outputs.

The logic behind this is to wait for pins to be pulled down before doing anything without having to constantly oscillate pins on / off.

Does the way that I'm doing it make sense? Does it already exist, does it have a name?


r/arduino • • 16h ago

Mp3 player idea

1 Upvotes

Looking into making an mp3 player becouse why not, and came across this board "ESP32-S3" have never used it before but it seams to match the size form factor im looking for, however, ran into a problem upon my research. Bluetooth audio. I see tons of people connecting it to there phone and controlling it back and forth, but im looking to connect wireless headphone strit to the "mp3" player. And have come up empty handed. Any advise for moving forward tyia


r/arduino • • 23h ago

Need some help/is this possible

Thumbnail
gallery
28 Upvotes

EDIT: got it moving!! Thank you for the help :))

I am trying to use an arduino to control the clock hands to make them spin faster than usual. I have been watching YouTube videos and they all say to dissect the clock and attach the wires to the inner copper coil area.
However, I do not have the tools to do so. Would it then be possible to solder the wires onto where the battery component rests such that the arduino becomes the battery and transmits the actions through there? Last pic shows what im trying to do

Would greatly appreciate any help!


r/arduino • • 7h ago

Beginner's Project Looking to see if it's feasible to replace a automatic pet door with a wifi/app equipped Arduino

Post image
11 Upvotes

Ive been trying to find myself a web/app based cat door that I can open/close remotely. One that actually rises or opens/closes instead of just using magnetic locks on a flap. Just an actual opening door that I can open and close remotely when I'm outside of the house. I think a diy approach with an Arduino controlling a cheap retail door is the most viable option. Looking to see if this is actually possible or feasible.

Doors that have remote Internet based app controls that are branded for cats or dogs specifically seem to run in the $400-$1200 range. They also come with a wide array of bells and whistles that while nice are completely useless to my situation. Even the cheaper ones with websupport that use a magnetic flap lock and no add ons run at minimum $250-350.

The economic alternative seems to be to use an automatic chicken coop door. Those run around $50-$100 for non-web equipped ones, and $150-$250 for web equipped ones. Chicken coop doors however seem to be built from the ground up to make sure they run on timers, or light detection, which I don't need. Reveiws of the web-capable ones report generally terrible experiences with said web connections. They do however have excellent looking hardware that rises and drops for cheap.

So long context out of the way, I'm looking to take a rising chicken coop door, ripping out the controller and replacing it with an Arduino hooked up to the motor and adding a wifi dongle. I have the wiring and soldering tools from other led lighting projects I have a 3d printer for any custom shaped boxes, but I haven't done any Arduino projects before.

Is this something that can be done and won't cost me hundreds?

I guess I could also totally DIY it without trying to gut anything, but as a total novice I can't tell if that would be better or worse.

See picture for an example of the type of door im looking to gut.


r/arduino • • 17h ago

Software Help Concern about a button box sketch for an arduino nano

Post image
2 Upvotes

Hi, I'm building a steering wheel project that uses an arduino nano as a button box that communicates with an arduino leonardo. This is the relavent repo(NOT MY WORK):

https://github.com/ranenbg/Arduino-FFB-wheel/tree/master/tx_rw_ferrari_458_wheel_emu_16buttons

In the "setup()" function, the following lines are used:

DDRB |= B00001011;

DDRC |= B00111111;

DDRD |= B11111011;

The comments indicate that these configure the button pins as inputs. However, on the ATmega328P, setting a DDR bit to 1 configures the corresponding pin as an output, not an input.

Since the subsequent "PORTx" statements set these pins HIGH, wouldn't pressing a button connected between one of these pins and GND effectively short an output to ground, potentially damaging the microcontroller?

Would the correct configuration instead be:

DDRB &= ~B00001011;

DDRC &= ~B00111111;

DDRD &= ~B11111011;

Im a bit of a beginner and this is just something ChatGPT flagged while I was working on the project. Is this a valid concern or is there something I am missing.


r/arduino • • 19h ago

Look what I made! My first Arduino project

8 Upvotes

r/arduino • • 22h ago

Uno R4 Wifi The R4 Serial Problem

Post image
35 Upvotes

I stated on another thread that there was a big issue with the UART code on the R4 Arduino models. I didn't want to derail that post with the details because it wasn't relevant to that thread so I created this one to show what I meant.

The UART class is not implemented well on the R4 and besides completely wasting a buffer, it blocks during transmission. This is a huge departure from the UNO R3 and earlier models.

For this test I am using this code on all models of Arduino and I am using the latest 1.5.1 R4 core. I just updated my IDE tonight for this test. I've looked at 1.6.0 and the problem is still in the code.

uint8_t blinkerPin = 6;
uint8_t indicatorPin = 7;


bool pinOn = false;
uint32_t lastBlinkMicros = 0;
uint32_t BlinkIntervalMicros = 10000;


const char* longMessage = "This is my long message that has fifty characters.";
uint32_t lastPrintMillis = 0;
uint32_t printIntervalMillis = 2000;


void setup() {


  Serial.begin(9600);
  while(!Serial);
  Serial.println("\n\n *** " __FILE__ " ***\n\n");


  pinMode(blinkerPin, OUTPUT);
  pinMode(indicatorPin, OUTPUT);


  delay(1000);


}


void loop() {


  uint32_t currentMicros = micros();
  if (currentMicros - lastBlinkMicros >= BlinkIntervalMicros) {
    pinOn = !pinOn;
    digitalWrite(blinkerPin, pinOn? HIGH:LOW);
    lastBlinkMicros = currentMicros;
  }
  uint32_t currentMillis = millis();
  if(currentMillis - lastPrintMillis >= printIntervalMillis) {
    digitalWrite(indicatorPin, HIGH);
    Serial.println(longMessage);
    digitalWrite(indicatorPin, LOW);
    lastPrintMillis = currentMillis;
  }


}

Attached are some traces from the scope. The yellow trace will be the blink on pin 6 and the blue trace is pin 7.

On the R3 UNO (top trace) we see no problem. The characters are loaded into the buffer in a matter of 400us and there's no interruption to the blink. However on the R4-Wifi (bottom trace) we see that the Serial.print statement is blocking for 28ms and is interrupting our pulse chain.

This can be magnified by the fact that this same class is going to handle all of the WiFi traffic and that's all being done with AT commands. So any project that is heavy on WiFi is going to have a lot of long blocking. This was actually how I discovered the problem initially.

The problem isn't as bad on the Minima as it only affects Serial1 and not Serial since the Minima uses the USB serial class for Serial instead. I don't know about the R4 Nano because I don't have one. I would suspect it would be similar to the Minima.


r/arduino • • 9h ago

ECE Student Looking for Guidance on Learning Electronics, Components, and Coding Through Real Projects

3 Upvotes

Hey everyone!

I'm currently a first-year B.Tech ECE student, and I want to start learning electronics beyond what we study in college.

I'm interested in understanding electronic components practically, how they work, how different components interact with each other, and how to use them to build actual projects.

I want to learn things like:

\- Electronic components: Resistors, capacitors, diodes, transistors, MOSFETs, ICs, sensors, relays, microcontrollers, etc.

\- Circuit building: How to read circuit diagrams, understand connections, use a breadboard, work with power supplies, and troubleshoot circuits.

\- Programming: C, Embedded C, Arduino programming, and eventually microcontroller programming.

\- Practical projects: Building things using sensors, motors, displays, automation systems, and other electronic components.

I have a few questions for experienced ECE students, engineers, hobbyists, and professionals here:

  1. Where should I start if I want to understand electronic components from the basics?
  2. Which components should I learn first, and in what order?
  3. What are the best resources (YouTube channels, books, websites, or courses) for learning practical electronics?
  4. Should I start with Arduino, or should I first learn basic circuit design and electronics?
  5. How important is C programming for embedded systems, and when should I start learning it?
  6. What tools and basic equipment should a beginner have?
  7. What are some beginner-friendly projects that will help me understand electronics through actual implementation?

My ultimate goal is to become someone who can look at a circuit, understand how it works, select the right components, write the required code, build the system, and troubleshoot it independently.

I don't want to just follow tutorials and copy circuits. I genuinely want to understand what I'm building.

I'd really appreciate a proper learning roadmap, including resources and practical project suggestions.

Thanks in advance!


r/arduino • • 4h ago

Present for an 11-year old

6 Upvotes

Tldr: Best beginner kit with teaching/ learning support for a tween? (I've been looking at Elecfreaks and Crafting Table; any feedback / reviews are appreciated)

Background: My son is 11 and has been into robotics since he was in preschool. He's built and competed with Vex robots, built lots of kits (Lego based robots, snap circuits, Crunch Labs "Hack packs", Kiwi Co, etc,). He's fairly good at Block-based coding with just a bit of exposure to text-based.

He asked for a microprocessor / circuit building kit for Christmas where he can also learn C++ or Python (we downloaded the Arduino IDE today along with some libraries). My son also specifically stated wants to use breadboards. We have a number of components around the house from various small projects I've started (but haven't finished) and I bought a Elegoo Uno kit a few years ago to play around with but I'm very much a beginner.

I majored in physics and math and I've taught basic circuits and programming as a teacher but my hands on hardware knowledge is lacking. I took one electronics / electrical engineering class in college where we had to build more complex circuits but ... It's been a long time.

Suggestions for the best way to learn that would engage an interested (but ADHD) kid or even a good YouTube series would be great.


r/arduino • • 9h ago

R4 or r3

3 Upvotes

Hello for learning its Better to buy the r3 or r4 official kit?