lego ir controller

Post on 23-Feb-2017

502 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LEGO IR ControllerRaspberry Pint London

Nov 2014

Jiri Tyr(jiri.tyr@gmail.com, @JiriTyr)

About myself

● Linux system engineer● creator and contributor of several Open

Source projects● https://github.com/jtyr

Motivation

● extend the operation range● less prone to signal loss● additional functionality (video streaming)● have a fun with LEGO and RPi

Hardware

● LEGO 9398 4x4 Crawler○ battery○ servo + two L motors○ IR receiver + transmitter

● Raspberry Pi○ battery○ wifi dongle○ camera○ IR transmitter

Price● LEGO 9398 4x4 Crawler (£148.99)● Raspberry Pi B+ (£25.70)● Raspberry Pi case (£11.98)● Raspberry Pi camera (£19.25)● External battery (£13.99)● IR transmitter (£5.25)● Wifi dongle (£10.85)● Jumper cable (£2.09)● Total cost: £148.99 + £89.11 = £238.10

Server side

● Arch Linux ARM● server written in C (bcm2835)

○ two threads (TCP receiver, IR transmitter)○ shared memory for IPC

● VLC video streaming (h264, HTTP)● systemd services● AUR package

○ https://aur.archlinux.org/packages/legoirc-server

TCP protocol

● command = 1 letter + newline● newline only = disconnect

● cmdline client (part of the server pkg)● Android client

○ compatible with Android 4.x and above○ joystick-like control○ embedded VLC player○ on Google Play

■ http://goo.gl/11UnAw

Client side

Issues and improvements

● only IR channel 1 works● video stream is 1s delayed● only "Combo PWM mode" IR mode is

implemented

Open Sourced

● server + command line client○ https://github.com/jtyr/legoirc-server

● Android client○ https://github.com/jtyr/legoirc-android

Questions?

top related