Giter Site home page Giter Site logo

picar-4wd's Introduction

PiCar-4WD

PiCar-4WD

Quick Links:

About PiCar-4WD:

Update:

  • picar-4wd is the 4WD car that is built based on the Raspberry Pi, with the functions, including line following, following, obstacle avoidance, speed testing, remote control, radar testing and use the web page to control the picar-4wd 2019-09-21:
  • New Release

About SunFounder

SunFounder is a technology company focused on Raspberry Pi and Arduino open source community development. Committed to the promotion of open source culture, we strives to bring the fun of electronics making to people all around the world and enable everyone to be a maker. Our products include learning kits, development boards, robots, sensor modules and development tools. In addition to high quality products, SunFounder also offers video tutorials to help you make your own project. If you have interest in open source or making something cool, welcome to join us!


License

This is the code for PiCar-4WD. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa rranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

PiCar-4WD comes with ABSOLUTELY NO WARRANTY; for details run ./show w. This is free software, and you are welcome to redistribute it under certain conditions; run ./show c for details.

SunFounder, Inc., hereby disclaims all copyright interest in the program 'PiCar-4WD' (which makes passes at compilers).

Mike Huang, 21 August 2015

Mike Huang, Chief Executive Officer

Email: [email protected], [email protected]


Contact us:

website: www.sunfounder.com

E-mail: [email protected], [email protected]

picar-4wd's People

Contributors

cavonlee avatar h5chenhang avatar lovmong avatar xiemeiping avatar zhangzhiyong0410 avatar zhen-upup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

picar-4wd's Issues

Request: Electronics schematics for various PCBs in kit

Hi there, I recently bought and assembled this kit with the intention of implementing many of the behaviors in Rust. It'd be great if there were PDFs with the schematic diagrams or at least a table explaining the pin out on the PCB and how it aligns with Raspberry Pi header pins. I scanned through the repo and the documentation here: https://docs.sunfounder.com/projects/picar-4wd/en/latest/index.html and couldn't find it.

Thanks for the cool kit!

Problem with the rotation of motors and the web interface

Hello,

I have bought picar-4wd for a course in my university. I follow all the Picar-4wd User Manual and everything was fine... but during the testing of the solution with the interface on my local server it didn't work well.

My problem was the following : my two motors on the right side (the 2 and the 4 in the doc) are working in only one direction (only forward), they cannot go backward. I wanted to know if there is a way to permit this two motors to go backward and permit the interface to work.

My interface has also a problem, the buttons do not correspond to the movement they will have to perform, but if we can resolve the problem of the rotation first it would be a first step.

If you have any ideas in order to overcome this problem, i'd be happy. If you need something to understand tell me.

In advance, thank you for your answer.

OSError: [Errno 121] Remote I/O error .Is zero W raspberry pi supported ?

I had to update to 3.7 on my pi else my install never finished . After going to 3.7 i see this error .

self._i2c_write_word_data(addr, reg, data)

File "/usr/local/lib/python3.7/site-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 21, in wrapper
return func(*args, **kw)
File "/usr/local/lib/python3.7/site-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 37, in _i2c_write_word_data
return self._smbus.write_word_data(addr, reg, data)
OSError: [Errno 121] Remote I/O error
pi@raspberrypi:/picar-4wd $ ^C
pi@raspberrypi:
/picar-4wd $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- --

Broken 3D printed parts

I tried asking this on the Kickstarter and via e-mail and never received a reply.

My PiCar has a broken part where one of the wheels attaches. It broke in the first week of using it. I do not have a 3D printer so I cannot print my own replacement part. How do I get one?

(sorry to use GitHub issues for this, but I've given up ever getting a response any other way)

TimeoutError: [Errno 110] Connection timed out

pi@raspberrypi:~ $ picar-4wd test motor
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 17, in wrapper
return func(*args, **kw)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 37, in _i2c_write_word_data
return self._smbus.write_word_data(addr, reg, data)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/picar-4wd", line 11, in
load_entry_point('picar-4wd==0.0.1', 'console_scripts', 'picar-4wd')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2793, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2411, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2417, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/init.py", line 24, in
left_front = Motor(PWM("P13"), Pin("D4"), is_reversed=left_front_reverse) # motor 1
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/pwm.py", line 35, in init
self.freq(50)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/pwm.py", line 67, in freq
self.prescaler(psc)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/pwm.py", line 77, in prescaler
self.i2c_write(reg, self._prescaler)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/pwm.py", line 41, in i2c_write
self.send([reg, value_h, value_l], self.ADDR)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 104, in send
self._i2c_write_word_data(addr, reg, data)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 21, in wrapper
return func(*args, **kw)
File "/usr/local/lib/python3.7/dist-packages/picar_4wd-0.0.1-py3.7.egg/picar_4wd/i2c.py", line 37, in _i2c_write_word_data
return self._smbus.write_word_data(addr, reg, data)
TimeoutError: [Errno 110] Connection timed out
pi@raspberrypi:~ $

Errro with `picar-4wd test motor`

After successfully booting the RPI, attaching the hat and powering it, cloning the repo and running sudo python3 setup.py install with warnings:

/usr/local/lib/python3.9/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /usr/local/lib/python3.9/dist-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn(

I receive the following error when trying to run picar-4wd test motor

Screenshot 2023-01-02 at 11 05 41 PM

The solution I found was to install with pip install . and then update the path to use the new picar-4wd script with export PATH=/home/pi/.local/bin:$PATH

It seems to work for testing the motors, but I'm wondering if this will be an issue later on?

Edit: I'm using RPI 4b imaged with RP Image tool full install. Additional commands that were run prior to cloning the repo are sudo apt update and sudo apt full-upgrade.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.