display success at some steps

This commit is contained in:
Christophe Robillard 2025-10-27 17:26:53 +01:00
parent 6dba8da8b1
commit 7fb45773fe

View file

@ -29,8 +29,6 @@ MFRC522DriverSPI driver_1{ss_1_pin};
MFRC522 reader{driver_1}; // Create MFRC522 instance.
void setup() {
// WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
// it is a good practice to make sure your code sets wifi mode how you want it.
@ -39,6 +37,7 @@ void setup() {
Serial.begin(115200);
pinMode(LED_PIN, OUTPUT);
displaySuccess();
//WiFiManager, Local intialization. Once its business is done, there is no need to keep it around
WiFiManager wm;
@ -65,11 +64,10 @@ void setup() {
else {
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
displaySuccess();
}
reader.PCD_Init(); // Init each MFRC522 card.
}
void loop() {
@ -108,11 +106,11 @@ void loop() {
}
https.end();
Serial.print("[HTTP] ended...\n");
Serial.print("[HTTPS] ended...\n");
}
}
void array_to_string(byte array[], unsigned int len, char buffer[])
{
void array_to_string(byte array[], unsigned int len, char buffer[]) {
for (unsigned int i = 0; i < len; i++)
{
byte nib1 = (array[i] >> 4) & 0x0F;
@ -123,8 +121,7 @@ void array_to_string(byte array[], unsigned int len, char buffer[])
buffer[len*2] = '\0';
}
void displayError()
{
void displayError() {
for (unsigned int i = 0; i < 6; i++)
{
digitalWrite(LED_PIN, HIGH);
@ -134,8 +131,7 @@ void displayError()
}
}
void displaySuccess()
{
void displaySuccess() {
digitalWrite(LED_PIN, HIGH);
delay(1000);
digitalWrite(LED_PIN, LOW);