Is Wokwi just busted?

Sorry if this isn't the place to ask about Wokwi stuff. I was just hoping one of the big brains here could let me know what might be going on....

So I have a little project. I built the exact same thing on a breadboard. Using the exact same code in VS Code. For some reason on Wokwi it does...welp...absolutely nothing. While the real life project works perfectly as intended. I wanted to have the simulator so I could try other ideas without plugging wires and components. Anyway I was thinking about joining the Wokwi club. But if half the proper things ya make there just won't work...what's the sense lol. Here's a link to the project.

Slow down a little please.

The Arduino Uno is compiled and simulated the fasted in Wokwi. For simple projects with leds and buttons you can use the good old Arduino Uno (Arduino Uno R3) in Wokwi.

Scroll down some on this page for the table for the pins: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/
Pin 2, 12 and 14 are not normal pins.

Wokwi does not care about currents or voltages and there is unlimited power. But for educational and entertainment purposes, I suggest to add resistors to the leds.

You have VCC directly connected to pin 2. The button does not do something.
Here is how to wire a button: https://wokwi.com/projects/397990611031240705

I can't help You more then sympathize. Usually simulations work but not the reality. There's surely somebody that can carry this donkey ahéad.

Without current limiting resistors for the LEDs?

That is one sure way to destroy an Arduino, the LEDs, or both, although the circuit may work for a little while. Also, the button input is connected to Vcc, not the button.

Wokwi is telling you that your circuit (copied below) does not work.

Fixed:
afbeelding

1 Like

The button is connected to VCC. Please take note of the big up arrow labeled VCC and where it's connected to. Your "fixed" image made exactly 0 changes. Electrically it's exactly as I had it originally. I don't really care if 'virtual LED's' blow out (which they won't anyway). Which is why I didn't bother including resistors on the sim. You missed my entire point. I have this exact circuit built same pins same parts same code. It works in my real life build but not on the Wokwi sim. The only difference is my actual ESP32 is devkit V1. The linked example is V4. I changed it in the diagram.json to use V1 and it still doesn't work. From everything I've read the V1 and V4 devkits are 1 for 1 pin compatible.

And p.s. You're "fixed" example doesn't work either. I also tried that before I posted even though I knew it wouldn't make a difference.

I did not post a fixed example, just your incorrect wiring diagram. @Koepel is correct.

The wiring diagram in the simulator link is still wrong, and will not work in the simulator or in real life.

I copied it to a new project with the fixed circuit:

1 Like

This would indicate to me that I did something wrong, not the thing that works for thousands of people on millions of projects, without fail.

Try this wiring in your simulated.:
image

@ruilviana your revised wiring diagram lacks current limiting resistors for the LEDs.

1 Like

Tks.

OK I see what went wrong in the sim. But just to show you it does in fact work as I had it wired before in real life. Here are two images. The program is running and working when I took the pics. Ignore the 2 extra switches. I was just experimenting with those and didn't remove. And yes in real life I do have resistors on the LED's.


Rotate your switches by 90 degrees. The real circuit will not work (just like your sim).
Always connect them diagonally...

Naw dude. It's fine to use both contacts on 1 side long as they're not the sides shorted together. Besides those are SPST switches anyway :slight_smile:

BTW 1971 was an awesome year. I was hatched on the last day of it :smiley:

Your circuit on the breadboard is 100% okay. You only had to copy that to Wokwi :wink:
On the breadboard, the resistor keeps the input pin high, and the button connect the input to GND, making it low when pressed.

The voltage for the pullup resistor should be 3.3V, since that is the maximum voltage for an input pin (in theory, there is a circuit in the ESP32 chip to avoid immediately damage).