STM32+ENC28j60 HELP MY 🙄

Hi Guys

I would like to ask you kindly to help you manage the relays via the ENC28j60 network card connected to the Blue Pill STM32.

Thank you so much

Start with some research (if you haven’t already… or even if you have :slight_smile: I know I still need too )…


And then provide actual details… What outputs? What sensors? What code?

What. Are. You. Doing?

I apologize very much if I was not very precise in the post is unfortunately my first post but now I will explain my problem better.
So after careful research on the internet of how to connect an Ethernet module ENC28j60 to the Blue Pill STM32 development board I managed to connect the ethernet card to the STM32 processor, I connect it on the network he connects very well to the Blynk Local Server, I realize that it is connected by the Blynk application of my smartphone. But once the outputs have been set to activate a relay, the Blue Pill STM32 card does not seem to work. My project is to control the relays via the internet via LAN of the relays for the lights of my house. I am attaching below the code that I uploaded via Arlink Ide via Stlink V2 on the Blue Pill card.

I hope you can help me.

Thank you very much for the attention.

This my code :


vcc =  5v
Gnd = gnd
CS =   PA4
SO =.  PA6
RST = Reset

#define BLYNK_PRINT Serial;
#include <UIPEthernet.h>

char auth[] = "xxxxxxxxx";

void setup()


//Blynk.begin(auth, "", 80);
Blynk.begin(auth, IPAddress(xxx,xxx,xxx,xxx), 8080);

void loop()


So, looking at your code, it seems that you are doing direct pin manipulation in the Blink app (choosing Digital pins rather than Virtual).

If you want more control, and better ability to diagnose what’s happening, then I’d suggest switching to Virtual pins instead.
If you do this, don’ forget to declare the pinmode settings for the output pins you’re using, and use plenty of Serial.print statements to work-out what’s happening.


You have been very clear Pete unfortunately I’m not very good with STM32, kindly you could correct my code, if I do not bother you?

I’m not going to write your code for you. Search the forum for virtual pins and you’ll find lots of examples.


Please can you at least give me an example of what I should write in the code using the virtual PIN?

Have you read the documentation:


1 Like