+ All Categories
Home > Software > Robert Virkus - Playing with LEGO Mindstorms from your Mobile Phone

Robert Virkus - Playing with LEGO Mindstorms from your Mobile Phone

Date post: 13-May-2015
Category:
Upload: devconfu
View: 170 times
Download: 2 times
Share this document with a friend
Description:
Learn how interact with LEGO Mindstorms robots in this practice heavy talk. Mindstorms is a really great way to get into robotics programming and you can completely control it from within your app. We look at the options available on iOS, Android and Windows Phone and play around with real robots.
Popular Tags:
40
Playing with LEGO Mindstorms from your Mobile Phone @robert_virkus
Transcript

Playing with

LEGO

Mindstorms

from your

Mobile Phone

@robert_virkus

Mindstorms!

Mobile!

Madness !

A toy!

Beams

frame

angled

straight

Connectorspins

axles

axle, pin and

angle connectors

Crossblocks

Gears

1

23

4

A

BC

D

sensors

motors

USB to another intelligent block

Demo Time…

Mobile!

legoev3.codeplex.com

Demo time!

Don’t forget to pair your Mindstorms robot first!

legoev3.codeplex.com Connecting

public async Task ConnectAsync(){

Brick brick = new Brick(new BluetoothCommunication() );await Brick.ConnectAsync();IsConnected = true;

}

legoev3.codeplex.com Direct Commands

public async Task CloseClawsAsync(){

await EnsureIsConnectedAsync();await Brick.DirectCommand.TurnMotorAtPowerAsync(OutputPort.A, 10);

}

legoev3.codeplex.com Batch Commands

public async Task MoveAsync(int leftPower, int rightPower){

await EnsureIsConnectedAsync();Brick.BatchCommand.TurnMotorAtPower(OutputPort.B, leftPower);Brick.BatchCommand.TurnMotorAtPower(OutputPort.C, rightPower);await Brick.BatchCommand.SendCommandAsync();

}

legoev3.codeplex.com Sensor Reading

Brick.BrickChanged += Brick_BrickChanged;

private async void Brick_BrickChanged(object sender, BrickChangedEventArgs e){

if (e.Ports[InputPort.One].SIValue == 1|| e.Ports[InputPort.Two].SIValue == 1){

await Brick.DirectCommand.StopMotorAsync(OutputPort.B | OutputPort.C, true);

}}

legoev3.codeplex.com Sensor Configuration

Brick.Ports[InputPort.One].SetMode(TouchMode.Bumps);await Brick.DirectCommand.ClearChanges(InputPort.One);

legoev3.codeplex.com System Commands

await Brick.SystemCommand.CopyFileAsync("\\devconfu.rsf", "../prjs/Tester/dev.rsf");

turtlesnapp3r.codeplex.com making it prettier

works on

Android (using Xamarin.com)

Windows Phone

Windows

Linux

Mac OS X

do it yourself

0 1

2 bytes

Payload

Size

2 3 4 5

2 bytes

Sequence

1 byte

Cmd

Type

2 bytes

local and

global size

(direct

commands)

6 7 8

1 byte or 2 bytes

Command code

and possibly

sub-command

9…

Command-specific payload

Madness !

http://www.wired.co.uk/magazine/archive/2012/07/start/playful-prototyping

dexterindustries.com/BrickPi.html

Original Linux source code

github.com/mindboards/ev3sources

C programming

robotc.net/download/lego/

.NET programming

monobrick.dk/software/ev3firmware/

Firmwares

Java programming

lejos.org

about me…

2005

-4,600 M

Earth forms

-3,500 M

Life forms

-2,000 M

Complex life forms

-225 until -65 M

Age of dinosaurs

-3 M

Stone age

Download it at

enough.de/mdgg

@enoughsoftware

@robert_virkus


Recommended