Changes

Jump to navigation Jump to search

X708-Software

1,304 bytes removed, 17:14, 27 April 2022
==FAQ==
Q1: Can't connect How to pigpio at localhost(8888)<pre>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 environmentvariables PIGPIO_ADDR/PIGPIO_PORT?E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888 Did you specify the correct Pi host/port in thepigpio.pi() function? E.g. pigpio.pi('soft', 8888)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Traceback (most recent call last): File "/home/volumio/x-c1/fan.py", line 8, in <module> pwm.set_mode(servo, pigpio.OUTPUT) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1376, in set_mode return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode)) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1025, in _pigpio_command sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))AttributeError: 'NoneType' object has no attribute 'send'</pre>A: If you find an error similar to the above, it is because pigpiod library is not started, we need to run pigpiod first, sudo pigpiod python 'your directory'/x-c1/fan.py &If 'sudo' command request make a password, you can use the following command: echo 'your password' | sudo -S pigpiod python 'your directory'/x-c1/fan.py &You can put these two lines in the /etc/rc.local file so that it will script run automatically after booting. [[File:Volumio-rc-local.jpg|800px]]boot?
A: Refer to [[How to add crontab job]]
<!--Add review function! -->

Navigation menu