Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Sensors I Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.

Slides:



Advertisements
Similar presentations
Autumn 2012C.-S. Shieh, EC, KUAS, Taiwan1 The 8051 Family Microcontroller Chin-Shiuh Shieh Department of Electronic Engineering.
Advertisements

Digital & Analog Inputs. Review Fundamental parts of an Arduino program are … Setting output types using pinMode. Declaring variables Can write a digital.
Introduction to Sensor Technology Week Three Adam Taylor
PING))) Ultrasonic Distance Sensor living with the lab ultrasonic pressure waves from PING))) speaker The PING))) sensor emits short bursts of sound and.
IR Object Detection living with the lab IR light from LED IR light reflected off object IR LED IR receiver Infrared (IR) light leaving an LED reflects.
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Communication - Serial Chin-Shiuh Shieh ( 謝欽旭 ) Department.
1 Ultrasonic Distance Sensor. 2 How it Works The distance sensor emits short bursts of sound and listens for this sound to echo off of nearby objects.
PROGRAMMING WITH ARDUINO. Arduino An open-source hardware platform based on an Atmel AVR 8-bit microcontroller and a C++ based IDE Over boards.
Arduino web site: What is Arduino? Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and.
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Display Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Audio Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
chipKit Sense Switch & Control LED
Sensors Material taken from Robotics with the Boe-Bot.
Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Sensors III Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.
Sensor Technology Dr. Konstantinos Tatas. Outline Introduction Sensor requirements Sensor Technology Selecting a sensor Interfacing with sensors Integrated.
PING))) Ultrasonic Distance Sensor living with the lab ultrasonic pressure waves from PING))) speaker The PING))) sensor emits short bursts of sound and.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Digital Input/Output Chin-Shiuh Shieh ( 謝欽旭 ) Department of.
Practical Electronics & Programming
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Analog Input/Output Chin-Shiuh Shieh ( 謝欽旭 ) Department of.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Programming Language Chin-Shiuh Shieh ( 謝欽旭 ) Department.
Pulse Width Modulation (PWM). 100% Pulse Width Modulation (PWM) 0% On the chipKIT there are 490 periods per second. Use analogWrite(pin, value) to control.
Material taken from Robotics with the Boe-Bot
Good LED Circuit 5V0 GND. What Voltage Does Meter See? Answer: 5 V.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Development Environment Chin-Shiuh Shieh ( 謝欽旭 ) Department.
智慧電子應用設計導論(1/3) Arduino MEGA 2560
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Arduino Circuits and Code. int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin,
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Actuator Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.
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.
PROGRAMMING WITH ARDUINO. Arduino An open-source hardware platform based on an Atmel AVR 8-bit microcontroller and a C++ based IDE Over boards.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Communication - Serial Chin-Shiuh Shieh ( 謝欽旭 ) Department.
Motor TYWu.
Temperature Sensor TYWu. Seeed’s Temperature Sensor Picture.
INTERNET OF EVERYTHING SDU 2016 Week 6. Getting Input from Sensors  Sensors give report on the world around it  Sensors convert physical input an electrical.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Microcontroller basics Embedded systems for mortals.
IR Object Detection living with the lab IR light from LED IR light reflected off object IR LED IR receiver Infrared (IR) light leaving an LED reflects.
Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Arduino Development Environment Chin-Shiuh Shieh ( 謝欽旭 ) Department.
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
김희승 임승한 IT 인재 양성 Arduino Programming OneScoreSung Han Lim.
Ultrasonic Sensor TYWu.
Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw.
ME 120: Arduino PWM Breathing LED Code: Implementation on Arduino ME 120 Mechanical and Materials Engineering Portland State University
Pulse Width Modulation Instructor Dr Matthew Khi Yi Kyaw.
DC Motor – H bridge L293D ile Kontrolü /* Adafruit Arduino - Lesson 15. Bi-directional Motor */ int enablePin = 11; int in1Pin = 10; int in2Pin = 9; int.
SCIENCE INQUIRY SOUND, LIGHT AND ELECTRICAL ENERGY.
physical computing .2 – Day 3
Get Your Project Started with Arduino
A3144 SENSITIVE HALL-EFFECT SWITCHES & AH Linear Hall sensor
Using Arduinos to Teach Engineering Concepts
Assist. Prof. Rassim Suliyev - SDU 2017
智慧電子應用設計導論(1/3) Introduction
Sensors with Arduino A Microcontroller.
Get Your Project Started with Arduino
Ultrasonic Distance Sensor
Arduino motor control using servo & ultrasonic sensor
Arduino Uno and sensors
Maxbotix Ultrasonic Distance Sensor
IoT Programming the Particle Photon.
What is Arduino? By James Tedder.
Ultrasonic Distance Sensor
Servos and Stepper Motors
CS-4540 Robotics - Lab 05 Switch inputs to the Arduino Uno
CS4101 Introduction to Embedded Systems Lab 8: Arduino DAC and PWM
Programming 2: The Arduino IDE & First Sketches
智慧電子應用設計導論(1/3) Arduino
Arduino Programming: “if” statements
Ultrasonic Distance Sensor
Presentation transcript:

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Sensors I Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering National Kaohsiung University of Applied Sciences, Taiwan

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan2 Light

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan3 Light (cont) void setup() { Serial.begin(9600); } void loop() { int sensorReading = analogRead(A0); Serial.println(sensorReading); int thisPitch = map(sensorReading, 400, 1000, 120, 1500); tone(2, thisPitch, 10); delay(10); }

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan4 Pressure

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan5 Pressure (count) void setup() { Serial.begin(9600); } void loop() { int sensorReading = analogRead(A0); Serial.println(sensorReading); int thisPitch = map(sensorReading, 0, 800, 120, 1500); tone(2, thisPitch, 10); delay(1); }

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan6 PIR

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan7 PIR (cont) int ledPin = 13; int switchPin = 2; int value = 0; void setup() { pinMode(ledPin, OUTPUT); pinMode(switchPin, INPUT); } void loop() { value = digitalRead(switchPin); if (HIGH == value) { digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); }

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan8 PING )))

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan9 PING ))) (cont) const int pingPin = 2; void setup() { Serial.begin(9600); } void loop() { long duration, inches, cm; pinMode(pingPin, OUTPUT);digitalWrite(pingPin, LOW); delayMicroseconds(2);digitalWrite(pingPin, HIGH); delayMicroseconds(5);digitalWrite(pingPin, LOW); pinMode(pingPin, INPUT);duration = pulseIn(pingPin, HIGH); cm = microsecondsToCentimeters(duration); Serial.print(cm);Serial.print("cm");Serial.println(); delay(100); }

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan10 PING ))) (cont) long microsecondsToCentimeters(long microseconds) { // The speed of sound is 340 m/s or 29 microseconds per centimeter. // The ping travels out and back, so to find the distance of the // object we take half of the distance travelled. return microseconds / 29 / 2; }

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan11 Temperature Wirehttp:// Wire

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan12 Loudness

Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan13 Loudness (cont) void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(A0)); delay(500); }