SlideShare a Scribd company logo
Computer Science with
                   Microsoft .NET Gadgeteer


Lee Stott
@lee_stott
LeeStott@Microsoft.com
Microsoft
http://www.microsoft.com/uk/faculty
A new way to make inspire and stimulate learning
History
โ€ข .NET Gadgeteer comes from Microsoft Research in
  Cambridge, UK
โ€ข Designed as a tool for researchers to make it faster and
  easier to prototype new kinds of devices
โ€ข Since then, it has proven to be of interest to hobbyists
  and for secondary and tertiary education
โ€ข Because of this interest, we have launched .NET
  Gadgeteer as open source software/hardware
The .NET Gadgeteer Hardware
At the heart of every Gadgeteer project is a mainboard.
A mainboard is made up of a programmable processor, and a
number of sockets that Gadgeteer modules can plug into.
Modules, Modules, Modules




Sensors, Actuators, Networking, User Input,
Displays, Power, Extensibility, โ€ฆ
Today we are using the
GHI Electronics FEZ Spider Kit



Touchscreen Display   Camera     Multicolor LED   Button    FEZ Spider Mainboard




 Joystick             USB Host     Ethernet       SD Card      USB Power Supply
                                                            + Programming Interface
Goals

Low threshold
 Simple gadgets should be very quick to build



High ceiling
 It should also be possible to build sophisticated and complex
 devices
3 Key Components

   Modular
  Hardware
3 Key Components

   Modular         Object-Oriented
  Hardware          Programming
3 Key Components

   Modular         Object-Oriented    Digital Design
  Hardware          Programming      and Fabrication
Building gadgets
The .NET Gadgeteer Hardware
At the heart of every Gadgeteer project is a mainboard.
A mainboard is made up of a programmable processor, and a number of sockets
that Gadgeteer modules can plug into.
A Closer Look at the Mainboard

                Socket Numbers


    Power LED                             Debug LED




                                         Socket Types




                          Reset Button
Match socket type letters when connecting modules to the mainboard
Connect modules to mainboard, and connect to PC via USB.
Engineering and Technology



We want to make it easier to give shape to Gadgeteer devices by using
digital fabrication technologies

First step: integration with 3D CAD modelling software (e.g. Solidworks)
Auto-generate mounting fixtures
Falling cost and increasing availability of 3D printers
Digital design and rapid manufacture
Hardware configuration (~5 minutes to assemble)
                         MICROSOFT CONFIDENTIAL

                                          Four-way switch to control
                                          placement of puzzle piece




                                                              Knob to rotate
                                                              piece




                                                  Colour OLED display
USB power source
                                                  (128x128 resolution)
and programming socket
Software development CONFIDENTIAL
           MICROSOFT in C# (~5 hours)
Enclosure design in   MICROSOFT CONFIDENTIAL
Solidworks
(>3 hours)
Enclosure 3D printed (>6MICROSOFT CONFIDENTIAL
hours)
MICROSOFT CONFIDENTIAL
                 Assembly (>30 minutes)
LETS BUILD A DIGITAL CAMERA
FROM SCRATCH IN 15 MINUTES
Development Tool: Visual Studio




                                    or



Available for FREE for students and educators from www.dreamspark.com
Designer Tab
                      Solution Explorer
(Program.gadgeteer)
                        (Project Files)
Code Tab
(Program.cs)
Designer Tab
          (Program.gadgeteer)




Toolbox
Module manufacturer
and module type




    Module name
You can rename a module by editing the label below the module.
For example, from button to myButton.
When clicking on a moduleโ€™s socket,   To connect the button to a
compatible sockets on the mainboard   compatible socket, click and drag
are highlighted in green.
Now: please build a digital camera!
FIRST use the designer to get it as below
and THEN build the hardware
VERY BRIEF INTRODUCTION TO C#
using   System;
using   Microsoft.SPOT;                                The code starts with a
using   Microsoft.SPOT.Presentation;
using   Microsoft.SPOT.Presentation.Controls;          standard template
using   Microsoft.SPOT.Presentation.Media;

using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace GadgeteerApp1
{
    public partial class Program
    {
        void ProgramStarted()
        {
            /******************************************************************************************
            Access modules defined in the designer by typing their name:

             e.g.   button
                    camera1

             Initialize event handlers here.
             e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed);
             ***************************************************************************************** */

             // Do one-time tasks here
             Debug.Print("Program Started");
         }
    }
}
ProgramStarted() executes
                                                      whenever the mainboard is first
namespace GadgeteerApp1
{                                                     powered up or restarted.
    public partial class Program
    {
        void ProgramStarted()
        {
            /******************************************************************************************
            Access modules defined in the designer by typing their name:

            e.g.   button
                   camera1

            Initialize event handlers here.
            e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed);
            ***************************************************************************************** */

            // Do one-time tasks here
            Debug.Print("Program Started");
        }
    }
}
namespace GadgeteerApp1
{
    public partial class Program
    {
        void ProgramStarted()
        {
            /******************************************************************************************
            Access modules defined in the designer by typing their name:

            e.g.   button
                   camera1

            Initialize event handlers here.
            e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed);
            ***************************************************************************************** */

            // Do one-time tasks here
            Debug.Print("Program Started");
        }
    }
}

                                                      Debug.Print(string) prints
                                                      text to the debug output
                                                      window.
To access hardware functionality type the name
of the hardware module followed by a period
e.g. myButton.
Properties
Values that can be read, and sometimes also assigned.
Methods
Built-in functions that can include a number of parameters.
Events
Notification that something of interest has occurred.
Events
Notification that something of interest has occurred.

            This line specifies that we are interested in knowing when this
            particular event occurs, and associates it with a specific method.
Events
Notification that something of interest has occurred.

            This line specifies that we are interested in knowing when this
            particular event occurs, and associates it with a specific method.
Events
Notification that something of interest has occurred.




This method will now get called (and the code inside
it will get executed) whenever the button is pressed.
The quick way to use events
Inside the ProgramStarted() method, type module name followed
by a period, then select event using the arrow and Enter keys.
The quick way to use events
 Type +=, followed by the Tab key twice.
The quick way to use events
Replace the line   throw new NotImplementedException();   with your own
code.
SOFTWARE FOR A DIGITAL CAMERA
Setup events for camera.PictureCaptured and button.ButtonPressed
by typing the event name, then +=, then <tab> twice
When the button is pressed, call the
camera.TakePicture() method.
When the camera has captured a picture,
use the displayโ€™s SimpleGraphics to
display the image.
The DisplayImage method takes three parameters: a
GT.Picture object, an X coordinate and a Y coordinate.

The PicturedCaptured event returns a GT.Picture object,
called picture, which is used as the first parameter.

The coordinate 0, 0 (passed as the second and third
parameters) refers top-left corner of the display.
RUNNING THE PROGRAM
Make sure that the mainboard is
connected to the PC, and that the
power LED is on.

Click the   button, or press the
F5 Key to deploy the code to the
mainboard and start a debugging
session.
After loading messages, output window should display Program Started,

Note: If you canโ€™t see the Output Window, press Ctrl+Alt+O
Click the    button, or press
Shift+F5 to exit the debugging
mode.

Note that you canโ€™t edit the code
while in debugging mode.
If you see the following message in the output window,
stop debugging (Shift+F5) and try again (F5):
Updating display configuration. DEVICE WILL NOW REBOOT. Visual Studio might lose
connection, and debugging might need to be manually restarted.




If the output window is stuck displaying the following
message, press the reset button on the mainboard:
Rebooting...




Now: Lets program a camera!
Completed program (comments removed)
Now: Please write your program!
Gadgeteer Resources


End user website
http://netmf.com/gadgeteer/
Source repository
http://gadgeteer.codeplex.com/

Lesson Plans
http://www.gadgeteering.net/
http://www.Microsoft.com/faculty

More Related Content

Similar to CodePool Liverpool 2013 - Microsoft Gadgeteer Presentation

Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
Francis Seriรฑa
ย 
Ppt lesson 03
Ppt lesson 03Ppt lesson 03
Ppt lesson 03
Linda Bodrie
ย 
A d swincc15e
A d swincc15eA d swincc15e
A d swincc15e
confidencial
ย 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
marwaeng
ย 
.Net Gadgeteer
.Net Gadgeteer .Net Gadgeteer
.Net Gadgeteer
Wade Zhu
ย 
Gui builder
Gui builderGui builder
Gui builder
learnt
ย 
Android testing
Android testingAndroid testing
Android testing
Bitbar
ย 
Introduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAMIntroduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAM
Sisubalan Selvan
ย 
3d printer for future @1000KV Technologies 9030844877
3d printer for future @1000KV Technologies 90308448773d printer for future @1000KV Technologies 9030844877
3d printer for future @1000KV Technologies 9030844877
1000kv technologies
ย 
Km60 3d printer base paper (wecompress)
Km60 3d printer base paper (wecompress)Km60 3d printer base paper (wecompress)
Km60 3d printer base paper (wecompress)
1000kv technologies
ย 
Game programming workshop
Game programming workshopGame programming workshop
Game programming workshop
narigadu
ย 
Y1 gd engine terminology
Y1 gd engine terminologyY1 gd engine terminology
Y1 gd engine terminology
KeatonBradley
ย 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
ClintParis
ย 
Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...
Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...
Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...
topomax
ย 
Additive Manufacturing Report
Additive Manufacturing ReportAdditive Manufacturing Report
Additive Manufacturing Report
Joseph Legan
ย 
The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)
Daroko blog(www.professionalbloggertricks.com)
ย 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
rosstapher
ย 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorial
Salah Amean
ย 
Chapter 1
Chapter 1Chapter 1
Chapter 1
gebrsh
ย 
Lab7 s2
Lab7 s2Lab7 s2
Lab7 s2
rajbabureliance
ย 

Similar to CodePool Liverpool 2013 - Microsoft Gadgeteer Presentation (20)

Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
ย 
Ppt lesson 03
Ppt lesson 03Ppt lesson 03
Ppt lesson 03
ย 
A d swincc15e
A d swincc15eA d swincc15e
A d swincc15e
ย 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
ย 
.Net Gadgeteer
.Net Gadgeteer .Net Gadgeteer
.Net Gadgeteer
ย 
Gui builder
Gui builderGui builder
Gui builder
ย 
Android testing
Android testingAndroid testing
Android testing
ย 
Introduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAMIntroduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAM
ย 
3d printer for future @1000KV Technologies 9030844877
3d printer for future @1000KV Technologies 90308448773d printer for future @1000KV Technologies 9030844877
3d printer for future @1000KV Technologies 9030844877
ย 
Km60 3d printer base paper (wecompress)
Km60 3d printer base paper (wecompress)Km60 3d printer base paper (wecompress)
Km60 3d printer base paper (wecompress)
ย 
Game programming workshop
Game programming workshopGame programming workshop
Game programming workshop
ย 
Y1 gd engine terminology
Y1 gd engine terminologyY1 gd engine terminology
Y1 gd engine terminology
ย 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
ย 
Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...
Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...
Digital Calipers Software Mitutoyo / Logiciel pour Pied ร  coulisse Mitutoyo (...
ย 
Additive Manufacturing Report
Additive Manufacturing ReportAdditive Manufacturing Report
Additive Manufacturing Report
ย 
The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)
ย 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
ย 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorial
ย 
Chapter 1
Chapter 1Chapter 1
Chapter 1
ย 
Lab7 s2
Lab7 s2Lab7 s2
Lab7 s2
ย 

More from Lee Stott

Cortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacksCortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacks
Lee Stott
ย 
Project Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning APIProject Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning API
Lee Stott
ย 
Visual studio professional 2015 overview
Visual studio professional 2015 overviewVisual studio professional 2015 overview
Visual studio professional 2015 overview
Lee Stott
ย 
Azure cloud for students and educators
Azure cloud   for students and educatorsAzure cloud   for students and educators
Azure cloud for students and educators
Lee Stott
ย 
Getting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine MicrosoftGetting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine Microsoft
Lee Stott
ย 
Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)
Lee Stott
ย 
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud SubscriptionSetting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Lee Stott
ย 
Imagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and EducatorsImagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and Educators
Lee Stott
ย 
Porting unity games to windows - London Unity User Group
Porting unity games to windows - London Unity User GroupPorting unity games to windows - London Unity User Group
Porting unity games to windows - London Unity User Group
Lee Stott
ย 
Visual Studio Tools for Unity Unity User Group 23rd Feb
Visual Studio Tools for Unity  Unity User Group 23rd FebVisual Studio Tools for Unity  Unity User Group 23rd Feb
Visual Studio Tools for Unity Unity User Group 23rd Feb
Lee Stott
ย 
Unity camp london feb 2015
Unity camp london feb 2015Unity camp london feb 2015
Unity camp london feb 2015
Lee Stott
ย 
Marmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftMarmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott Microsoft
Lee Stott
ย 
E book Mobile App Marketing_101
E book Mobile App Marketing_101E book Mobile App Marketing_101
E book Mobile App Marketing_101
Lee Stott
ย 
Game Republic 24th April 2014 - Maximising your app revenue
Game Republic 24th April 2014  - Maximising your app revenueGame Republic 24th April 2014  - Maximising your app revenue
Game Republic 24th April 2014 - Maximising your app revenue
Lee Stott
ย 
Updateshow Manchester April 2014
Updateshow Manchester April 2014Updateshow Manchester April 2014
Updateshow Manchester April 2014
Lee Stott
ย 
Microsoft Office for Education
Microsoft Office for EducationMicrosoft Office for Education
Microsoft Office for Education
Lee Stott
ย 
Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability
Lee Stott
ย 
Game Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 GatesheadGame Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 Gateshead
Lee Stott
ย 
GamesWest 2013 December
GamesWest 2013 December GamesWest 2013 December
GamesWest 2013 December
Lee Stott
ย 
Microsoft Graduate Recuirtment postcard
 Microsoft Graduate Recuirtment postcard Microsoft Graduate Recuirtment postcard
Microsoft Graduate Recuirtment postcard
Lee Stott
ย 

More from Lee Stott (20)

Cortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacksCortana intelligence suite for projects &amp; hacks
Cortana intelligence suite for projects &amp; hacks
ย 
Project Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning APIProject Oxford - Introduction to advanced Manchine Learning API
Project Oxford - Introduction to advanced Manchine Learning API
ย 
Visual studio professional 2015 overview
Visual studio professional 2015 overviewVisual studio professional 2015 overview
Visual studio professional 2015 overview
ย 
Azure cloud for students and educators
Azure cloud   for students and educatorsAzure cloud   for students and educators
Azure cloud for students and educators
ย 
Getting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine MicrosoftGetting coding in under a hour with Imagine Microsoft
Getting coding in under a hour with Imagine Microsoft
ย 
Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)Create and manage a web application on Azure (step to step tutorial)
Create and manage a web application on Azure (step to step tutorial)
ย 
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud SubscriptionSetting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
Setting up a WordPress Site on Microsoft DreamSpark Azure Cloud Subscription
ย 
Imagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and EducatorsImagine at Microsoft - Resources for Students and Educators
Imagine at Microsoft - Resources for Students and Educators
ย 
Porting unity games to windows - London Unity User Group
Porting unity games to windows - London Unity User GroupPorting unity games to windows - London Unity User Group
Porting unity games to windows - London Unity User Group
ย 
Visual Studio Tools for Unity Unity User Group 23rd Feb
Visual Studio Tools for Unity  Unity User Group 23rd FebVisual Studio Tools for Unity  Unity User Group 23rd Feb
Visual Studio Tools for Unity Unity User Group 23rd Feb
ย 
Unity camp london feb 2015
Unity camp london feb 2015Unity camp london feb 2015
Unity camp london feb 2015
ย 
Marmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftMarmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott Microsoft
ย 
E book Mobile App Marketing_101
E book Mobile App Marketing_101E book Mobile App Marketing_101
E book Mobile App Marketing_101
ย 
Game Republic 24th April 2014 - Maximising your app revenue
Game Republic 24th April 2014  - Maximising your app revenueGame Republic 24th April 2014  - Maximising your app revenue
Game Republic 24th April 2014 - Maximising your app revenue
ย 
Updateshow Manchester April 2014
Updateshow Manchester April 2014Updateshow Manchester April 2014
Updateshow Manchester April 2014
ย 
Microsoft Office for Education
Microsoft Office for EducationMicrosoft Office for Education
Microsoft Office for Education
ย 
Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability Microsoft Learning Experiences Skills and Employability
Microsoft Learning Experiences Skills and Employability
ย 
Game Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 GatesheadGame Kettle Feb 2014 Gateshead
Game Kettle Feb 2014 Gateshead
ย 
GamesWest 2013 December
GamesWest 2013 December GamesWest 2013 December
GamesWest 2013 December
ย 
Microsoft Graduate Recuirtment postcard
 Microsoft Graduate Recuirtment postcard Microsoft Graduate Recuirtment postcard
Microsoft Graduate Recuirtment postcard
ย 

Recently uploaded

Information and Communication Technology in Education
Information and Communication Technology in EducationInformation and Communication Technology in Education
Information and Communication Technology in Education
MJDuyan
ย 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
ย 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
ย 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
ย 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
Celine George
ย 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
ย 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
ย 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
ย 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
Kalna College
ย 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
OH TEIK BIN
ย 
CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...
CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...
CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...
Nguyen Thanh Tu Collection
ย 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
ย 
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxxSimple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
RandolphRadicy
ย 
Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
lakshayrojroj
ย 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
ย 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Celine George
ย 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
ย 
FinalSD_MathematicsGrade7_Session2_Unida.pptx
FinalSD_MathematicsGrade7_Session2_Unida.pptxFinalSD_MathematicsGrade7_Session2_Unida.pptx
FinalSD_MathematicsGrade7_Session2_Unida.pptx
JennySularte1
ย 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
ย 

Recently uploaded (20)

Information and Communication Technology in Education
Information and Communication Technology in EducationInformation and Communication Technology in Education
Information and Communication Technology in Education
ย 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
ย 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
ย 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
ย 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
ย 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
ย 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
ย 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
ย 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
ย 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
ย 
CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...
CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...
CHUYรŠN ฤแป€ ร”N TแบฌP Vร€ PHรT TRIแป‚N Cร‚U HแปŽI TRONG ฤแป€ MINH HแปŒA THI TแปT NGHIแป†P THPT ...
ย 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
ย 
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxxSimple-Present-Tense xxxxxxxxxxxxxxxxxxx
Simple-Present-Tense xxxxxxxxxxxxxxxxxxx
ย 
Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
ย 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
ย 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
ย 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
ย 
FinalSD_MathematicsGrade7_Session2_Unida.pptx
FinalSD_MathematicsGrade7_Session2_Unida.pptxFinalSD_MathematicsGrade7_Session2_Unida.pptx
FinalSD_MathematicsGrade7_Session2_Unida.pptx
ย 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
ย 

CodePool Liverpool 2013 - Microsoft Gadgeteer Presentation

  • 1. Computer Science with Microsoft .NET Gadgeteer Lee Stott @lee_stott LeeStott@Microsoft.com Microsoft http://www.microsoft.com/uk/faculty
  • 2. A new way to make inspire and stimulate learning
  • 3. History โ€ข .NET Gadgeteer comes from Microsoft Research in Cambridge, UK โ€ข Designed as a tool for researchers to make it faster and easier to prototype new kinds of devices โ€ข Since then, it has proven to be of interest to hobbyists and for secondary and tertiary education โ€ข Because of this interest, we have launched .NET Gadgeteer as open source software/hardware
  • 4. The .NET Gadgeteer Hardware At the heart of every Gadgeteer project is a mainboard. A mainboard is made up of a programmable processor, and a number of sockets that Gadgeteer modules can plug into.
  • 5. Modules, Modules, Modules Sensors, Actuators, Networking, User Input, Displays, Power, Extensibility, โ€ฆ
  • 6. Today we are using the GHI Electronics FEZ Spider Kit Touchscreen Display Camera Multicolor LED Button FEZ Spider Mainboard Joystick USB Host Ethernet SD Card USB Power Supply + Programming Interface
  • 7. Goals Low threshold Simple gadgets should be very quick to build High ceiling It should also be possible to build sophisticated and complex devices
  • 8. 3 Key Components Modular Hardware
  • 9. 3 Key Components Modular Object-Oriented Hardware Programming
  • 10. 3 Key Components Modular Object-Oriented Digital Design Hardware Programming and Fabrication
  • 12. The .NET Gadgeteer Hardware At the heart of every Gadgeteer project is a mainboard. A mainboard is made up of a programmable processor, and a number of sockets that Gadgeteer modules can plug into.
  • 13. A Closer Look at the Mainboard Socket Numbers Power LED Debug LED Socket Types Reset Button
  • 14. Match socket type letters when connecting modules to the mainboard
  • 15.
  • 16. Connect modules to mainboard, and connect to PC via USB.
  • 17. Engineering and Technology We want to make it easier to give shape to Gadgeteer devices by using digital fabrication technologies First step: integration with 3D CAD modelling software (e.g. Solidworks)
  • 19. Falling cost and increasing availability of 3D printers
  • 20. Digital design and rapid manufacture
  • 21. Hardware configuration (~5 minutes to assemble) MICROSOFT CONFIDENTIAL Four-way switch to control placement of puzzle piece Knob to rotate piece Colour OLED display USB power source (128x128 resolution) and programming socket
  • 22. Software development CONFIDENTIAL MICROSOFT in C# (~5 hours)
  • 23. Enclosure design in MICROSOFT CONFIDENTIAL Solidworks (>3 hours)
  • 24. Enclosure 3D printed (>6MICROSOFT CONFIDENTIAL hours)
  • 25. MICROSOFT CONFIDENTIAL Assembly (>30 minutes)
  • 26.
  • 27. LETS BUILD A DIGITAL CAMERA FROM SCRATCH IN 15 MINUTES
  • 28. Development Tool: Visual Studio or Available for FREE for students and educators from www.dreamspark.com
  • 29. Designer Tab Solution Explorer (Program.gadgeteer) (Project Files)
  • 31. Designer Tab (Program.gadgeteer) Toolbox
  • 32.
  • 33. Module manufacturer and module type Module name
  • 34. You can rename a module by editing the label below the module. For example, from button to myButton.
  • 35. When clicking on a moduleโ€™s socket, To connect the button to a compatible sockets on the mainboard compatible socket, click and drag are highlighted in green.
  • 36. Now: please build a digital camera! FIRST use the designer to get it as below and THEN build the hardware
  • 38. using System; using Microsoft.SPOT; The code starts with a using Microsoft.SPOT.Presentation; using Microsoft.SPOT.Presentation.Controls; standard template using Microsoft.SPOT.Presentation.Media; using GT = Gadgeteer; using GTM = Gadgeteer.Modules; using Gadgeteer.Modules.GHIElectronics; namespace GadgeteerApp1 { public partial class Program { void ProgramStarted() { /****************************************************************************************** Access modules defined in the designer by typing their name: e.g. button camera1 Initialize event handlers here. e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed); ***************************************************************************************** */ // Do one-time tasks here Debug.Print("Program Started"); } } }
  • 39. ProgramStarted() executes whenever the mainboard is first namespace GadgeteerApp1 { powered up or restarted. public partial class Program { void ProgramStarted() { /****************************************************************************************** Access modules defined in the designer by typing their name: e.g. button camera1 Initialize event handlers here. e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed); ***************************************************************************************** */ // Do one-time tasks here Debug.Print("Program Started"); } } }
  • 40. namespace GadgeteerApp1 { public partial class Program { void ProgramStarted() { /****************************************************************************************** Access modules defined in the designer by typing their name: e.g. button camera1 Initialize event handlers here. e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed); ***************************************************************************************** */ // Do one-time tasks here Debug.Print("Program Started"); } } } Debug.Print(string) prints text to the debug output window.
  • 41. To access hardware functionality type the name of the hardware module followed by a period e.g. myButton.
  • 42. Properties Values that can be read, and sometimes also assigned.
  • 43. Methods Built-in functions that can include a number of parameters.
  • 44. Events Notification that something of interest has occurred.
  • 45. Events Notification that something of interest has occurred. This line specifies that we are interested in knowing when this particular event occurs, and associates it with a specific method.
  • 46. Events Notification that something of interest has occurred. This line specifies that we are interested in knowing when this particular event occurs, and associates it with a specific method.
  • 47. Events Notification that something of interest has occurred. This method will now get called (and the code inside it will get executed) whenever the button is pressed.
  • 48. The quick way to use events Inside the ProgramStarted() method, type module name followed by a period, then select event using the arrow and Enter keys.
  • 49. The quick way to use events Type +=, followed by the Tab key twice.
  • 50. The quick way to use events Replace the line throw new NotImplementedException(); with your own code.
  • 51. SOFTWARE FOR A DIGITAL CAMERA
  • 52. Setup events for camera.PictureCaptured and button.ButtonPressed by typing the event name, then +=, then <tab> twice
  • 53. When the button is pressed, call the camera.TakePicture() method.
  • 54. When the camera has captured a picture, use the displayโ€™s SimpleGraphics to display the image.
  • 55. The DisplayImage method takes three parameters: a GT.Picture object, an X coordinate and a Y coordinate. The PicturedCaptured event returns a GT.Picture object, called picture, which is used as the first parameter. The coordinate 0, 0 (passed as the second and third parameters) refers top-left corner of the display.
  • 57. Make sure that the mainboard is connected to the PC, and that the power LED is on. Click the button, or press the F5 Key to deploy the code to the mainboard and start a debugging session.
  • 58. After loading messages, output window should display Program Started, Note: If you canโ€™t see the Output Window, press Ctrl+Alt+O
  • 59. Click the button, or press Shift+F5 to exit the debugging mode. Note that you canโ€™t edit the code while in debugging mode.
  • 60. If you see the following message in the output window, stop debugging (Shift+F5) and try again (F5): Updating display configuration. DEVICE WILL NOW REBOOT. Visual Studio might lose connection, and debugging might need to be manually restarted. If the output window is stuck displaying the following message, press the reset button on the mainboard: Rebooting... Now: Lets program a camera!
  • 61. Completed program (comments removed) Now: Please write your program!
  • 62. Gadgeteer Resources End user website http://netmf.com/gadgeteer/ Source repository http://gadgeteer.codeplex.com/ Lesson Plans http://www.gadgeteering.net/ http://www.Microsoft.com/faculty