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

Automatic scheduler. ESP-01 with 4 Time Input Widgets

#147

Two problems I faced

  1. When the display/buttons show “Device is ON”, the relay will be OFF.
    If it shows “Device is off”, the relay will be on…
    How to fix this ?

  2. If the board gets restarted (due to power failure), the relay stays in ON position, how to fix this ? I will have to use the app to turn it off . It happens even if an active timer is running. For example, if the timer is set to turn off the relay now, if the board gets restarted, the relay will stay ON!!

0 Likes

#148

The code will need to be modified by you.

What is your level of experience with C++?

0 Likes

#149

NO experience!!! :neutral_face: I will try…
I dont need this much functions.
Can you suggest me any alternative method to set timer (which works even after restarting) ?

0 Likes

#150

There are lots of free online resources to help you learn C++
There are also lots of freelance C++ coders available if you don’t want to learn the language.

Time Input is the most powerful scheduler available, but it does require the Blynk project developer to have an understanding of C++.

0 Likes

#151

if your relay has three connectors you can simply swap the wiring and it will work as intended. If it has two connectors you need to go into the code, but its not that hard. HIGH is used to send a signal and is usually associated with ON (e.g. connect an LED and it wil turn on) however relays work the other way round and are thus OFF. so swap the HIGH and LOWs in the code where it concerns the relays and your golden.

0 Likes

#152

@wolph42 That question was 5 months ago :wink:

0 Likes

#153

:joy::joy::joy::joy::joy::joy:

0 Likes

#154

…well…better late then never…:grimacing:

0 Likes

#155

@Costas
I got it.
The timer wil not run right way because the line code, it’s mistake.
nowseconds = ((hour() * 3600) + (minute() * 60) + second());
It mus be changed like the right one:

nowseconds = long(hour() * 3600L) + long(minute() * 60L) + long(second());

Timer using Time Input Widgets will be awesome!

0 Likes

#156

Thank you for useful application on Blynk.

1 Like

#157

Dear all, where I can find the last version of code ?
The one in the first post includes all corrections ?
Thanks

0 Likes

#158

Hi mate,
Can you summarise the corrections you are taking about?

0 Likes

split this topic #159

A post was merged into an existing topic: How to make Blynk.sync ALL after the power loss?

0 Likes

#161

hi sir, i want to ask you a question… if i want to change the output from the lamp into buzzer, means that i want to make an alarm clock instead… how can i do that which line should i change or i need to add another code for that to set the buzzer as the output… i know we need to determine(select) which pin we connect the buzzer(in the coding) but i do not know where in your coding sir all i see is the virtual pin… btw i’m using nodemcu ESP-12E module as the microcontroller

thank you for your reply, i’m a newbies in this advanced coding but i’m ready to learn

sorry for my poor English hope you can understand @psoro @Costas

0 Likes

#162

@melfme search the sketch for “TestLED”

0 Likes

#163

hi sir, if not disturbing you… can i know where i can get the sketch 'TestLED" i already search it in example(arduino IDE), github i don’t know which one… if i can get the link is also excellent… i will try to understand the code first

Tq sir @Costas

0 Likes

#164

TestLED isn’t a sketch, it’s a variable within the sketch used for this project - see post #1 in the topic…

Pete.

0 Likes

#165

Ahhh i see, shit im so noob… hahahah :rofl::rofl:
Tq @PeteKnight

1 Like

#166

Hola, antes que nada pido disculpas si no se puede escribir en otro idioma, pero vi que eres español y la verdad que no me llevo muy bien con el ingles.
Tu proyecto me encanto y lo estoy usando perfectamente, ahora queria saber si seria posible agregar un boton fisico para cambiar el estado manual de on a off?
si pudieras darme una mano con el codigo estaria encantado.

desde ya Muchas gracias

0 Likes

#167

nice project, can you send your lastest code and QR code? thanks you

0 Likes