Download - LEGO IR Controller
![Page 2: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/2.jpg)
About myself
● Linux system engineer● creator and contributor of several Open
Source projects● https://github.com/jtyr
![Page 3: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/3.jpg)
Motivation
● extend the operation range● less prone to signal loss● additional functionality (video streaming)● have a fun with LEGO and RPi
![Page 4: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/4.jpg)
Hardware
● LEGO 9398 4x4 Crawler○ battery○ servo + two L motors○ IR receiver + transmitter
● Raspberry Pi○ battery○ wifi dongle○ camera○ IR transmitter
![Page 5: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/5.jpg)
![Page 6: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/6.jpg)
![Page 7: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/7.jpg)
![Page 8: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/8.jpg)
![Page 9: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/9.jpg)
![Page 10: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/10.jpg)
![Page 11: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/11.jpg)
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
![Page 12: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/12.jpg)
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
![Page 13: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/13.jpg)
TCP protocol
● command = 1 letter + newline● newline only = disconnect
![Page 14: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/14.jpg)
● 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
![Page 15: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/15.jpg)
![Page 16: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/16.jpg)
Issues and improvements
● only IR channel 1 works● video stream is 1s delayed● only "Combo PWM mode" IR mode is
implemented
![Page 17: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/17.jpg)
Open Sourced
● server + command line client○ https://github.com/jtyr/legoirc-server
● Android client○ https://github.com/jtyr/legoirc-android
![Page 18: LEGO IR Controller](https://reader031.vdocuments.pub/reader031/viewer/2022030210/58aeb9331a28ab00708b6107/html5/thumbnails/18.jpg)
Questions?