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

Automation, sensing and robotics • Re: Wiring multiple photoelectric sensors to RPI 4

$
0
0

Code:

    gpioSetMode(sensorPinWRoll, 1);    gpioSetMode(sensorPinRoll, 0);...        sensorRead = gpioRead(sensorPinWRoll);        //sensorReadb = gpioRead(sensorPinRoll);
I have only scanned the code, but are sensorPinWRoll & sensorPinRoll related to two sensors?
Do you intend to read the state from a pin defined as output? It looks odd.

Statistics: Posted by PiGraham — Wed Mar 06, 2024 1:51 pm



Viewing all articles
Browse latest Browse all 5229

Trending Articles