Introduction to Physical Computing

Slides:



Advertisements
Similar presentations
Re-programming the Simon Says with Arduino Linz Craig, Brian Huang.
Advertisements

Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Intro to Programming and Microcontrollers. Activity Group into pairs and sit back-to-back. Pick one person who is going to draw. The other person will.
Arduino. Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source.
How to Build a Digital-Physical System-Lab Assegid Kidané Fall 2014.
IR SENSORS AND ENCODERS. LCDs Timothy Friez Class # 2.
Finish your programs from last week STOPLIGHT CIRCUIT! You may need … – int – void setup() – void loop() – pinMode – digitalWrite – delay.
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.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
chipKit Sense Switch & Control LED
Microcontroller Hands-on Workshop #3 Ahmad Manshad New Mexico State University Institute of Electrical and Electronics Engineers November 7, 2009.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Good LED Circuit 5V0 GND. What Voltage Does Meter See? Answer: 5 V.
LECTURE 2 – INPUTS THIS LECTURE WILL INTRODUCE HOW TO INPUT SIGNALS INTO AN ARDUINO.
Code The Arduino Environment.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Microcontroller basics Embedded systems for mortals.
Week 5: Microcontrollers & Flow Control Bryan Burlingame 2 March 2016.
Microcontroller basics Embedded systems for mortals.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Controlling an LED with a switch. 2 breadboard place where you can build electric circuits really quickly the magical breadboard.
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
The Internet of Things: Using the Arduino to Teach Coding
Having fun with code, using Arduino in a middle school CS classroom
Arduino - Introduction
Getting Started: Building & Programming
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Assist. Prof. Rassim Suliyev - SDU 2017
Prototyping with Microcontrollers and Sensors
Microcontroller basics
Microcontroller basics
Wireless Cue Light Project
Microprocessors Tutorial 1: Arduino Basics
Microcontroller basics
UTA010 : Engineering Design – II
Welcome to Arduino A Microcontroller.
Get Your Project Started with Arduino
Arduino Development for Beginners
Liquid Crystal Display Arduino
UCD ElecSoc Robotics Club 2017/2018
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
3.0 ARDUINO WORKSHOP PRESENTATION FOR STUDENTS IN 4º DEGREE OF COMPULSORY SECONDARY EDUCATION 3.0.
Arduino - Introduction
How to avoid catching things on fire.
Electronic Education Kits
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.
Week 6: Microcontrollers II
IoT Programming the Particle Photon.
What is Arduino? By James Tedder.
Arduino 101 Credit(s):
Servos and Stepper Motors
1 Code
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
CS-4540 Robotics - Lab 05 Switch inputs to the Arduino Uno
Welcome to Digital Electronics using the Arduino Board
Introducing the Arduino Uno
Chapter 1 Introduction of Arduino
Programming 2: The Arduino IDE & First Sketches
Arduino Part 4 Let there be more light.
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino Motor Lab Inspired by NYU ITP project
CTY SAR FCPS Shawn Lupoli, Elliot Tan
Arduino Uno circuit basics
Setting up a basic program with Arduino
Interrupts.
Presentation transcript:

Introduction to Physical Computing Daniel Bandfield Rosie Munro Kerr

This session. Hello Inspiration Technologies Help Practical

Look to others for inspiration. There is some amazing work out there.

Rain Room. Random International. 2012

Petting Zoo.  Minimaforms.

Constellaction. Pan Generator. 2013

Sound Wall. Peter Vogel. 2009

Sandbox. Rafael Lozano-Hemmer. 2010

Momentum. United Visual Artists. 2014.

Very Nervous System. David Rokeby. 1982-1991.

Jller. FELD (Prokop Bartoníček   + Benjamin Maus). 2016

Les Grands Ensembles. Pierre Huyghes. 2001

Vera Molnar. (Dés)Ordres. 1974

Overview of Technologies Arduino Raspberry Pi Facial detection 2D graphical processing 3D graphical programming (Javascript/openframeworks) Atmospheric sensors, weather stations Object avoiding robots, motors and ultrasound. Audio electronics and sound Programming light Lcd display screens Networking - IOT / aether platform, radio communication, WiFi

What do you want to learn?

Help is all around you.

You don’t need to know everything or understand in order to make progress. Programming Arduino Instructables Google Stack Exchange Codecademy Lynda Learn**theHardWay Dash W3 schools Youtube Electonics/hardware support Youtube Instructables Google Adafruit Sparkfun

Arduinos and LEDs PARTS Arduino Uno Breadboard LED Resistor Wire

ARDUINO A micro-controller development board A tiny computer Reading sensors Controlling circuits

Light Emitting Diode Emits light when current passes through it An average red LED requires 2V at 20mA RGB LEDs, LED strips, IR LEDs, Ultrabright #

Resistor Reduce current and voltage to components Ohm’s Law I = V / R http://led.linear1.org/1led.wiz

A Variable int ledPin = 8; Type Name Assignment operator Literal Value

int ledState = LOW; Pre-defined Macro

Pins are the connections between a micro-controller and a circuit. Types include: Positive Voltage: 5V (or VCC or 3V3 or VDD or V+) Negative Voltage: GND (or VSS or V-) Digital Input / Output: 0 – 13 Analogue Input: A0 - A5

void setup() { } A Function Arguments Return Type Function name Opening and closing braces

pinMode(ledPin, OUTPUT); Built in function for setting up a “pin” Returns void Takes two arguments The pin number INPUT or OUTPUT

digitalWrite(ledPin, ledState); Built in function for outputting current Returns void Takes two arguments The pin number HIGH or LOW

void loop() { }

if(ledState == LOW) Conditional Statements if keyword operand 1 binary equality operator operand 2

{ ledState = HIGH; }

else { ledState = LOW; }

digitalWrite(ledPin, ledState);

Returns void. Takes one argument, an integer representing milliseconds Returns void. Takes one argument, an integer representing milliseconds. Stalls the program for that many milliseconds. delay(1000);

Let’s add a button

Pull-down resistors and Pull-up resistors

const int BUTTON_PIN = 7; More Code :) const int BUTTON_PIN = 7; constant identifier. The “variable” can not be changed. Style: all capitals, underscore as separator

bool currentState; bool previousState; Another primitive type with two possible values. True, or false. bool currentState; bool previousState;

pinMode(BUTTON_PIN, INPUT);

currentState = digitalRead(BUTTON_PIN); previousState = currentState;

currentState = digitalRead(BUTTON_PIN);

if(currentState == HIGH && currentState != previousState) { ledState = !ledState; digitalWrite(ledPin, ledState); } Equality “not equal” operator. Returns true if both operands are different. boolean “AND” operator. Returns true if both operands are true Unary negation operator. Returns true if the operand is false, and false if it is true.

Debounce delay(10);