Lab #1: Getting Started.

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

Embedded Sumo 1T4 – 1T5 UTRA.
Re-programming the Simon Says with Arduino Linz Craig, Brian Huang.
Intro to the Arduino Topics: The Arduino Digital IO Analog IO Serial Communication.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Arduino Part 1 Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Image of Arduino. Arduino discussion Address issues with circuit walk-through – Electricity, Programming, Arduino Concepts Work on BeatTable (next week)
Dean Brock, Rebecca Bruce and Susan Reiser, CCSC SE 2009 Using Arduino Material taken from Todbot blog Bionic Arduino Todbot blog Bionic ArduinoTodbot.
Intro to the Arduino Topics: The Arduino Digital IO
Microprocessors Tutorial 1: Arduino Basics
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Introduction to the Arduino
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 1 Getting Started to Arduino.
Microprocessors Tutorial 1: Arduino Basics
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. ARDUINO BASICS Credit to: Sparkfun and Linz Craig, Nick Poole, Prashanta Aryal, Theo Simpson, Tai Johnson,
Microcontroller Hands-on Workshop #2 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers October 31, 2009.
Microcontrollers, Microcomputers, and Microprocessors
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Introducing the Arduino Uno Presented by Dave Mawdsley, DACS Member, Linux SIG Member (wiring, programming and running a cute traffic light simulation)
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
Arduino Part 1 Topics: Microcontrollers
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Scrolling LCD using Arduino.
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Dr. Kyung Eun Park Summer 2017
Microcontroller basics
Introduction to the Arduino
Microprocessors Tutorial 1: Arduino Basics
Intro to the Arduino Created by
UTA010 : Engineering Design – II
An Arduino Workshop A Microcontroller.
Welcome to Arduino A Microcontroller.
Arduino Development for Beginners
UCD ElecSoc Robotics Club 2017/2018
Topics: ArduinoIO package Simulink with arduinoIO
Arduino Part 1 Topics: Microcontrollers Programming Basics
INC 161 , CPE 100 Computer Programming
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Roller Coaster Design Project
Week 5: Microcontrollers
Roller Coaster Design Project
مقدمة في الاردنيو د فضل الاكوع.
ARDUINO     What is an Arduino? Features 14 Digital I/O pins 6 Analogue inputs 6 PWM pins USB serial 16MHz Clock speed 32KB Flash memory 2KB SRAM.
Intro to the Arduino Topics: The Arduino Digital IO
Topics: Arduino Target Package
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Introducing the Arduino Uno
Arduino programs Arduino toolchain Cross-compilation Arduino sketches
Intro to the Arduino by Someet Singh
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino Motor Lab Inspired by NYU ITP project
CTY SAR FCPS Shawn Lupoli, Elliot Tan
I/O Programming with Arduino
Aeroponic Engineering and Vertical Farming
Arduino Leonardo Setup
Arduino Uno circuit basics
SAURABH GINGADE.
Introduction to Arduino IDE and Software
Presentation transcript:

Lab #1: Getting Started

What is a Microcontroller A small computer on a single chip containing a processor, memory, and input/output Typically "embedded" inside some device that they control A microcontroller is often small and low cost Examples www.mikroe.com/chapters/view/1

What is a Development Board A printed circuit board designed to facilitate work with a particular microcontroller. Typical components include: power circuit programming interface basic input; usually buttons and LEDs I/O pins

The Arduino Development Board

What is the Arduino? www.todbot.com/blog/bionicarduino

Getting Started Check out: http://arduino.cc/en/Guide/HomePage Download & install the Arduino environment (IDE) Connect the board to your computer via the UBS cable If needed, install the drivers (not needed in lab) Launch the Arduino IDE Select your board Select your serial port Open the blink example Upload the program

Try It: Connect the USB Cable todbot.com/blog/bionicarduino

Launch the Arduino IDE Code Edit Area Status and Notification Area See: http://arduino.cc/en/Guide/Environment for more information

Select Serial Port and Board

Status Messages www.todbot.com/blog/bionicarduino

Using/Programming Arduino Arduino Code

First Example – Blinking LED LED’s have polarity Negative indicated by flat side of the housing and a short leg

First Example – Blinking LED Task Get a LED to blink. Required equipment Just the microcontroller board with the USB cable.

Coding Code is case sensitive Statements are commands and must end with a semi-colon Comments follow a // or begin with /* and end with */ loop and setup

Basic Structure of a Sketch Name variable In the first part elements of the program are named ( This will be explained in program no. 3). This part is not absolutely necessary. Setup (absolutely necessary for the program)  The setup will be performed only once. Defined as Output Defined as an Input Loop (absolutely necessary for the program)  This loop part will be continuously repeated by the board. It assimilates the sketch from beginning to end and starts again from the beginning and so on.

Arduino Programming “sketch” “pin” “digital” “analog” A program you write to run on an Arduino board “pin” An input or output connected to something E.g. Output to an LED or input from a button “digital” Value is either HIGH or LOW “analog” Value ranges, usually from 0 to 255 E.g. LED brightness, motor speed, etc.

Arduino Programming pinMode(pin, mode) digitalRead(pin) Sets pin to either INPUT or OUTPUT digitalRead(pin) Reads HIGH or LOW from a pin digitalWrite(pin, value) Writes HIGH or LOW to a pin delay(ms) Pauses for a few milliseconds delayMicroseconds(us) Pauses for a few microseconds More commands: http://arduino.cc/en/Reference/HomePage

Compile and Run Complete the sketch (program). What output will be generated by this program?

Alternately Blinking LED Task We want to let two LEDs blink alternately. Required equipment Microcontroller / two LEDs (blue) / two resistors with 100 Ohm / Breadboard / cables Hardware setup Output Pin #7 and Pin #8

Coding Compile Run Observe Modify …

Good References www.arduino.cc www.ladyada.net/learn/arduino www.EarthshineElectronics.com