Павел Бондарь - raspberry pi tank

16
Raspberry Pi Tank Make your own tanks with blackjack and … by Pavel Bondar and Artem Sheremet

Upload: minsk-linux-user-group

Post on 13-May-2015

604 views

Category:

Technology


0 download

DESCRIPTION

Доклад Павла Бондаря на февральской линуксовке MLUG 2014

TRANSCRIPT

Page 1: Павел Бондарь - Raspberry Pi Tank

Raspberry Pi Tank

Make your own tanks with blackjack and …

by Pavel Bondar and Artem Sheremet

Page 2: Павел Бондарь - Raspberry Pi Tank

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

Page 3: Павел Бондарь - Raspberry Pi Tank
Page 4: Павел Бондарь - Raspberry Pi Tank

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?)

Page 5: Павел Бондарь - Raspberry Pi Tank
Page 6: Павел Бондарь - Raspberry Pi Tank

Raspberry Pi Tank? (hardware)

● Raspberry Pi● Remote controllable tank● Battery with USB output● Web camera● Wi-Fi dongle● A lot of wires

Page 7: Павел Бондарь - Raspberry Pi Tank

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

Page 8: Павел Бондарь - Raspberry Pi Tank

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

Page 9: Павел Бондарь - Raspberry Pi Tank

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

Page 10: Павел Бондарь - Raspberry Pi Tank

How it works?(Console client)

rpi-gpiod.pl

Tank hardware

GPIO

rpi-keyboard.pl

Console

TCP/IP ZoneRaspberry Pi Tank Client workstation

commands

Page 11: Павел Бондарь - Raspberry Pi Tank

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

Page 12: Павел Бондарь - Raspberry Pi Tank

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)

Page 13: Павел Бондарь - Raspberry Pi Tank

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

Page 14: Павел Бондарь - Raspberry Pi Tank

And where is the code?

GitHub:● https://github.com/bondar-pavel/rpi-tank ● https://github.com/dotdoom/rpi-tank-rack

Page 15: Павел Бондарь - Raspberry Pi Tank

Thank you!

Page 16: Павел Бондарь - Raspberry Pi Tank

Questions?