I'm getting an error in a routine which worked before:
The error:
- Code: Select all
python center.py
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at localhost(8888)
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))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Traceback (most recent call last):
File "center.py", line 37, in <module>
center_servos()
File "center.py", line 28, in center_servos
PDALib.servoWrite(TILTSERVO, TiltCenter)
File "/home/pi/RWPi/PDALib.py", line 251, in servoWrite
pi.set_servo_pulsewidth(servopin[pin], val)
File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1320, in set_servo_pulsewidth
self.sl, _PI_CMD_SERVO, user_gpio, int(pulsewidth)))
File "/usr/lib/python2.7/dist-packages/pigpio.py", line 848, in _pigpio_command
sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))
AttributeError: 'NoneType' object has no attribute 'send'
pi@raspberrypi:~/RWPi $
I installed pigpio differently:
- Code: Select all
* Install PIGPIO
sudo apt-get update
sudo apt-get install pigpio python-pigpio python3-pigpio
Before, with Wheezy, I installed pigpio thus:
- Code: Select all
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make
make install