View: 1363|Reply: 7

webServer.py is not working

[Copy link]

1

Threads

5

Posts

15

Credits

Newbie

Rank: 1

Credits
15
Post time 2021-12-2 16:16:24 | Show all posts |Read mode
Hi!

I was using webServer.py without any problem. One day just have this error:
Traceback (most recent call last):
  File "webServer.py", line 14, in <module>
    import RPIservo
  File "/home/pi/adeept_picar-b/server/RPIservo.py", line 17, in <module>
    pwm = Adafruit_PCA9685.PCA9685()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 75, in __init__
    self.set_all_pwm(0, 0)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 111, in set_all_pwm
    self._device.write8(ALL_LED_ON_L, on & 0xFF)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/I2C.py", line 114, in write8
    self._bus.write_byte_data(self._address, register, value)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 327, in write_byte_data
    self._device.write(data)
TimeoutError: [Errno 110] Connection timed out


Now I just could not solve this, could anyone please help me ?
Reply

Use magic Report

1

Threads

5

Posts

15

Credits

Newbie

Rank: 1

Credits
15
 Author| Post time 2021-12-2 16:19:28 | Show all posts
And also on other functions I get same error. For example, servo.py:
Traceback (most recent call last):
  File "servo.py", line 21, in <module>
    pwm = Adafruit_PCA9685.PCA9685()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 75, in __init__
    self.set_all_pwm(0, 0)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PCA9685/PCA9685.py", line 111, in set_all_pwm
    self._device.write8(ALL_LED_ON_L, on & 0xFF)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/I2C.py", line 114, in write8
    self._bus.write_byte_data(self._address, register, value)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 327, in write_byte_data
    self._device.write(data)
TimeoutError: [Errno 110] Connection timed out
Reply

Use magic Report

1

Threads

10

Posts

92

Credits

Registered member

Rank: 2

Credits
92
Post time 2021-12-2 20:09:21 | Show all posts
Did you update the OS?
Reply

Use magic Report

1

Threads

5

Posts

15

Credits

Newbie

Rank: 1

Credits
15
 Author| Post time 2021-12-3 01:05:27 | Show all posts

Yes, I updated and upgraded but still same
Reply

Use magic Report

1

Threads

10

Posts

92

Credits

Registered member

Rank: 2

Credits
92
Post time 2021-12-3 10:43:32 | Show all posts
On the Raspberry Pi in your Picar-b do this:
cat /etc/debian_version

If the result is higher than 10. I would recommend downloading the Raspberry Pi image for your car from this website.
I have encountered problems with the Adafruit-pca9685 library on the new PiOs.

If the results are 10.# or lower, try to uninstall the adafruit-pca9685 and reinstall it.
sudo pip3 uninstall adafruit-pca9685
Reply

Use magic Report

1

Threads

5

Posts

15

Credits

Newbie

Rank: 1

Credits
15
 Author| Post time 2021-12-3 15:53:26 | Show all posts
1635212142 replied at 2021-12-3 10:43 AM
On the Raspberry Pi in your Picar-b do this:
cat /etc/debian_version

My debian version was 10.11 and i tried to reinstall the adafruit-pca9685 did not work with it.

So I decided to load first version of debian that I used and worked well. Its version was 10.9. I loaded it with everything I need and I got the same issue. Tried to reinstall adafruit-pca9685 on this version. It also did not work. Should I go for lower versions ?

I dont understand what happened really. I worked with the robot at night with no issue. Then in the morning I got the error.
Reply

Use magic Report

1

Threads

10

Posts

92

Credits

Registered member

Rank: 2

Credits
92
Post time 2021-12-3 16:16:09 | Show all posts
1638432529 replied at 2021-12-3 03:53 PM
My debian version was 10.11 and i tried to reinstall the adafruit-pca9685 did not work with it.

S ...

Try downloading the raspberry pi image for your car from their web site.
I have 10.4 and and I do not have any problems with the webserver for the PiCar-B

if you still encounter the same problem there maybe a problem with the adeept motor hat (just like people, sometimes electronics just die)


Reply

Use magic Report

1

Threads

5

Posts

15

Credits

Newbie

Rank: 1

Credits
15
 Author| Post time 2021-12-3 16:50:38 | Show all posts
1635212142 replied at 2021-12-3 04:16 PM
Try downloading the raspberry pi image for your car from their web site.
I have 10.4 and and I do  ...

Thanks for all of your replies

I will keep try and updated here whats happened.
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules