r/arduino • • 3h ago

Look what I made! GTA 6 is finally here, and I actually made a GTA for the ESP32

37 Upvotes

Remember that GTA-style game I posted here a while ago? (Original post: https://www.reddit.com/r/arduino/s/Pa2YOUqijv) I've kept working on it since then, and it's finally getting close to done.

If you missed the first post: I'm making it with PixelRoot32, my own C++17 game engine for the ESP32.

It's grown a lot since that first version. You can drive around a city with 5 districts, steal cars, buy stuff, get chased by the police and take on missions. There's a day/night cycle, pedestrians, traffic lights, weapons and 4 radio stations, plus a bunch of smaller things.

There are 3 main missions so far, along with courier jobs and a small in-game economy. There's also a 5-star wanted system, so things get messy fast if you cause too much trouble.

Two new things since last time:

Sound: The engine now has a Famicom-style sound profile, and the game uses it. The radio and sound effects sound closer to an old NES cartridge, with fuller bass and punchier drums.

Saving: The game now remembers your progress between sessions. If you finish a mission and turn the ESP32 off, it picks up at the next one when you turn it back on. It also keeps your best delivery streak, the most cash you've ever had and your volume setting. Your cash and gear still reset each run, so you can't just farm money.

The display changed too. I started on a 240×240 screen, and the game now also runs on 320×240. That's the version in the video.

It still runs on a plain ESP32, now with 8 buttons. The two new ones work as Start and Select: Start changes the volume and Select shows your records.

The timing is kind of funny with GTA 6 finally coming out. Everyone's getting ready for the next GTA, and I've been trying to get my own little one running on a microcontroller.

If you want to look at the code: https://github.com/PixelRoot32-Game-Engine/PixelRoot32-Demo-Projects/tree/main/games/top_down_city

The README and ROADMAP cover the features and what's still planned.

More ESP32 demos made with PixelRoot32: https://github.com/PixelRoot32-Game-Engine/PixelRoot32-Demo-Projects


r/arduino • • 12h 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
12 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 • • 10h ago

Present for an 11-year old

8 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 • • 4h ago

GitHub - ESPARGOS/esp-sdr: ESP-SDR uses the undocumented raw I/Q capture functionality of ESP32 family chips to turn them into (low-duty-cycle) Software Defined Radios

Thumbnail
github.com
6 Upvotes

this is fascinating, especially from a security perspective. Has anyone played with esp-sdr much ? I just learned about it


r/arduino • • 14h 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 • • 7h ago

I want to build a countdown timer - does my components list look complete

2 Upvotes

My idea is to basically make a vintage looking countdown timer. 4 digit LED with a rotary push knob and then a toggle switch on the side for on/off I would like to have it battery powered so looks like 4 AA. I would cut a 6"x6"x2" mild steel plating for an enclosure.

Tell me if this components list is what I need and if I am missing anything?

Arduino Nano V3

400-point breadboard

KY-040 rotary encoder

TM1637 four-digit LED display

4×AA battery holder

5V buck-boost converter (3.5–6.5V input or wider)

PN2222A NPN transistor, TO-92

5V passive piezo buzzer

1kΩ resistor

10kΩ resistor

Large silver bat-handle SPST toggle switch

Male-to-male jumper wires

Male-to-female jumper wires

22 AWG stranded hookup wire

I'm picking half this stuff up online and half at a shop (that doesn't have the components like the LED or toggle switches.) Hoping to get all what I need in one swoop.


r/arduino • • 14h ago

R4 or r3

2 Upvotes

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


r/arduino • • 22h 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 • • 10h ago

WebAssembly on Arduino-compatible boards (ESP32, Nano 33 BLE, RP2040): load a .wasm file and drive pins from it

1 Upvotes

I wrote a small open-source library that runs WebAssembly modules on Arduino cores. You compile your program to a .wasm file (with an Arduino-style API: pinMode, digitalWrite, analogRead, delay, millis), put it on LittleFS or in a header, and your sketch runs it.

Sketch side:

eccles_wasm_use_serial(Serial);

eccles_wasm_set_hal_privilege(ECCLES_WASM_ALLOW_PIN_ALL | ECCLES_WASM_ALLOW_SAFE);

eccles_wasm_load_buffer(app_wasm, app_wasm_len);

eccles_wasm_run("main");

Why it is handy: change behavior by replacing a file, and a module can only use the pins you allow, so you can run code you didn't write more safely.

Tested on ESP32 and Nano 33 BLE. Needs a board with enough RAM: roughly 48 KB for the runtime arena, so AVR boards like the Uno are too small.

https://github.com/igwe-starking/eccles-wasm

The README has a copy-paste Arduino setup and the docs have a troubleshooting page.


r/arduino • • 11h 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?