Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed or direction control issue #69

Open
liatli opened this issue Apr 18, 2022 · 0 comments
Open

speed or direction control issue #69

liatli opened this issue Apr 18, 2022 · 0 comments

Comments

@liatli
Copy link

liatli commented Apr 18, 2022

Any idea of this issue? It makes online control almost impossible. I update the speed and direction command over socket and it randomly throws out the following issue.

future: <Task finished coro=<handle_echo() done, defined at picarx_server.py:7> exception=TimeoutError(110, 'Connection timed out')>
Traceback (most recent call last):
File "picarx_server.py", line 36, in handle_echo
px.forward(speed)
File "/home/pi/picar-x/picarx.py", line 150, in forward
self.set_motor_speed(2, speed * power_scale)
File "/home/pi/picar-x/picarx.py", line 64, in set_motor_speed
self.motor_speed_pins[motor].pulse_width_percent(speed)
File "/usr/local/lib/python3.7/dist-packages/ezblock-0.0.4-py3.7.egg/ezblock/pwm.py", line 112, in pulse_width_percent
self.pulse_width(pulse_width)
File "/usr/local/lib/python3.7/dist-packages/ezblock-0.0.4-py3.7.egg/ezblock/pwm.py", line 101, in pulse_width
self.i2c_write(reg, self._pulse_width)
File "/usr/local/lib/python3.7/dist-packages/ezblock-0.0.4-py3.7.egg/ezblock/pwm.py", line 47, in i2c_write
self.send([reg, value_h, value_l], self.ADDR)
File "/usr/local/lib/python3.7/dist-packages/ezblock-0.0.4-py3.7.egg/ezblock/i2c.py", line 91, in send
self._i2c_write_word_data(addr, reg, data)
File "/usr/local/lib/python3.7/dist-packages/ezblock-0.0.4-py3.7.egg/ezblock/i2c.py", line 24, in _i2c_write_word_data
return self._smbus.write_word_data(addr, reg, data)
TimeoutError: [Errno 110] Connection timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant