GithubHelp home page GithubHelp logo

probers1 / sunfounder_smart_video_car_kit_for_raspberrypi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunfounder/sunfounder_smart_video_car_kit_for_raspberrypi

0.0 2.0 0.0 4.74 MB

Sunfounder Smart Video Car Kit for Raspberry Pi

Home Page: http://www.sunfounder.com

Python 2.54% Scheme 0.88% JavaScript 1.07% HTML 2.88% Pascal 0.28% Makefile 0.96% C 90.42% Shell 0.43% CSS 0.48% C++ 0.07% QMake 0.01%

sunfounder_smart_video_car_kit_for_raspberrypi's Introduction

Sunfounder Smart Video Car Kit for Raspberry Pi

Quick Links:

About this kit:

The SunFounder Smart Video Car Kit for Raspberry Pi is composed of Raspberry Pi, DC-DC Step-down Voltage Module, USB camera, DC motor driver, and PCA9685-based Servo Controller. From the perspective of software, the smart car is of client/server (C/S) structure. The TCP server program is run on Raspberry Pi for direct control of the car. And the video data are acquired and delivered via the open source software MGPJ-streamer in a real-time manner. The TCP client program is run on PC to send the control command. Both the client and server programs are developed in Python language. The smart car is developed based on the open-source hardware Raspberry Pi and integrates the knowledge of mechanics, electronics, and computer, thus having profound educational significance.

You can now control your Smart video car with an Android phone! (Details in html_server/README.md)

Download the Android App from Google Play

Notice:

Before you run the client routine, you must first run the server routine.

Update:

  • 2016/10/08:
    • Fix servos turn to extreme angle.   + Add setting frequency.
  • 2016/09/12:
  • arrange the pca9685 module to one module.
  • 2016/09/07:
    • merge cali_client_win.py to cali_client.py    - Windows users now can run cali_client.py on windows.
  • 2016/06/28:
    • add API file for Html server
      • API files in html_server/APIs.md
  • 2016/05/16:
    • add i2cHelper.py
      • For those who gets IOERROR: [Errno 2] No Such File Or Directory, Try run the i2cHelper.py:

              sudo python i2cHelper.py
        

2016/05/09:

  • add android app control. Control the car via the gravity sensor on a cell phone, so you can control the car and the camera onside, as well as view the camera video in real time. What's more, on the app, you can conveniently calibrate the car turning and the pan-tilt. (Details in html_server/README.md)
  • add windows calibration support

2016/03/29:

  • fixed speed control
  • fixed turning angle
  • removed useless button

2016/03/22:

  • fixed Raspberry Pi 3 compatibility.

2015/xx/xx:

  • improve i2c number getting, solved IOError: "[Errno 2] No such file or directory" problem for some Pi.

Trouble Shootings:

I2C Trouble

IOError: [Errno 2] No such file or directory

Error accessing 0x40: Check your I2C address

IOError: [Errno 5] Input/output error

This normally means Raspberry Pi could not find the I2C device. So here's what you can do:

  • Hardware problem:
    If you are using a DC adapter for your Raspberry Pi, you need to connect the GND between Servo Controller and Raspberry Pi. Because they are common-grounded by the micro USB, and if you use a DC adapter, you have to make another wire for common-ground.

  • Software problem:
    Just Run the i2cHelper.py with

     sudo python i2cHelper.py
    

    And after i2cdetect, and you should see your Servo Controller's address: 0x48

_tkinter.TclError

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/client $ sudo python cali_client.py
Traceback (most recent call last):
  File "cali_client.py", line 7, in <module>
    top = Tk()   # Create a top window
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1813, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

This usually happens when you try to run cali_client.py or client_App.py on Raspberry Pi remotely. Like using PuTTy.

  • Reason: cali_client.py and client_App.py run under the tkinter, which need a $DISPLAY, usually a GUI. Remotely log in to Raspberry Pi normally under bash, which is a CLI.
  • Solution: Try run the cali_client.py and client_App.py directly on your PC or Mac. It needs Python 2.7 installed on your computer. So:
    1. Go to python.org, download the lastest release of Python 2.7 for the operating system you are using, and install.
    2. Go to the github repository, and download the source code by clicking the green button on the right.
    3. Unzip the zip file.
    4. Edit the HOST in cali_client.py or client_App.py with Python IDLE (in Windows, usually, right click the .py file and select "Edit in IDLE"), and select Run => Run Module F5 to run the module.

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!


Contact us:

website: www.sunfounder.com

E-mail: [email protected]

sunfounder_smart_video_car_kit_for_raspberrypi's People

Contributors

cavonlee avatar thelazyb avatar asinck avatar

Watchers

Paul W Roberson avatar James Cloos avatar

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.