Top Banner
Who’s this guy? James Montemagno Developer Evangelist [email protected] http://motz.codes @JamesMontemagno
25
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: C# Powered Robots, C# Powered Mobile Apps

Who’s this guy?

JamesMontemagno

DeveloperEvangelist

[email protected]://motz.codes@JamesMontemagno

Page 2: C# Powered Robots, C# Powered Mobile Apps

The World of Robots!

Page 3: C# Powered Robots, C# Powered Mobile Apps

We are going to build this!

Page 4: C# Powered Robots, C# Powered Mobile Apps

Programing Said Robots

• Arduino– Runs Arduino Software– Code in C/C++– IDE: open-source Ardunio

Software IDE• Windows/OS X/Linux

• Netduino– Compatible with Arduino

Hardware Ecosystem– Much more powerful– Runs Netduino Software– .NET Micro Framework!!!– Code in C# with .NET– Code in Visual Studio or

Xamarin Studio!

Page 5: C# Powered Robots, C# Powered Mobile Apps

Robot Coding in Visual Studio!

• Step 1: – Install .NET Micro Framework SDK

• Step 2: – Install VS 2015 .NET Micro Framework Project System

• Step 3: – Install Netduino SDK v4.3.1

http://forums.netduino.com/index.php?/topic/10201-­beta-­visual-­studio-­2013-­support/

Page 6: C# Powered Robots, C# Powered Mobile Apps

We did it!

Page 7: C# Powered Robots, C# Powered Mobile Apps

Interacting with the netduino

• Built in– User LED– Button

• You can add more!– BLE– Wi-Fi– DC Motors– Accelerometers– Other awesome stuff

http://www.netduino.com/netduino2/specs.htm

Page 8: C# Powered Robots, C# Powered Mobile Apps

Access “Ports”

• InputPort– Read only– Is LED on?– Digital

• OutputPort– Write Only– Turn LED

On– Digital

• InterruptPort– Input Port– Notified on

Change• Events!

• Analog Port– Input Port– Analog

(values 0 –1000)

– Microphone

Page 9: C# Powered Robots, C# Powered Mobile Apps

Blink that light!

Tim  &  Eric

Page 10: C# Powered Robots, C# Powered Mobile Apps

Robots in C#

Page 11: C# Powered Robots, C# Powered Mobile Apps

Introducing Monkey.Robotics

Page 12: C# Powered Robots, C# Powered Mobile Apps

What’s Included

• Micro Stack– Runs on Netduino– Follows “Reactive

Programming”– Low-level Hardware

Abstraction– Sensor & Peripheral Library

Page 13: C# Powered Robots, C# Powered Mobile Apps

Built on Blocks

• Everything is a Block• C# Class• Represent Devices

– Sensors– Motors– Generators– Specialized Blocks

LED

Buttonin

out

in

outDC  Motor

in

out

Page 14: C# Powered Robots, C# Powered Mobile Apps

Blocks in Block in Blocks

Buttonin

out

My  Block

in

out

LEDin

outLeft  Motor

in

out

Right  Motorin

out

Page 15: C# Powered Robots, C# Powered Mobile Apps

Scopes

• Scope : Block– Listen in on signals– Do interesting things– Like:

• Log Data• Transform Data• Etc.

Page 16: C# Powered Robots, C# Powered Mobile Apps

SimplifiedRobots in C#

Page 17: C# Powered Robots, C# Powered Mobile Apps

Xamarin’s Unique  Approach

Native withCode Sharing

Page 18: C# Powered Robots, C# Powered Mobile Apps

What’s Included

• Mobile Stack– Low-level BLE API– Messaging Framework– Peripheral Libraries

Page 19: C# Powered Robots, C# Powered Mobile Apps

On Netduino – Create Server, Expose Variables

Page 20: C# Powered Robots, C# Powered Mobile Apps

On Mobile – Find Devices

Page 21: C# Powered Robots, C# Powered Mobile Apps

On Mobile – Connect to Devices

Page 22: C# Powered Robots, C# Powered Mobile Apps

On Mobile – Send Variable Updates

Page 23: C# Powered Robots, C# Powered Mobile Apps

Controlling Robots from C# Powered Apps!

Page 24: C# Powered Robots, C# Powered Mobile Apps

Resources

• Slides– www.slideshare.net/jamesmontemagno

• Netduino– www.netduino.net

• Monkey.Robotics– www.github.com/xamarin/monkey.robotics

• Code from Demo– www.github.com/jamesmontemagno/CSharpRobots

Page 25: C# Powered Robots, C# Powered Mobile Apps

Get StartedXamarin.com