Timer for lights


Hi everyone! I need a light to be turned on for a certain amount of hours, and then off for another amount of hours, how can I achieve this?

Thank you.


Hello and welcome!

You can use a square-wave node to cycle on and off phases. Use time-to-duty to set up its DUTY value. In its turn, Ton will define light “on” time (in seconds) and Toff defines off-time. One hour is 3600 seconds :wink:

If you still have questions, feel free to ask.


Thank you for the reply. Yes I have some other questions:

  • Because I am using a lot of digital pins I don’t have enough space for a classic lcd so I used a i2c module, if I put the wrong addr is it going to damage the i2c module?
  • I want to make a menu in the lcd that allows (when a button is pressed) to switch between views with different data, how do I do that?
  • If I use a 16x3 module how can I have access to the 3rd line?

Thank you so much for helping me and sorry for all of these questions but I know only the basics of electronics.


No, absolutely not. The worst thing going to happen is you will not see the text.

One possible way is to have if-else-string nodes right before the LCD node. Another solution is to have multiple LCD nodes that refer to the same display, but have gate-string nodes before each one and keep only a single gate pair open.

:open_mouth: Do they exist? Thats not directly possible with already existing nodes, but you can copy implementation of the 16×2 and make small adjustments (add an input and few lines in C++) to make your own text-lcd-16x3-i2c node.



You can try this:

Add library --> dox/lcd-i2c

I found a 16x3 Display with SPLC780D Controller. This could be compatible to standard HD44780 controller. No guarantee that it will work. I am not a programmer. This is just a modification of the existing nodes.


Thank you for the detailed answers.
Is it possible to have access to the serial monitor?


Sure. Use console-log node and upload with “Debug after upload” checkmark set.


How do I convert a analog signal in a string?


Simply link your number output (from an analog-input) to a string input (like L1 on text-lcd or if-else-string) and magick will happen. If you’re not satisfied with the magick, use the format-number node.


Hi…if you have metal halide lights a cheap timer will fail at some point as the ballast draws a lot of current for a split second at start up. a heavy duty timer may be a consideration. Otherwise go for a cheap one.

heavy copper pcb