EasyManuals Logo

Freenove 4WD Smart Car Board for Raspberry Pi User Manual

Default Icon
132 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #97 background imageLoading...
Page #97 background image
Need support? support.freenove.com
93
Chapter 7 Smart video car
www.freenove.com
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
self.server_socket.close()
try:
with picamera.PiCamera() as camera:
camera.resolution = (400,300) # pi camera resolution
camera.framerate = 30 # 15 frames/sec
time.sleep(2) # give 2 secs for camera to initilize
start = time.time()
stream = io.BytesIO()
# send jpeg format video stream
print "Start transmit ... "
for foo in camera.capture_continuous(stream, 'jpeg', use_video_port = True):
try:
self.connection.flush()
stream.seek(0)
b = stream.read()
lengthBin = struct.pack('L', len(b))
self.connection.write(lengthBin)
self.connection.write(b)
if time.time() - start > 600:
break
stream.seek(0)
stream.truncate()
except :
print "End transmit ... "
break
except:
print "Camera unintall"

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Freenove 4WD Smart Car Board for Raspberry Pi and is the answer not in the manual?

Freenove 4WD Smart Car Board for Raspberry Pi Specifications

General IconGeneral
BrandFreenove
Model4WD Smart Car Board for Raspberry Pi
CategoryMicrocontrollers
LanguageEnglish