BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk Blink

Hello
I have copied the example Blink and pasted it into the IDE.
(https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FBlynkBlink

What do I have to program in the app so that it blinks in turn?

Greetings

What hardware are you using?

Pete…

Continuing the discussion from Blynk Blink:

Hi Pete

I bought the ESP32 from Franzis for using the Blynk examples.
(Lernpaket Maker Kit für ESP32)

Best regards
Manuel

Okay, so the example that you linked to wasn’t for the ESP32. You need to start by choosing the correct board in the sketch builder. It’s also a good idea to paste your Auth code into the sketch builder so that it’s inserted in the correct place in the sketch.

You also need to install the ESP32 core into the Arfuino IDE, and install a driver to allow the board’s USB port to be recognised. Instructions here…

You also need to install the Blynk library as explained in the sketch builder example.

It’s then a case of plugging the board in, choosing the correct board type and COM port, editing the sketch to insert your WiFi credentials and uploading it to the board.

Pete.

Hello Peter
You are absolutely right, I posted it under ESP8266 instead of ESP32 which is a mistake.
I uploaded the example Blynk Blink via the IDE and created the project MAKER KIT ESP32 in the app with the button traffic light with pin GP23 and button speaker with GP18. It works fine.
Afterwards I uploaded the example LED Blink and thought I could make the LED blink but it does not work.
Do I still have to adjust the sample code to the pin or program the on and off times in the app?

Thanks for the help
Greetings Manuel

Maybe you should try adding an LED widget to your project and assigning it to pin V1 as it says in the sketch…

App project setup:
LED widget on V1

Instead of having a switch widget attached to pin V1 as shown in your app screenshot.

Pete.

Hello Pete

Yes it works :slight_smile:


The virtual LED turn on and off

Do you see a possibility to add the code for switching on an off behind the pin GP23?
My plan is to start the button traffic light and the LED on GP23 will turn from on to off with a delay.

Best regards

I have no idea what this question means.

I’d recommend mot using the GP pins for widgets, use Virtual pins instead.

Do you have any C++ programming experience?

Pete.

I try to explain :slight_smile:


I want to use this project again.
The button traffic light can be changed from off to on.
I have defined the pin GP23.
When the button is on the led on GP23 should should blink.
I want to switch a real Led not virtual.

The code should be like this:
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);

Best regards

You can’t use delays with Blynk, you need to search the forum for timeout timers.

Pete.

1 Like

Take a look at this example.

1 Like

@PeteKnight was referring to Virtual Pins (Vx), instead of using the GPx option in the App, this allows much more control over what your project can do… including “blinking real LEDs”… by using Blynk to send/recieve the GUI commands and your code to do all the logic and control of the hardware, based on those GUI commands

See here for more reference to coding non-blocking timer options…

1 Like