Code Monkey home page Code Monkey logo

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

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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sunfounder_smart_video_car_kit_for_raspberrypi's Issues

The frequency of Servo SG90 is 50Hz!

The SG90 Data Sheet shows that the work frequency is 50 Hz. So the frequency of PWM should be set to 50Hz.
import PCA9685 as servo
pwm = servo.PWM()
pwm.frequency = 50
pwm.write(0, 0, 509) # Left 90 degree
pwm.write(0, 0, 300) # 0 degree(middle)
pwm.write(0, 0, 109) # Right 90 degree

When I use i2cHelper.py to set I2C, error occurs, how to fixed it

====================================
|| ||
|| Raspberry Pi I2C check ||
|| and setup tools ||
|| ||
|| SunFounder ||

Checking your Pi's information.
Your cpu revision: a02082
Your Raspberry Pi is Revision 3
Your I2C bus number is: 1

Checking your device...
I2C has not been setup.

Backup... done
Setting i2c... remove_line: [Errno 13] Permission denied: '/boot/config.txt'
add line: [Errno 13] Permission denied: '/boot/config.txt'
done

I2C has set. It would change after reboot.
Do you want to reboot now?(y/n)

Cali Server Error

Hello could you please help ion this error ?
I'm using GIT latest repo cloned and RPI3
thanks !

Traceback (most recent call last):
  File "cali_server.py", line 174, in <module>
    setup()
  File "cali_server.py", line 45, in setup
    video_dir.setup()
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/video_dir.py", line 31, in setup
    pwm = servo.PWM()           # Initialize the servo controller.
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/PCA9685.py", line 95, in __init__
    self.write_all_value(0, 0)
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/PCA9685.py", line 174, in write_all_value
    self._write_byte_data(self._ALL_LED_ON_L, on & 0xFF)
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/PCA9685.py", line 113, in _write_byte_data
    if not self._check_i2c():
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/PCA9685.py", line 130, in _check_i2c
    status, output = commans.getstatusoutput(cmd)
NameError: global name 'commans' is not defined

invalid syntax

tcpSerSock.bind(192.168.0.108) # Bind the IP address and port number of the server.
^
SyntaxError: invalid syntax

initialisation of video_dir does not work

Hi,
video_dir.setup(busnum=None) does not work.
There is already a function to set the raspberry pi revision in PCA9685.py, and specifying a busnum in video_dir prevent controlling the camera.
Do you accept pull requests?
I'm willing to contribute if needed.

Error after run the client program

Hi my name is mostafa!
at the very end of instruction, I run the server program first, the the client program and I can see the graphical user interface of smart car, but when I hit home, left, right or other key, I got the error on the server terminal on raspberry pi that says:"cannot recognize the command:home" or "cannot recognize the command forward"...
I will appreciate if you help me on this

Japanese Raspberry Pi 3 (Mfg by Sony Japan)

Hello :-)

I want to try to use Japanese Raspberry Pi 3 module.
However, I can't run i2cHelper.py well because the revision number of Japanese Raspberry Pi 3 is "a32082" .

Can I modify i2cHelper.py as follows?

RPI_REVISION_3 = ["a02082", "a22082"] → RPI_REVISION_3 = ["a02082", "a22082", "a32082"]

Best regards.

Invalid Syntax

invalid syntax when i try to run win_py module.
colon after motor

def run(event):
global runbtn
print 'motor', runbtn

IOError: [Errno 2] No such file or directory

While running

sudo python cali_server.py on a Pi3

I'm getting this:

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server $ sudo python cali_server.py 
offset_x = 11
offset_y = 0
offset = 0
turning0 = True
turning1 = True
Traceback (most recent call last):
  File "cali_server.py", line 176, in <module>
    setup()
  File "cali_server.py", line 47, in setup
    video_dir.setup(busnum=busnum)
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/video_dir.py", line 34, in setup
    pwm = servo.PWM(bus_number=busnum) # Initialize the servo controller.
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/PCA9685.py", line 113, in __init__
    self.bus = smbus.SMBus(self.bus_number)
IOError: [Errno 2] No such file or directory

i2cHelper gives:

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi $ sudo python i2cHelper.py

   ====================================
   ||                                ||
   ||     Raspberry Pi I2C check     ||
   ||        and setup tools         ||
   ||                                ||
   ||                     SunFounder ||
   ====================================

   Checking your Pi's information.
Traceback (most recent call last):
  File "i2cHelper.py", line 148, in <module>
    main()
  File "i2cHelper.py", line 89, in main
    you_i2c_bus_number = getPiI2CBusNumber()
  File "i2cHelper.py", line 45, in getPiI2CBusNumber
    raise ValueError("Error occur while getting Pi Revision. Revision:{0}".format(revision))
ValueError: Error occur while getting Pi Revision. Revision:2a02082
pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi $ 

I added my revision to i2Chelper.py

RPI_REVISION_3 = ["a02082", "a22082", "2a02082"]

Result:

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi $ sudo python i2cHelper.py

   ====================================
   ||                                ||
   ||     Raspberry Pi I2C check     ||
   ||        and setup tools         ||
   ||                                ||
   ||                     SunFounder ||
   ====================================

   Checking your Pi's information.
   Your cpu revision: 2a02082
   Your Raspberry Pi is Revision 3
   Your I2C bus number is: 1

   Checking your device...
   I2C has not been setup.

   Backup... done
   Setting i2c... done
   I2C has set. It would change after reboot.
   Do you want to reboot now?(y/n) y
   Your Raspberry Pi will be reboot in 5 second.
    5
    4
    3
    2
    1
    0
   Rebooting...

Maybe you fix that too

PCA9685.py -- raise ValueError('Reading Pi type error, Your Pi "{0}"" is not in the list

This is occurring on a Raspberry PI ZERO. Other versions I've used 2 and 3 are working fine.

UPDATE: The library does work by defaulting the bus to 1. NOT recommended... It does get me by for now.

def _get_bus_number(self):
	pi_type = GPIO.RPI_INFO['TYPE']
	print ('----------pi_type----------')
	print (pi_type)
	print ('---------------------------')
	if pi_type in self._BUS_0_TYPES:
		bus_number = 0
	elif pi_type in self._BUS_1_TYPES:
		bus_number = 1
	else:
		bus_number = 1
		#raise ValueError('Reading Pi type error, Your Pi "{0}"" is not in the list.\n  Please post an Issus at our Github Page or contract us\n    Github page: https://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/issues\n    Email: [email protected]\n    SunFounder'.format(pi_type))

Android app does not work

Not sure, if it is an issue, which needs to be reported here, but the Android app does not work at all.

The python client app script works fine.

What is method A

Where is the web client? i failed to install pyqt5 so i would like to use the web client but can't find it.

Car not moving straight

I purchased your car kit, assemble it properly and I am using raspberry pi 3 ,I first calibrated the car but it is not going straight it always take slight curve! Please suggest

It won't turn

When I start up the app on my phone, it connects to the video car just fine. I can move it forwards and reverse, pan the camera every way possible. But when I tilt my phone, the video car does not turn. Do you think it is because I have a raspberry pi 2 model b+ and not a raspberry pi 3 model b+? Or could it be the fact that the app was created for an older version of android? Or is my Samsung Galaxy Amp 2 just not compatible?

Getting i2c to work

Hello,
I'm aware this is not really a new issue, but I did read the other posts involving this issue and those advices didn't work for me. This is what I've accomplished so far:

  • connected and reconnected wires, including the famed GND wire between Rasp Pi and servo control. I used the wires that came with the Car Kit.

  • When I run sudo raspi-config I get the option Advanced (#7) but there is no i2C in the menu.

  • I also tried sudo python i2chelper.py, but it gives me an Error Message.

What am I doing wrong? Should I recheck the wires? Should I solder them to GND? Should I get new wires?

Please help,

Emil

git clone on a pi requires authentication

I'm trying to clone the Sunfounder Kit on a headless PI (connected via SSH from a Mac).

pi@raspberrypi:~ $ git clone https://github.com/sunfounder/Sunfounder_Smart_Video_Car_ Kit_for_RaspberryPi

I'm getting asked for a username and password for the repo, which I of course don't have...

What to do?

struct statx_timestamp

mjpg-streamer
run: make USE_LIBV4L2=true clean all

In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446,
from utils.c:33:
/usr/include/arm-linux-gnueabihf/bits/statx.h:25:8: error: redefinition of ‘struct statx_timestamp’
struct statx_timestamp
^~~~~~~~~~~~~~~
In file included from utils.c:32:
/usr/include/linux/stat.h:56:8: note: originally defined here
struct statx_timestamp {
^~~~~~~~~~~~~~~
In file included from /usr/include/arm-linux-gnueabihf/sys/stat.h:446,
from utils.c:33:
/usr/include/arm-linux-gnueabihf/bits/statx.h:36:8: error: redefinition of ‘struct statx’
struct statx
^~~~~
In file included from utils.c:32:
/usr/include/linux/stat.h:99:8: note: originally defined here
struct statx {
^~~~~
make: *** [: utils.o] Error 1

I try to downgrade libc6 but it is not possible and stuck on version 2.28.

Any solution? :/

New code stopped certain servo functions

I built and ran this kit earlier this year. I just pulled the latest code from github and now my camera wont move left/right... Was there something more to it than just git pull origin master ?

configuration ok. then app

thon cali_server.py
offset_x = -45
offset_y = 107
offset = -85
turning0 = False
turning1 = False
Waiting for connection...
...connected from : ('192.168.2.146', 56460)
Command Error! Cannot recognize command: speed50
Command Error! Cannot recognize command: stop

Pi Revision

I am trying to run some code on raspberry pi 4 model B but it keeps giving me error The error is: (Error. Pi revision didn’t recognize, module number: c03112).
Any help will be appreciated.

Vibrations and weak construction of the camera mount

I'm having a strange experience with the camera mount. Even if I calibrate it correctly, once the server starts, the camera literally falls down. I need to calibrate it to point to the sky so that it points forward, once the server starts.

But this is not the main issue I have. The entire construction is constantly vibrating and it is absolutely not robust enough. I had a little accident and all the screws fixing the holder of the bottom servo have been pulled out.

But what is this with the vibrations? If I pan a little left or right, the vibration stops. This is pretty strange, as if the servo would constantly getting contradictory orders

motor is unable to move

I had build the car and as instructed install and configure all the software and parameter. I had started server and client which is successfully connected for calibration test when i click on run the car does not move.

Can you please help me that.

thanks

Amir

Waiting for connection...

When I run sudo python cali_server.py the bottom servo will move all the way one direction and then stop. That servo will then become unmovable until I power down the entire car by pulling the batteries out. I have looked for a process but I'm not sure what it would be.

Here is the output as it shows on the screen when I run the python script:
pi@raspberrypi:~/car_dir/server $ sudo python cali_server.py
offset_x = 11
offset_y = 0
offset = 0
turning0 = True
turning1 = True
Waiting for connection...

I've tried to ctrl-c out of the python script but that also does not change anything.

Cervo noise.

Hello !
I have a problem running the calibration.
When I start cali_server.py my Cervo is making 'noise' and eventually get warm.
I guess this is not some normal behaving...
I've unplugged and plugged everything about 3 times (or more)...
Where did i fail? Any clue?

Using git submodule for mjpg-streamer

Hey, what do you think about using a git submodule for mjpg-streamer? I ask because the source code for mjpg-streamer in this project is 2+ years old; using a module removes the source from your repo, and makes it very easy to update to the later commits.

A quick overview of the change: the mjpg-streamer directory at your root directory would be replaced using a module to https://github.com/jacksonliam/mjpg-streamer. Docs would need changed a bit to say git clone --recursive and require the cmake package.

If you're okay with it, I can make the change and submit a PR. Thanks! 😸

Problem with version

Hello good, is it possible to migrate the code that can be used today? following the installation guide there are several commands that do not work.

I wanted to use the car and the memory was damaged and now I try to reinstall and it is impossible....

For Example:

##################################################################################################
pi@raspberrypi:~ $ sudo apt-get install python-smbus
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-smbus is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

###################################################################################################
pi@raspberrypi:~ $ sudo apt-get install libjpeg8-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libjpeg8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libjpeg9-dev libjpeg62-turbo-dev

##################################################################################################
pi@raspberrypi:/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer $ sudo make USE_LIBV4L2=true clean all
make -C plugins/input_uvc clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_uvc'
rm -f *.a *.o core *
*.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_uvc'
make -C plugins/input_testpicture clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_testpicture'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_testpicture'
make -C plugins/output_file clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_file'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_file'
make -C plugins/output_http clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_http'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_http'
make -C plugins/output_udp clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_udp'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_udp'
make -C plugins/output_autofocus clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_autofocus'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_autofocus'
make -C plugins/input_gspcav1 clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_gspcav1'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_gspcav1'
make -C plugins/output_viewer clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_viewer'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_viewer'
make -C plugins/input_control clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_control'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_control'
make -C plugins/output_rtsp clean
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_rtsp'
rm -f *.a *.o core *~ *.so *.lo
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/output_rtsp'
rm -f *.a *.o mjpg_streamer core *~ *.so *.lo
gcc -D'SVN_REV="Unversioned directory"' -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o mjpg_streamer.o mjpg_streamer.c
gcc -D'SVN_REV="Unversioned directory"' -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o utils.o utils.c
gcc -D'SVN_REV="Unversioned directory"' -O2 -DLINUX -D_GNU_SOURCE -Wall mjpg_streamer.o utils.o -lpthread -ldl -o mjpg_streamer
chmod 755 mjpg_streamer
make -C plugins/input_uvc USE_LIBV4L2=true all
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_uvc'
gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -DUSE_LIBV4L2 -o v4l2uvc.lo v4l2uvc.c
v4l2uvc.c: In function ‘init_videoIn’:
v4l2uvc.c:88:23: warning: variable ‘currentHeight’ set but not used [-Wunused-but-set-variable]
88 | int currentWidth, currentHeight = 0;
| ^~~~~~~~~~~~~
v4l2uvc.c:88:9: warning: variable ‘currentWidth’ set but not used [-Wunused-but-set-variable]
88 | int currentWidth, currentHeight = 0;
| ^~~~~~~~~~~~
v4l2uvc.c:118:9: warning: ‘memcpy’ forming offset [64, 75] is out of the bounds [0, 64] of object ‘fmtdesc’ with type ‘struct v4l2_fmtdesc’ [-Warray-bounds]
118 | memcpy(&pglobal->in[id].in_formats[pglobal->in[id].formatCount], &fmtdesc, sizeof(input_format));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
v4l2uvc.c:99:29: note: ‘fmtdesc’ declared here
99 | struct v4l2_fmtdesc fmtdesc;
| ^~~~~~~
gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -DUSE_LIBV4L2 -o jpeg_utils.lo jpeg_utils.c
gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -DUSE_LIBV4L2 -o dynctrl.lo dynctrl.c
gcc -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -DUSE_LIBV4L2 -o input_uvc.so input_uvc.c v4l2uvc.lo jpeg_utils.lo dynctrl.lo -lv4l2 -ljpeg
/usr/bin/ld: v4l2uvc.lo:(.bss+0x0): multiple definition of cams'; /tmp/ccVEpHFR.o:(.bss+0x8): first defined here /usr/bin/ld: jpeg_utils.lo:(.bss+0x4): multiple definition of cams'; /tmp/ccVEpHFR.o:(.bss+0x8): first defined here
/usr/bin/ld: dynctrl.lo:(.bss+0x0): multiple definition of `cams'; /tmp/ccVEpHFR.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:33: input_uvc.so] Error 1
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_uvc'
make: *** [Makefile:76: input_uvc.so] Error 2

################################################################################################
pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer $ sudo make DESTDIR=/usr install
make -C plugins/input_uvc all
make[1]: Entering directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_uvc'
gcc -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o input_uvc.so input_uvc.c v4l2uvc.lo jpeg_utils.lo dynctrl.lo -ljpeg
/usr/bin/ld: v4l2uvc.lo:(.bss+0x0): multiple definition of cams'; /tmp/ccovlpaw.o:(.bss+0x8): first defined here /usr/bin/ld: jpeg_utils.lo:(.bss+0x4): multiple definition of cams'; /tmp/ccovlpaw.o:(.bss+0x8): first defined here
/usr/bin/ld: dynctrl.lo:(.bss+0x0): multiple definition of `cams'; /tmp/ccovlpaw.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:33: input_uvc.so] Error 1
make[1]: Leaving directory '/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/mjpg-streamer/mjpg-streamer/plugins/input_uvc'
make: *** [Makefile:80: input_uvc.so] Error 2

please your help

Clients don't work on Ubuntu 17.04

I get the following error for cali_client.py and client_App.py

_tkinter.TclError: expected integer but got "Sans"

I tried it in a VM of Ubuntu 16.04 and it works there.

ValueError: Reading Pi type error, Your Pi "Unknown" is not in the list

Hi,

I have the BMP280 sensor from robotdyn.
httprobotdyn compubmedia0g-00005097sens-bar-bmp280photophotoangle0g-00005097sens-bar-bmp280(1)

this is how i have set it up:
20200529_095008

i have connected :
sensor : breadboard(t-split)
5v : 5v
gnd : gnd
sck : pin3
sdi : pin2

this is the error that i get, after i run the 31_bmp.py file from the sunfounder lessons.
image

there also is an 31_barometer.py file. I also tried to run that but then the error is: no module named adafruit_bmp. i have pip3 installed it, but this error still pops up.

Anyone who could help me with this. Would very much appreciate it. (excuse my bad English)

Using android app

When I put in line 2 it says it doesn't exist, I don't see a http_server directory

BMP280 throws an error on bus types.

Leaving a note as requested. I have a Pi Model 3 + 2017 version. I get an the following 280
Traceback (most recent call last):
File "31_bmp280.py", line 251, in
main()
File "31_bmp280.py", line 232, in main
bmp = BMP280()
File "31_bmp280.py", line 108, in init
self.bus_number = self._get_bus_number()
File "31_bmp280.py", line 134, in _get_bus_number
raise ValueError('Reading Pi type error, Your Pi "{0}"" is not in the list.\n Please post an Issus at our Github Page or contract us\n Github page: https://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/issues\n Email: [email protected]\n SunFounder'.format(pi_type))
ValueError: Reading Pi type error, Your Pi "Unknown"" is not in the list.
Please post an Issus at our Github Page or contract us
Github page: https://github.com/sunfounder/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/issues

[Errno 121] Remote I/O error

Hello Sunfounder,

I am getting following error. Could you please help me on this?

Thanks.

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server $ python cali_server.py
offset_x = 11
offset_y = 0
offset = 0
turning0 = True
turning1 = True
[Errno 121] Remote I/O error

Your Pi Rivision is: 3 Module B
I2C bus number is: 1
Checking I2C device:
Commands "ls /dev/i2c-1" output:
/dev/i2c-1
I2C device setup OK
Your PCA9685 address is set to 0x40
i2cdetect output:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
Conneceted i2c device:
0x40
0x70
Wierd, I2C device is connected. Try to run the program again. If the problem's still, email the error message to [email protected]
pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server $

Problem with the motors

Greetings everyone,
I am following the pdf of starting with Sunfounder Raspberry Pi Video Car kit, but unfortunately I am having a problem with the motors. I did calibrate them successfully. I even made sure that they are turning in the same way; but when I runt the code for controlling the car using pygame which i am sure it works, the motors are turning in opposite direction. Can anyone please help me. Thank you in advance

Android app not available

The android app is not available in the play store. The link in the readme of the html_server is broken. Please provide a valid link to download the android app

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.