Hi,
I recently started a project on creating a UI that has a few buttons that control a raspberry pi 4b based robot rover. Only issue is that when I follow the Remote GPIO documentation and try to run the program I get the following error :- Device.pin_factory = Device._default_pin_factory().
and :- raise BadPinFactory('Unable to load any default pin factory!') gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
I also get this at the beginning :- Did you start the pigpio daemon? E.g. sudo pigpiod
Did you specify the correct Pi host/port in the environment
variables PIGPIO_ADDR/PIGPIO_PORT?
E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888
Did you specify the correct Pi host/port in the
pigpio.pi() function? E.g. pigpio.pi('soft', 8888)
My code:-
Kindly advise as I can't find any solutions online that makes sense to me as I am only a beginner and not familiar with python.
Thank You.
I recently started a project on creating a UI that has a few buttons that control a raspberry pi 4b based robot rover. Only issue is that when I follow the Remote GPIO documentation and try to run the program I get the following error :- Device.pin_factory = Device._default_pin_factory().
and :- raise BadPinFactory('Unable to load any default pin factory!') gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
I also get this at the beginning :- Did you start the pigpio daemon? E.g. sudo pigpiod
Did you specify the correct Pi host/port in the environment
variables PIGPIO_ADDR/PIGPIO_PORT?
E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888
Did you specify the correct Pi host/port in the
pigpio.pi() function? E.g. pigpio.pi('soft', 8888)
My code:-
Code:
from gpiozero import Motorfrom time import sleepimport pigpioPI = pigpio.pi("ip address", 8888)PI.frl = Motor(forward=3, backward=17)PI.frr = Motor(forward=24, backward=23)PI.bl = Motor(forward=2, backward=27)PI.br = Motor(forward=14, backward=15)
Thank You.
Statistics: Posted by Joraspberry — Sun Oct 27, 2024 9:19 pm