Val Manes Department of Math & Computer Science

Slides:



Advertisements
Similar presentations
EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
Advertisements

Electrical team Arduino tutorial I BY: JOSHUA arduini
Lab7: Introduction to Arduino
Mini-SumoBot Construction and Programming
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
How to use Arduino By: Andrew Hoffmaster.
Embedded Sumo 1T4 – 1T5 UTRA.
Principles of Programming Fundamental of C Programming Language and Basic Input/Output Function 1.
Introduction to Arduino Programming January MER-421:Mechatronic System Design.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
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.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Chapter 3: Introduction to C Programming Language C development environment A simple program example Characters and tokens Structure of a C program –comment.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
chipKit Sense Switch & Control LED
Programming Hexors on Arduino Uno. Arduino Uno Arduino is an open-source electronics platform based on easy- to-use hardware and software. It's intended.
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
Cascade switching of an LED EAS 199B Winter 2013.
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Chapter 2: Java Fundamentals
Fundamental Programming: Fundamental Programming Introduction to C++
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Introduction 2 Smart Design. What is smart design? 2 Everything is designed except nature The packaging of a Band-Aid The curve of a bike frame The shape.
CC112 Structured Programming Lecture 2 1 Arab Academy for Science and Technology and Maritime Transport College of Engineering and Technology Computer.
SAMI MAKERSPACE MAKE: AN ELECTRONICS WORKSHOP. ARDUINO BASICS Credit to: Sparkfun and Linz Craig, Nick Poole, Prashanta Aryal, Theo Simpson, Tai Johnson,
Microcontrollers, Microcomputers, and Microprocessors
Arduino libraries Datatekniker Udvidet hardware/software.
1 Introduction to Haptics Introduction to the Hapkit board Allison M. Okamura Stanford University.
ME 120: Arduino Programming Arduino Programming Part II ME 120 Mechanical and Materials Engineering Portland State University
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
:Blink Blink: Er. Sahil Khanna
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
ME 120: Arduino Programming Arduino Programming Part 1 ME 120 Mechanical and Materials Engineering Portland State University
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
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.
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
INTRODUCTION TO ROBOTICS Part 5: Programming
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Introduction to the C Language
Arduino & its hardware interfacing
Arduino Programming Part II
UTA010 : Engineering Design – II
Cascade switching of an LED
Get Your Project Started with Arduino
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
INC 161 , CPE 100 Computer Programming
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Introduction to Arduinos
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.
IoT Programming the Particle Photon.
Introduction to the C Language
Introduction to the C Language
Arduino 101 Credit(s):
using the Arduino to make LEDs flash
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Arduino programs Arduino toolchain Cross-compilation Arduino sketches
Arduino : Introduction & Programming
Aeroponic Engineering and Vertical Farming
Unit 3: Variables in Java
Arduino Uno circuit basics
Setting up a basic program with Arduino
Introduction to Arduinos
UNIT 1 First programs.
Arduino程式範例.
Introduction to Arduino IDE and Software
Presentation transcript:

Val Manes Department of Math & Computer Science Arduino 101 Val Manes Department of Math & Computer Science

Download Arduino Software Link: http://gencyber.ialab.dsu.edu/2016/Arduino/ Save it to your computer Execute the file, accept all defaults

Hardware Microprocessor with hardware interfaces Digital I/O Analog I/O 3.3v & 5v supply Simple programming interface

Arduino Uno

Interfaces Analog Digital Read varying voltage, convert to number (0-1023) Light, temperature, distance Pins A0-A5 Digital Read on/off state or provide power on/off Pushbutton, LED, buzzer Pulse Width Modulation/PWM (pseudo-varying voltage) Pins D0-D13

Arduino Integrated Development Environment Tools to write, compile and execute sketches (programs) Code is in C language (mostly) Opening sketch provides default setup and loop functions

Three sections to code Global variables (constants) void setup( ) Before the void setup( ) Define values used throughout program void setup( ) Initialization steps – set pin modes Executes once at start of program Set initial state of devices, if needed void loop( ) Main program execution Continually repeats

Initial Sketch Code void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly:

C Statements End with semicolon (except branching/loop statements) Case sensitive Curly braces { } mark blocks of code branches, loops, etc.

Data Types int – integer, whole number: 1 2 9999 -876 float – floating point, real number 1.234 -0.0003456 double if you need greater precision than 7 digits char – character, a single letter, digit, punctuation Enclosed in single quotes: ‘a’ ‘1’ ‘#’

Variables Names of memory spaces Assign and modify values stored Declare before use int total; float average;

Sample Program – Blink LED int led = 10; void setup() { pinMode( led, OUTPUT ); } void loop() { //turn LED on and off for off half second digitalWrite( led, HIGH ); delay( 500 ); digitalWrite( led, LOW );

Included Examples C:\Program Files (x86)\Arduino\examples