Top Banner
http://etsy.me/1KraLA8 ROBOTS IN THE CRYPT Adam Cohen-Rose @adamcohenrose
17

Robots in the crypt

Feb 09, 2017

Download

Technology

Adam Cohen-Rose
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Robots in the crypt

http://etsy.me/1KraLA8

R O BO T S I N T H E C RY P TAd a m Co h e n - Ro s e @a d a m c o h e n ro s e

Page 2: Robots in the crypt

W H AT DO YO U K N O W A BO U T L E G O R O BO T S ?• love LEGO but never built robots before

• seen videos and would love to build something

• played with previous version (RCX? NXT?)

• EV3 robotics ninja

Page 3: Robots in the crypt

W H AT I S M I N D S T O R M S E V3 ?

Page 4: Robots in the crypt

W H AT I S M I N D S T O R M S E V3 ?

programmable

LEGO robotshackable

Page 5: Robots in the crypt

W H AT I S M I N D S T O R M S E V3 ?

sensors

behaviourmotors

Page 6: Robots in the crypt

W H AT C AN YO U B U I LD ?

Page 7: Robots in the crypt

W H AT C A N YO U B U I LD ?

• talking robots and voice-controlled robots

• immersive 3D telepresence (first person robot vision)

• useless machines

• a simpler rubik’s cube solver (with just a single EV3 set)

h t t p s : / / fl i c . k r / p / 7 k K S s i

Page 8: Robots in the crypt

• new IR sensor & beacon

• medium motor (smaller & faster)

• frame pieces: quicker to build

• faster, more powerfulprogramming brick

N E W I N M I N D S T O R M S E V 3

• 48Mhz ➡ 300MHz ARM9 processor

• 64K ➡ 64Mb RAM• microSD card slot• USB port — supports Wi-Fi

dongles• works with iOS Bluetooth• runs Debian Linux!

Page 9: Robots in the crypt

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js,C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 10: Robots in the crypt

# turn the left green LED off$ echo 0 > /sys/class/leds/ev3\:green\:left/brightness# find out what the maximum brightness value is$ cat /sys/class/leds/ev3\:green\:left/max_brightness255# turn the left green LED back on$ echo 255 > /sys/class/leds/ev3\:green\:left/brightness# dim the left green LED 1/2 way$ echo 127 > /sys/class/leds/ev3\:green\:left/brightness

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js, C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 11: Robots in the crypt

# run a large EV3 motor for 3 seconds>>> import ev3dev>>> m = ev3dev.large_motor('outA')>>> m.connectedTrue>>> m.run_timed(time_sp=3000, duty_cycle_sp=75)

# run remotely with IPython-Notebook# or use RPyC:>>> import rpyc>>> c = rpyc.classic.connect("10.0.1.2")>>> ev3dev = c.modules.ev3dev

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js, C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 12: Robots in the crypt

// Require the modulevar ev3 = require('ev3dev');// Create the motor on port Avar motorA = new ev3.Motor(ev3.MotorPort.A);// Run the motor at 60% power // for five seconds, and then // hold it in placemotorA.startMotor({ targetSpeed: 60, time: 5000, stopMode: 'hold'});

// only runs node-0.10 (needs arm-v5)

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js, C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 13: Robots in the crypt

// use Eclipse plugin to build & upload// automatically when connected over USB

import lejos.hardware.lcd.LCD;import lejos.utility.Delay;...LCD.drawString("Plugin Test", 0, 4);Delay.msDelay(5000);RegulatedMotor m = new EV3LargeRegulatedMotor(MotorPort.A);m.rotate(60);

// supports Java RMI for remote access

// loads of examples on the leJOS blog:// https://lejosnews.wordpress.com/

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js, C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 14: Robots in the crypt

// connect to EV3 remotely by IPRemoteRequestEV3 = new RemoteRequestEV3("10.0.1.2");RegulatedMotor left = ev3.createRegulatedMotor("A", 'L');left.forward();

// ready-made example:// http://git.io/vn8YB

// Always disconnect before you // rebuild and re-connect!// leJOS leaves ports open on the brick,// requiring a lengthy reboot.

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js, C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 15: Robots in the crypt

S O H O W D O YO U P R O G RA M I T ?

• LEGO EV3 drag and drop visual programming

• ev3dev:shell script, Python, node.js, C++, Lua, Go, Clojure

• leJOS: Java, remote from Android,behavioural programming

Easily switch by booting from microSD

Page 16: Robots in the crypt

A DD YO U R O W N S E N S O R S …

• several types of sensor supported:analog, I2C, UART

• sensors identified using resistorsLEGO provide hardware spec

• cable can provide power as well• ev3dev provides

raw analog values• build a micro:bit ➡ EV3 cable?

h t t p s : / / y ou t u . b e / 5 5 f B E U U h 6 M 4

Page 17: Robots in the crypt

G E T B U I L D I N G !

• Please share your ideas and creationshashtag #MINDSTORMS

• facebook.com/groups/legomindstorms (8000 people ready to help!)

• j.mp/mindstorms-facebookLEGO official page

• All links available from http://j.mp/ota15-robot-notes(add your own too!)

h t t p s : / / fl i c . k r / p / 7 k K S s i