Upload
minsk-linux-user-group
View
609
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Доклад Павла Бондаря на февральской линуксовке MLUG 2014
Citation preview
Raspberry Pi Tank
Make your own tanks with blackjack and …
by Pavel Bondar and Artem Sheremet
What is Raspberry Pi?
● board with 600Mhz ARMv6 processor (~3.5 W)● 26-pin BCM2835 GPIO● 3.5” audio output● 2 USB 2.0 ports● Ethernet 100 Mbit● HDMI/RCA video output
What we can do with it?
● media player (xbmc)● home router (route, iptables, dhcp, bind)● torrent client (transmission, deluge)● network storage (nfs, smb)● … but it all just software ...● a Tank (WAT?)
Raspberry Pi Tank? (hardware)
● Raspberry Pi● Remote controllable tank● Battery with USB output● Web camera● Wi-Fi dongle● A lot of wires
Tank Hardware
● DC motor per track(total 2)● DC motor for tower turning● IR-transmitter● IR-receiver● Speaker● Powered by 5V● Control signals are 3.3V
Raspberry Pi Tank? (software)
● Arch Linux: flexible, netautoctl, systemd.● mjpg-streamer: video streaming● netautoctl: dynamic Wi-Fi AP selection● Perl daemon (Pavel Bondar): tcp/ip -> GPIO● Ruby daemon (Artem Sheremet): WebUI● Console client (Pavel Bondar): console -> tcp/ip
How it works?
● rpi-gpiod.pl : low level GPIO control over tcp/ip● rpi-keyboard.pl : provides ‘WASD’ control style● rpi-tank-rack : WebUI for video-streaming and
sending commands
How it works?(Console client)
rpi-gpiod.pl
Tank hardware
GPIO
rpi-keyboard.pl
Console
TCP/IP ZoneRaspberry Pi Tank Client workstation
commands
How it works?(WebUI)
rpi-gpiod.pl
Tank hardware
GPIO
browser
TCP/IP ZoneRaspberry Pi Tank Client
rpi-tank-rack
WebCam
mjpg-streamer
commands
videoTCP/IP
video
Daemon rpi-gpiod.pl
● tank movement: forward, backward, left, right● tower movement: left, right● text based control protocol● support multiple front-ends:
○ rpi-keyboard.pl (console app)○ rpi-tank-rack (ruby WebUI)○ telnet (CLI style)
Rpi-tank-rack(WebUI)
● Rack based ruby daemon● Connects to rpi-gpiod.pl via TCP/IP● WebSockets to receive commands from:
○ Keypresses (WASD control style)○ Buttons
● Control video streaming:○ Start/Stop stream○ Change resolution
And where is the code?
GitHub:● https://github.com/bondar-pavel/rpi-tank ● https://github.com/dotdoom/rpi-tank-rack
Thank you!
Questions?