physical computing .2 – Day 3

Slides:



Advertisements
Similar presentations
Wireless Cue Light Project
Advertisements

Panasonic EVE-KC2F2024B 24 pulses per revolution 6mm diameter flattened output shaft output type: quadrature (incremental) minimum life: 15,000 rotations.
Re-programming the Simon Says with Arduino Linz Craig, Brian Huang.
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.
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.
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Franz Duran INTRODUCTION TO A RDUINO PROGRAMMING & INTERFACING Engr. Franz Duran, MEP-ECE RapidSignal Electronics.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Good LED Circuit 5V0 GND. What Voltage Does Meter See? Answer: 5 V.
Programming, Serial and Virtual Prototyping. Code if ( You like semicolons ) { Stay here for intro to Arduino code } else { Join the MODKit group for.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
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.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
Final Term Project Hi-Tek Smoke Detektor By: Rohan Sharma.
Microcontroller basics Embedded systems for mortals.
Microcontroller basics Embedded systems for mortals.
Lecture 9: Introduction to Arduino Topics: Arduino Fundamentals, Bean Date: Mar 22, 2016.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
:Blink Blink: Er. Sahil Khanna
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Pulse-Width Modulation: Simulating variable DC output
Session 6 John Wolf (WolfDenElectronics.com). Objectives – We’ll Learn  Code to Voice  PIR sensors – motion detection  Quadrature Encoders  Audio.
Ultrasonic Sensor TYWu.
Pulse Width Modulation Instructor Dr Matthew Khi 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.
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
Hacking on Arduino George Patterson
Harpeth Hall Jan 2016 Introduction to Arduino Prepared for Harpeth Hall Winterim January 2016.
Having fun with code, using Arduino in a middle school CS classroom
Assist. Prof. Rassim Suliyev - SDU 2017
Microcontroller basics
Microcontroller basics
Manual for Arduino Kit v1.0
Wireless Cue Light Project
Microcontroller basics
Get Your Project Started with Arduino
European Robotic LABoratory
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
Arduino Part 1 Topics: Microcontrollers Programming Basics
3.0 ARDUINO WORKSHOP PRESENTATION FOR STUDENTS IN 4º DEGREE OF COMPULSORY SECONDARY EDUCATION 3.0.
Въведение в Arduino.
Introduction to Arduino Microcontrollers
Topics: Analog/Digital Read Relay control 7 segment control Buzzer
Roller Coaster Design Project
Arduino Analog I/O Analog input pins: 0 – 5
Continuing with LED’s and Arduino
IoT Programming the Particle Photon.
Programming, Serial and Virtual Prototyping
CS-4540 Robotics - Lab 05 Switch inputs to the Arduino Uno
Welcome to Digital Electronics using the Arduino Board
CS4101 Introduction to Embedded Systems Lab 8: Arduino DAC and PWM
Arduino Board.
Last of the LED’s and Arduino
Chapter 1 Introduction of Arduino
Programming 2: The Arduino IDE & First Sketches
Arduino Practice: Photoresistors, PWM, Potentiometers, Motors
Aeroponic Engineering and Vertical Farming
Setting up a basic program with Arduino
SAURABH GINGADE.
Introduction to arduino
Arduino程式範例.
Pulse-Width Modulation: Simulating variable DC output
Presentation transcript:

physical computing .2 – Day 3 NCTU Taiwan playaround workshop microplayground 2008 kiilo ||| dusjagr Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 overview Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 Overview – Day 3 Analog Inputs - Arduino read sensors Hack Toys open it hack the clock Control Toys with Arduino control motors control recording unit send simple messages to computer and from computer Open Experiments and Help with Projects Playaround Workshop, TW08 - Physical Computing .2

How to connect things – 2 different ways Pd_firmware.pde Power & cables usb in/out Pduino-0.3.1/arduino-help.pd Blink.pde Change and upload new code Power & cables usb power in/out battery power Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 let's start ! Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 Analog In – 1-Bit Music http://playaround.ftpaccess.cc/project/physical+computing+2/outline/3.day _1bitmusic.pde /* * AnalogInput * * 1-bit music * attach a speaker to pin 7 and GND * dusjagr 2008 */ int ldrPin = 1; // select the input pin for the potentiometer int speakerPin = 7; // select the pin for the speaker int val = 0; // variable to store the value coming from the sensor void setup() { pinMode(speakerPin, OUTPUT); // declare the speakerPin as an OUTPUT Serial.begin(9800); } void loop() { val = analogRead(ldrPin); // read the value from the sensor and shift 4 bits down 0-63 Serial.println (val); // send serial value to computer digitalWrite(speakerPin, HIGH); // turn the speakerPin on delayMicroseconds(val); // stop the program for some time digitalWrite(speakerPin, LOW); // turn the speakerPin off Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 1-Bit Music Tristan Perich www.1bitmusic.com Fredrik Oloffson arduino workshop @ clubtransmediale www.fredrikolofsson.com or for some advanced chiptunes on microcontrollers www.linusakesson.net Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 Other Sensors Playaround Workshop, TW08 - Physical Computing .2

What to do with sensor data? Send data to pd Use sensor data to control toy read sensor value < or > Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 let's hack some Toys Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 Control Motors Playaround Workshop, TW08 - Physical Computing .2

Control Recording Unit http://playaround.ftpaccess.cc/project/physical+computing+2/outline/3.day recorder.pde Playaround Workshop, TW08 - Physical Computing .2

Playaround Workshop, TW08 - Physical Computing .2 Digital In GND VCC /* * Button * by DojoDave <http://www.0j0.org> * * Turns on and off a light emitting diode(LED) connected to digital * pin 13, when pressing a pushbutton attached to pin 7. * http://www.arduino.cc/en/Tutorial/Button */ int ledPin = 13; // choose the pin for the LED int inputPin = 2; // choose the input pin (for a pushbutton) int val = 0; // variable for reading the pin status void setup() { pinMode(ledPin, OUTPUT); // declare LED as output pinMode(inputPin, INPUT); // declare pushbutton as input } void loop(){ val = digitalRead(inputPin); // read input value if (val == HIGH) { // check if the input is HIGH digitalWrite(ledPin, LOW); // turn LED OFF } else { digitalWrite(ledPin, HIGH); // turn LED ON Playaround Workshop, TW08 - Physical Computing .2

playaround fileserver username: play password: around http://playaround.ftpaccess.cc/ Playaround Workshop, TW08 - Physical Computing .2