I have the most simplest code ever for an LED to turn on. It runs fine from Thonny, but when it runs on a cronjob, it only faintly blinks, so fast you have to be staring at it to catch it happening. The code is called redon.py, and it is in /home/pi/ folder.
My cronjob is */1 * * * * python3 /home/pi/redon.py
Nothing else is running on cronjobs. This is the only GPIO connected.
What could be causing this to not turn the LED on?
Code:
from gpiozero import LEDimport timered = LED(21)red.on()
Nothing else is running on cronjobs. This is the only GPIO connected.
What could be causing this to not turn the LED on?
Statistics: Posted by duckredbeard — Mon Nov 11, 2024 11:42 am