Table of Contents

Wowwee Rovio

Fix Battery Circuit?!

Programming / Modding

Looks like easiest/best way to implement is in Python. Need to do sockets, etc and push to OpenCV easily.

3.3	Using the PyRovio Interface
The PyRovio implementation is available for current use.5	The following is a sample run to illustrate how the PyRovio code is used from within an interactive Python shell.6
In [1]:
In [2]:
In [3]:
In [4]: Out[4]:
In [5]: Out[5]:
In [6]: Out[6]:
In [7]: Out[7]: {’Cmd’:
import rovio
v = rovio.Rovio(’vanessa’, ’192.168.10.18’)
vc = rovio.RovioController(v)
v.forward() 0
v.head_middle() 0
v.get_status() {’Cmd’: ’nav’, ’raw_state’: 0, ’responses’: 0, ’state’: ’idle’}
v.get_report()
’nav’,
... ’x’: 7133, ’y’: -1747}
In [8]: v.get_MCU_report() Out[8]: ’0E0100000000000000000003897400’
In [9]: vc.start()
In [10]: vc.enqueue_all([[1000, v.forward], [1, v.rotate_left, [1, 3]], [1000, v.backward], [1, v.head_down]])
In [11]: v.get_image() Out[11]: ’\xff\xd8\xff\xdb\x00C\x00\x13\r\x10\x1d\x10\r\x10\x13\x1a ...’

Lines 6–8 show how to get sensory information from the Rovio.7	To run the event queue, the RovioController thread must be started as in line 9. Line 10 shows how to queue multiple commands for execution (1000 = 1 second). The get image command returns a JPEG-compressed image from the camera.

Face Detection