FIRST GADGETEER PROJECT. Where are you? Making a VS project Parts of a C# program Basics of C# syntax Debugging in VS Questions? 2.

Slides:



Advertisements
Similar presentations
JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Advertisements

Student Overview MMS Wireless Mobile Lab. Removing the laptops from the cart Each laptop is numbered. Each slot in the cabinet is numbered. Pick up your.
1 Unit 02. Visual Studio Visual Studio.NET Creating Projects Project Anatomy Using the IDE Code Snippets.
Lab7: Introduction to Arduino
Copyright © 2005 Rockwell Automation, Inc. All rights reserved. 1 Micro Logix 1100 RSLogix 500 LAB#2 Timing, Counting & Comparing.
Chung-Ta King National Tsing Hua University
Lets Play Catch! Keeping Score in Alice By Francine Wolfe Duke University Professor Susan Rodger May 2010.
Follow these before and during the exam… Leave belongings in the locker except your laptop, power cord, network cable, and pen/pencils. Get your laptop.
De la Rosa-Pohl ECE 1100 Introduction to Engineering Intro to LabVIEW: Programming for Symon University of Houston Diana de la Rosa-Pohl Len Trombetta.
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Finding and Debugging Errors
AlgoTutor Tutorial (3) Program Pad J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong MTSU Computer Science Department Making the transition from the algorithm.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
Getting started with Microsoft.NET Gadgeteer Comberton Village College Gadgeteer Club.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
Chapter Introduction to Computers and Programming 1.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Embedded Systems Programming 1 ETEE 3285 Topic HW3: Coding, Compiling, Simulating.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
IT 211 Project Integration and Deployment Lab #11.
Events and Timers. Event handlers ScratchC#/VS 2 Script == event handler.
Intro to MFC. Open VS and create new project 1)Open MS Visual Studio 2008 Professional (It must be the Professional Edition, the Express Edition will.
Web Services Week 2 Aims: Getting started with creating simple C# applications within Visual Studio.NET Objectives: –An introduction to the syntax of C#.NET.
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
Project Deployment IT [211 CAP] How to convert your project to a full application.
LIGHT SENSOR GADGETEER PROJECT #2. Step #1 Create a new Gadgeteer project named: SensorGadgeteerApp Add A red power module (USBClientSP) A Light Sensor.
Sample Application Multi Layered Architecture (n-tier): –Graphical User Interface (GUI): Forms, components, controls The Visual Designer in Visual Studio.
1 Chapter Eleven Handling Events. 2 Objectives Learn about delegates How to create composed delegates How to handle events How to use the built-in EventHandler.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
CS101 Computer Programming I Chapter 4 Extra Examples.
LANDESK SOFTWARE CONFIDENTIAL Tips and Tricks with Filters Jenny Lardh.
Architecture Multi Layered Architecture (n-tier): Application: Model Controllers Database Access Graphical User Interface (GUI): Forms, components, controls.
11 Debugging Programs Session Session Overview  Create and test a method to calculate percentages  Discover how to use Microsoft Visual Studio.
Teaching Digital Logic courses with Altera Technology
Input Boxes, List Boxes, and Loops Chapter 5. 2 Input Boxes Method for getting user’s attention to obtain input. InputBox() for obtaining input MessageBox()
Logical Operators.  Quiz  Let's look at the schedule  Logical Operators 2.
Second Model: “Model2”. What You Will Learn  How to build a simple layout  How to connect ports for routing flowitems  How to detail and enter data.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
Making a 24hr Timer.
Visual Basic Fundamental Concepts
Debugging with Eclipse
Programming and Debugging with the Dragon and JTAG
Lab 1: Using NIOS II processor for code execution on FPGA
Neumann János Informatikai Kar
Visual programming Chapter 1: Introduction
Epson Printer Support Ireland Toll-Free Number:
Objective of the lesson
 Connect iPhone to computer with USB cable.  Launch iTunes on your computer and turn off your iPhone.  Hold Home button and Sleep button at the same.
Call to Fix Canon Pixma MX340 printer Error 5200
Web Development in Microsoft Visual Studio 2013
MicroEconomix 1500 RSLogix 500 LAB#2
Introduction to Object-Oriented Programming
Visual Basic..
Simple Windows Applications
COMPUTER TROUBLESHOOTING
Tonga Institute of Higher Education
Founded in Silicon Valley in 1984
Aeroponic Engineering and Vertical Farming
Presentation transcript:

FIRST GADGETEER PROJECT

Where are you? Making a VS project Parts of a C# program Basics of C# syntax Debugging in VS Questions? 2

Gadgeteer Assignments Each of you will be assigned a kit. You are responsible for that kit. Make sure all parts are there Make sure kit is returned to appropriate numeric order in storage Missing parts or kits will be assessed as a fine. Checking out kits: By seating order at the beginning of lab. Can not just get them Checking in kits: By seating order – at the end of lab. Need to maintain numeric order Need a lab supervisior 3

Creating a Gadgeteer Project Start with ‘New Project …’ Select the Gadgeteer template Name it ‘’FirstGadgeteerApp’ ‘OK’ 4

Select a Mainboard: FEZCeberus 5

This brings up ‘the wizard’ 6

Important Points Get modules from the toolbox You always need a (red) power module Right Click -> Connect all modules Note the connections and names of the modules 7

Wizard ready to generate code 8

Step #1 Create a Gadgeteer project named: FirstGadgeteerApp Add A red power module (USB Client SP Module) A Potentiometer (aka the Knob) A LED Strip Module Right Click - Connect the modules Raise your hand when you are done or if you have a problem 9

PHYSICALLY CONNECTING UP THE GADGETEER MODULES 10

Solution Explorer 11

Connecting up the Gadgeteer Connect to the same connectors that you used in the wizard. Forgot what connectors you used? 12

Step #2 Connect the knob, LED Strip Module, and USBClient modules (In the right places) The connectors are ‘keyed’ so they will only go in the right way Don’t force anything Connect the USB cable to the red module and to your machine Raise you hand when you are done 13

ADDING SOME CODE 14

Step 3 – Adding the code void ProgramStarted() { double percent; // this variable holds the output from the potentiometer. This ia a value between 0 and 1 int intensity; // this variable holds the level of the intensity that the led will be set to. This is a value between 0 and 255 Debug.Print("Program Started"); while (true) // this loop goes on forever since the condition is always true { percent = potentiometer.ReadPotentiometerPercentage(); // read the current potentiometer value into the variable intensity = (int)(percent * 255); // convert the percentage ( double 0-1) to intensity (integer 0-255) Debug.Print("Integer = " + intensity.ToString()); // write the intensity that we are setting to the output window for comparison System.Threading.Thread.Sleep(50); //slow the loop down a bit by waiting 50 mS between iterations } 15

Important Points in Adding Code IntelliSense – Use the ‘Tab’ key to let it do the typing. Use drop down to see\use: Properties Methods events If needed, most not. Replace the ‘Not Implemented’ exception in the event handler ‘Exception’ == Error event and message 16

Step #3 Add the code to your application Use IntelliSense Do you have any Syntax errors? Fix them Build Solution Build Succeeded? Raise your hand when you are done 17

DEPLOYING YOUR APPLICATION 18

Step #4 Deploying your Application Your device is connected to the USB port on your laptop Hit ‘F5’ or ‘Debug->StartDebugging Immediate Window shows ‘Program Started’ This may take a bit – the program is rebuilt, sent to the device, and the device is restarted. To clear program: Press the button on your device to reset (only do to clear for a new program). 19

Important Points F5 to deploy Watch the build status Lots of output you don’t need to worry about in the Immediate window – just the last bit Your application is running on the micro processor on the mainboard 20

Exercise 1 - See Knobs values in output window Deploy and test your app. Raise you hand when you have change numbers of the knob’s value in the console. Raise your hand if you get an error 21

Exercise 2 – Light the Led Strip in Order Use conditional statements and the potentiometer values to light the led strip lights in order from 0 to 7. When complete the turning the knob should turn off and on the lights on the led strip. 22