SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Teach computing with
Microsoft .NET Gadgeteer


   Lee Stott, Steven Johnston
.NET Gadgeteer is a new toolkit for quickly constructing,
programming and shaping new small computing devices
(gadgets)
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
Connecting mainboards and modules:
          just match the letters




Note: The hardware will not be damaged if the wrong socket is used.
Red modules provide power
Connect only one red module
LETS BUILD A DIGITAL CAMERA
FROM SCRATCH IN 30 MINUTES
Development Tool: Visual Studio




              or
Designer Tab
                      Solution Explorer
(Program.gadgeteer)
                        (Project Files)
Code Tab
(Program.cs)
Designer Tab
          (Program.gadgeteer)




Toolbox
Module manufacturer
and module type




    Module name
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
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.
Completed program (comments removed)
Now: Please write your program!
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: Please program your cameras!

Weitere ähnliche Inhalte

Was ist angesagt?

Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...Mahmoud Samir Fayed
 
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...Patrick Lauke
 
Programming Without Coding Technology (PWCT) - Adding controls to windows.
Programming Without Coding Technology (PWCT) - Adding controls to windows.Programming Without Coding Technology (PWCT) - Adding controls to windows.
Programming Without Coding Technology (PWCT) - Adding controls to windows.Mahmoud Samir Fayed
 
Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)
Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)
Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)Mahmoud Samir Fayed
 
Programming Without Coding Technology (PWCT) - Convert the data type of varai...
Programming Without Coding Technology (PWCT) - Convert the data type of varai...Programming Without Coding Technology (PWCT) - Convert the data type of varai...
Programming Without Coding Technology (PWCT) - Convert the data type of varai...Mahmoud Samir Fayed
 

Was ist angesagt? (6)

Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Rectangles - Con...
 
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
Getting touchy - an introduction to touch and pointer events / Frontend NE / ...
 
Vp lecture 10 ararat
Vp lecture 10 araratVp lecture 10 ararat
Vp lecture 10 ararat
 
Programming Without Coding Technology (PWCT) - Adding controls to windows.
Programming Without Coding Technology (PWCT) - Adding controls to windows.Programming Without Coding Technology (PWCT) - Adding controls to windows.
Programming Without Coding Technology (PWCT) - Adding controls to windows.
 
Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)
Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)
Programming Without Coding Technology (PWCT) - Error Handling (Try/Catch)
 
Programming Without Coding Technology (PWCT) - Convert the data type of varai...
Programming Without Coding Technology (PWCT) - Convert the data type of varai...Programming Without Coding Technology (PWCT) - Convert the data type of varai...
Programming Without Coding Technology (PWCT) - Convert the data type of varai...
 

Ähnlich wie Hack2the future Microsoft .NET Gadgeteer

Gui builder
Gui builderGui builder
Gui builderlearnt
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lecturesmarwaeng
 
Throughout the semester, we have been working on command line applic.pdf
Throughout the semester, we have been working on command line applic.pdfThroughout the semester, we have been working on command line applic.pdf
Throughout the semester, we have been working on command line applic.pdfbirajdar2
 
Android testing
Android testingAndroid testing
Android testingBitbar
 
step by step to write a gnome-shell extension
step by step to write a gnome-shell extension step by step to write a gnome-shell extension
step by step to write a gnome-shell extension Yuren Ju
 
Programming Without Coding Technology (PWCT) - Functions and Procedures
Programming Without Coding Technology (PWCT) - Functions and ProceduresProgramming Without Coding Technology (PWCT) - Functions and Procedures
Programming Without Coding Technology (PWCT) - Functions and ProceduresMahmoud Samir Fayed
 
The java swing_tutorial
The java swing_tutorialThe java swing_tutorial
The java swing_tutorialsumitjoshi01
 
Chapter 1
Chapter 1Chapter 1
Chapter 1gebrsh
 
Spf chapter 03 WinForm
Spf chapter 03 WinFormSpf chapter 03 WinForm
Spf chapter 03 WinFormHock Leng PUAH
 
intro_gui
intro_guiintro_gui
intro_guifilipb2
 
Python is a high-level, general-purpose programming language. Its design phil...
Python is a high-level, general-purpose programming language. Its design phil...Python is a high-level, general-purpose programming language. Its design phil...
Python is a high-level, general-purpose programming language. Its design phil...bhargavi804095
 
Programming Without Coding Technology (PWCT) - Timer control
Programming Without Coding Technology (PWCT) - Timer controlProgramming Without Coding Technology (PWCT) - Timer control
Programming Without Coding Technology (PWCT) - Timer controlMahmoud Samir Fayed
 
Session4 J2ME Mobile Information Device Profile(MIDP) Events
Session4 J2ME Mobile Information Device Profile(MIDP) EventsSession4 J2ME Mobile Information Device Profile(MIDP) Events
Session4 J2ME Mobile Information Device Profile(MIDP) Eventsmuthusvm
 
Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...Mahmoud Samir Fayed
 
Introduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAMIntroduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAMSisubalan Selvan
 

Ähnlich wie Hack2the future Microsoft .NET Gadgeteer (20)

Gui builder
Gui builderGui builder
Gui builder
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
 
Throughout the semester, we have been working on command line applic.pdf
Throughout the semester, we have been working on command line applic.pdfThroughout the semester, we have been working on command line applic.pdf
Throughout the semester, we have been working on command line applic.pdf
 
Android testing
Android testingAndroid testing
Android testing
 
SPF WinForm Programs
SPF WinForm ProgramsSPF WinForm Programs
SPF WinForm Programs
 
GUI components in Java
GUI components in JavaGUI components in Java
GUI components in Java
 
step by step to write a gnome-shell extension
step by step to write a gnome-shell extension step by step to write a gnome-shell extension
step by step to write a gnome-shell extension
 
Programming Without Coding Technology (PWCT) - Functions and Procedures
Programming Without Coding Technology (PWCT) - Functions and ProceduresProgramming Without Coding Technology (PWCT) - Functions and Procedures
Programming Without Coding Technology (PWCT) - Functions and Procedures
 
A d swincc15e
A d swincc15eA d swincc15e
A d swincc15e
 
The java swing_tutorial
The java swing_tutorialThe java swing_tutorial
The java swing_tutorial
 
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)
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Spf chapter 03 WinForm
Spf chapter 03 WinFormSpf chapter 03 WinForm
Spf chapter 03 WinForm
 
intro_gui
intro_guiintro_gui
intro_gui
 
Python is a high-level, general-purpose programming language. Its design phil...
Python is a high-level, general-purpose programming language. Its design phil...Python is a high-level, general-purpose programming language. Its design phil...
Python is a high-level, general-purpose programming language. Its design phil...
 
Programming Without Coding Technology (PWCT) - Timer control
Programming Without Coding Technology (PWCT) - Timer controlProgramming Without Coding Technology (PWCT) - Timer control
Programming Without Coding Technology (PWCT) - Timer control
 
Session4 J2ME Mobile Information Device Profile(MIDP) Events
Session4 J2ME Mobile Information Device Profile(MIDP) EventsSession4 J2ME Mobile Information Device Profile(MIDP) Events
Session4 J2ME Mobile Information Device Profile(MIDP) Events
 
Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...
Programming Without Coding Technology (PWCT) - HarbourPWCT - Hello World - Co...
 
Introduction
IntroductionIntroduction
Introduction
 
Introduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAMIntroduction to CATIA (KEY) - CAD/CAM
Introduction to CATIA (KEY) - CAD/CAM
 

Mehr von Lee Stott

Cortana intelligence suite for projects & hacks
Cortana intelligence suite for projects & hacksCortana intelligence suite for projects & hacks
Cortana intelligence suite for projects & hacksLee 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 APILee Stott
 
Visual studio professional 2015 overview
Visual studio professional 2015 overviewVisual studio professional 2015 overview
Visual studio professional 2015 overviewLee Stott
 
Azure cloud for students and educators
Azure cloud   for students and educatorsAzure cloud   for students and educators
Azure cloud for students and educatorsLee 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 MicrosoftLee 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 SubscriptionLee 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 EducatorsLee 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 GroupLee 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 FebLee Stott
 
Unity camp london feb 2015
Unity camp london feb 2015Unity camp london feb 2015
Unity camp london feb 2015Lee Stott
 
Marmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftMarmalade @include2014 Dev leestott Microsoft
Marmalade @include2014 Dev leestott MicrosoftLee Stott
 
E book Mobile App Marketing_101
E book Mobile App Marketing_101E book Mobile App Marketing_101
E book Mobile App Marketing_101Lee 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 revenueLee Stott
 
Updateshow Manchester April 2014
Updateshow Manchester April 2014Updateshow Manchester April 2014
Updateshow Manchester April 2014Lee Stott
 
Microsoft Office for Education
Microsoft Office for EducationMicrosoft Office for Education
Microsoft Office for EducationLee 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 GatesheadLee 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 postcardLee Stott
 

Mehr von Lee Stott (20)

Cortana intelligence suite for projects & hacks
Cortana intelligence suite for projects & hacksCortana intelligence suite for projects & hacks
Cortana intelligence suite for projects & 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
 

Kürzlich hochgeladen

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Hack2the future Microsoft .NET Gadgeteer

  • 1. Teach computing with Microsoft .NET Gadgeteer Lee Stott, Steven Johnston
  • 2. .NET Gadgeteer is a new toolkit for quickly constructing, programming and shaping new small computing devices (gadgets)
  • 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. Connecting mainboards and modules: just match the letters Note: The hardware will not be damaged if the wrong socket is used.
  • 8. Red modules provide power Connect only one red module
  • 9. LETS BUILD A DIGITAL CAMERA FROM SCRATCH IN 30 MINUTES
  • 11. Designer Tab Solution Explorer (Program.gadgeteer) (Project Files)
  • 13. Designer Tab (Program.gadgeteer) Toolbox
  • 14.
  • 15. Module manufacturer and module type Module name
  • 16. 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.
  • 17. Now: please build a digital camera! FIRST use the designer to get it as below and THEN build the hardware
  • 19. 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"); } } }
  • 20. 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"); } } }
  • 21. 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.
  • 22. To access hardware functionality type the name of the hardware module followed by a period e.g. myButton.
  • 23. Properties Values that can be read, and sometimes also assigned.
  • 24. Methods Built-in functions that can include a number of parameters.
  • 25. Events Notification that something of interest has occurred.
  • 26. 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.
  • 27. 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.
  • 28. 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.
  • 29. 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.
  • 30. The quick way to use events Type +=, followed by the Tab key twice.
  • 31. The quick way to use events Replace the line throw new NotImplementedException(); with your own code.
  • 32. SOFTWARE FOR A DIGITAL CAMERA
  • 33. When the button is pressed, call the camera.TakePicture() method.
  • 34. When the camera has captured a picture, use the display’s SimpleGraphics to display the image.
  • 35. 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.
  • 36. Completed program (comments removed) Now: Please write your program!
  • 38. 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.
  • 39. After loading messages, output window should display Program Started, Note: If you can’t see the Output Window, press Ctrl+Alt+O
  • 40. Click the button, or press Shift+F5 to exit the debugging mode. Note that you can’t edit the code while in debugging mode.
  • 41. 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: Please program your cameras!