Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7605

Interfacing (DSI, CSI, I2C, etc.) • Re: Problem with Elegoo relay module

$
0
0
I have found a solution. At start rc.local start this small python script:

Code:

import osk=os.system("gpioset gpiochip0 2=1")k=os.system("gpioset gpiochip0 3=1")k=os.system("gpioset gpiochip0 4=1")k=os.system("gpioset gpiochip0 14=1")k=os.system("gpioset gpiochip0 15=1")k=os.system("gpioset gpiochip0 18=1")
Next in my php, I use this when I click on the button:

Code:

                system("gpio -g write 4 0");        usleep(100000);        system("gpio -g write 4 1");
I have tried with gpioset but it doesn't work, why??
Hard work!

Statistics: Posted by michastro — Wed May 14, 2025 8:23 pm



Viewing all articles
Browse latest Browse all 7605

Trending Articles