유비쿼터스 컴퓨팅 및 실습 Final Report I Pig 2조 08 정성혁 08 변상규 08 최종민 08 이희성

Slides:



Advertisements
Similar presentations
ARDUINO FRAMEWORK.
Advertisements

Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
Control of salinity living with the lab © 2012 David Hall.
Panasonic EVE-KC2F2024B 24 pulses per revolution 6mm diameter flattened output shaft output type: quadrature (incremental) minimum life: 15,000 rotations.
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Calibration of conductivity sensors living with the lab.
CONNECT TO THE CLOUD IOT Course Vijay Janapa Reddi Intel (UT Austin)
Beginning Arduino Session 2 AN INTRODUCTION TO HACKING THE WORLD’S MOST POPULAR MICROCONTROLLER PLATFORM
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.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
Basic Circuits – Lab 2 Arduino and Sensors Xmedia Spring 2011.
Autumn, 2013C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Display Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic Engineering.
Basic Circuits – Lab 2 Arduino and Sensors
Tele-presence – Connecting Two Processing Platforms via Internet Controlling the Screen based on Distant User Input ServerClient 1.
2.0 EMBEDDED CONTROLLER Engr. Hj. Mohamad Fauzi bin Zakaria Department of Mechatronics and Robotics Engineering Faculty of Electrical and Electronic Engineering.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Sensor Network Data Collection and Storage Chuck Bell, Sr. Software Developer, MySQL.
Autumn, 2014C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Digital Input/Output Chin-Shiuh Shieh ( 謝欽旭 ) Department of.
Youn-Hee Han, Chan-Myung Kim {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi. Objectives 1. Control the rotation of standard servo motor  A standard servo motor is limited in its rotation.
Introduction to Sensor Technology Week Five Adam Taylor
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Programming, Serial and Virtual Prototyping. Code if ( You like semicolons ) { Stay here for intro to Arduino code } else { Join the MODKit group for.
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,
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Ubiquitous Computing Practice ( Humidity Sensor ) Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced.
Using for loops to control LEDs living with the lab 1 1 arduino.cc the for statement allows us to repeat a block of commands a limited number of times.
Basic Circuits – Lab 5 Wireless Networking Xmedia Spring 2011.
Wireless TYWu. 433Mhz RF link kit Picture 433Mhz RF link kit Specification –Frequency: 433Mhz. –Receiver Data Output: High - 1/2 Vcc, Low - 0.7v –Transmitter.
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
Chap.6.3 UART.
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.
ME 120: Arduino Programming Arduino Programming Part II ME 120 Mechanical and Materials Engineering Portland State University
LAB1 TYWU. Devices Dip Switch (4 Switches) Triple Output LED (RGB) –Common Cathode.
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
ARDUINO 실습 과제 보 고서. PWM 은 아날로그 출력이라는 함수를 사용하게 되는데 이 출력에는 3, 5, 6, 9, 10, 11 번의 핀만 사용 가능. ( 숫자 옆 에 ~ 표시 )
Introduction to Programming the Arduino Dr Gaw 3/21/14.
Microcontroller basics
Pulse-Width Modulation: Simulating variable DC output
Ultrasonic Sensor TYWu.
Written by ZEDO MiniQ - 개요 DFRobot( 에서 MiniQ 2WD 기반에 Romeo V2 All-in-one 컨트롤러 사용하여 사 용자가 다양한 컨스터마이징 작업을 수행할 수 있도록 제공함
Pulse Width Modulation Instructor Dr Matthew Khi Yi Kyaw.
GPIO Liaison série Entrées analogiques PWM
Sparkfun Electronics ATtiny85 Arduino Quick Reference Sheet
Contents Overview AT-Command TCP Communication using AT Commands
Arduino Programming Part II
Microcontroller basics
Tele-presence – Connecting Two Processing Platforms via Internet
Callback TYWu.
European Robotic LABoratory
Lecture 2-2: Arduino Programming
Въведение в Arduino.
Control the color and brightness of an RGB LED with a Potentiometer
Introduction to Arduinos
Wireless Communication between Android Application and Sensors
Arduino Week 2 Lab ECE 1020 Prof. Ahmadi.
using for loops to control LEDs
Using Photoresistors with an Arduino
Arduino: For Loops.
LED LIGHT USING SOUND SENSOR & LIGHT SENSOR
Programming 2: The Arduino IDE & First Sketches
Assist. Prof. Rassim Suliyev - SDU 2018
Communication Protocols
GPIO Liaison série Entrées analogiques PWM
Arduino程式範例.
Pulse-Width Modulation: Simulating variable DC output
Presentation transcript:

유비쿼터스 컴퓨팅 및 실습 Final Report I Pig 2조 08 정성혁 08 변상규 08 최종민 08 이희성 09 고현경

01. 과제명 02. 과제개요 03. Arduino 적재 프로그램 코드 04. 데이터 관리 및 Viewer Contents 목차 01. 과제명 02. 과제개요 03. Arduino 적재 프로그램 코드 04. 데이터 관리 및 Viewer 05. 개발 산출물 메뉴얼 06. 개발 기간 및 일정 07. 업무분담 Koreatech Ubiquitous Computing Practice 2

I Pig(Intelligent Pig) 과 제 명 One I Pig(Intelligent Pig) intelligent Computing Practice Koreatech Ubiquitous Computing Practice 3

과제개요(1) SNS 저금통 Intelligent 저금통 Sensor two Koreatech Ubiquitous Computing Practice 4

과제개요(2) two 100 500 Koreatech Ubiquitous Computing Practice 5 ● 동전구분 ● 눈에 led ● 저금통 문 열리기 ● 꼬리 흔들기 ● 저금통 진동 Koreatech Ubiquitous Computing Practice 5

프로그램 코드 three Koreatech Ubiquitous Computing Practice 6 프로그램 코드 #include <SPI.h> #include <WiFi.h> #include <EEPROM.h> #define CYCLE_MINUTE 1 #define SUM_ADDRESS 10 char ssid[] = "JJangLab"; char key[] = "emsysjang"; char token[] = "1522334322-kEW8L7zXKiraIYNuhIIgSK7hm2wWe441yeOWJSA"; char server_adr[] = "arduino-tweet.appspot.com"; unsigned long time = 0; unsigned long m = 60000; int status = WL_IDLE_STATUS; WiFiClient twtclient; String txt =""; int sumcoin=0; int coin=0; int flag=0; int pin1=0; int pin2=1; int pin3=2; int pin4=4; int pin5=7; int pin6=8;//tailmoto int pin9 =9; int pin10=10; 프로그램 코드 Koreatech Ubiquitous Computing Practice 6

프로그램 코드 three Koreatech Ubiquitous Computing Practice 7 프로그램 코드 int incoin=0; int timecount=0; int beak=0, oship=0, obeak=0; int coinflag=0; void checktime(); void insertcoin(); void spinTail(); void destroymode(); void sparkEyes(); void setup(void){ Serial.begin(9600); pinMode(pin4,OUTPUT); pinMode(pin5,OUTPUT); pinMode(pin6,OUTPUT); pinMode(pin9,OUTPUT); pinMode(pin10,OUTPUT); digitalWrite(4,LOW); digitalWrite(7,LOW); analogWrite(9,10); analogWrite(10,10); while (!Serial) { } if (WiFi.status() == WL_NO_SHIELD) { Serial.println("WiFi shield not present"); while(true); 프로그램 코드 Koreatech Ubiquitous Computing Practice 7

프로그램 코드 three Koreatech Ubiquitous Computing Practice 8 프로그램 코드 void loop(){ checktime(); Serial.print(timecount); Serial.print(" "); Serial.print(incoin); Serial.println(""); if(timecount>=2000 && incoin==0){ destroymode(); } insertcoin(); void checktime(){ timecount++; delay(1); void sparkEyes(){ int value = random(100,300); for(int i=0;i<4;i++){ analogWrite(9,255); delay(value); analogWrite(9,10); analogWrite(10,255); analogWrite(10,10); delay(100); 프로그램 코드 Koreatech Ubiquitous Computing Practice 8

프로그램 코드 three Koreatech Ubiquitous Computing Practice 9 프로그램 코드 void insertcoin(){ String temptxt; int read1 = analogRead(pin1); int read2 = analogRead(pin2); int read3 = analogRead(pin3); if(read1<200 && coinflag == 0){ coinflag = 1; Serial.println("50won input"); oship = 1; incoin = 1; timecount=0; coin +=50; spinTail(); } if(read2<200 && coinflag == 0){ coinflag = 1; Serial.println("100won input"); beak=1; incoin = 1; timecount=0; coin +=100; spinTail();} if(read3<200 && coinflag == 0){ coinflag = 1; Serial.println("500won input"); obeak = 1; incoin = 1; timecount=0; coin +=500; spinTail();} if(incoin==1 && timecount>=1000){ //sumcoin=EEPROM.read(SUM_ADDRESS); sumcoin+=coin; //EEPROM.write(SUM_ADDRESS,sumcoin); temptxt=""; temptxt+=coin; temptxt+="W Deposited! Total balance:"; temptxt+=sumcoin; temptxt+="W"; postTwt(temptxt); incoin=0; timecount=0; coin=0; flag=0; } 프로그램 코드 Koreatech Ubiquitous Computing Practice 9

프로그램 코드 three Koreatech Ubiquitous Computing Practice 10 프로그램 코드 void spinTail(){ sparkEyes(); digitalWrite(pin6,HIGH); // spin tail delay(2000); digitalWrite(pin6,LOW);// stop spin tail oship = 0; beak = 0; obeak = 0; timecount=0; Serial.println(incoin); coinflag = 0; } void destroymode(){ txt = "I'm hungry give me coin!!!!!"; if(flag == 0){ postTwt(txt); flag = 1; int value = random(100,300); insertcoin(); if(!(incoin)){ digitalWrite(4,HIGH); delay(value); digitalWrite(4,LOW); digitalWrite(7,HIGH); digitalWrite(7,LOW); 프로그램 코드 Koreatech Ubiquitous Computing Practice 10

프로그램 코드 three Koreatech Ubiquitous Computing Practice 11 프로그램 코드 void printWifiStatus() { // print the SSID of the network you're attached to: Serial.print("SSID: "); Serial.println(WiFi.SSID()); // print your WiFi shield's IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); // print the received signal strength: long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.print(rssi); Serial.println(" dBm"); } void postTwt(String tweet) { Serial.print("tweet: "); Serial.println(tweet); if (twtclient.connect(server_adr, 80)) { Serial.println("connected"); twtclient.println("POST http://arduino-tweet.appspot.com/update HTTP/1.0"); twtclient.print("Content-Length: "); twtclient.println(tweet.length()+strlen(token)+14); twtclient.println(); twtclient.print("token="); twtclient.print(token); twtclient.print("&status="); twtclient.println(tweet); 프로그램 코드 Koreatech Ubiquitous Computing Practice 11

프로그램 코드 three Koreatech Ubiquitous Computing Practice 12 프로그램 코드 // if the server's disconnected, stop the twtclient: if (!twtclient.connected()) { Serial.println(); Serial.println("disconnecting from server."); twtclient.stop(); // do nothing forevermore: while(true); } Serial.println("twt finished"); 프로그램 코드 Koreatech Ubiquitous Computing Practice 12

Viewer four Koreatech Ubiquitous Computing Practice 13

Viewer four Koreatech Ubiquitous Computing Practice 14

Viewer four Koreatech Ubiquitous Computing Practice 15

개발 산출물 메뉴얼 five I Pig I’m hungry give me coin 설정 시간에 저금 하지 않음 Koreatech Ubiquitous Computing Practice 16

개발 산출물 메뉴얼 five 동전 입력 500 100 진동 중단 LED 켬 Koreatech Ubiquitous Computing Practice 17

개발 산출물 메뉴얼 five 적외선 Sensor 500 동전 입력 50 100 50 100 500 Koreatech Ubiquitous Computing Practice 18

개발 산출물 메뉴얼 five 동전 입력 완료 500 100 동전 판별 Koreatech Ubiquitous Computing Practice 19

개발 산출물 메뉴얼 five I Pig 100\ deposited Total money : 5200 \ 동전 입력 완료 Koreatech Ubiquitous Computing Practice 20

개발기간 및 일정 six Koreatech Ubiquitous Computing Practice 21 5월 3주차 5월 4주차 5월 5주차 6월 1주차 6월 2주차 아이디어 및 주제선정 회의 하드웨어 개발 SNS 관련 API 연구 소프트웨어 개발 저금통과 아두이노의 연결 수정 및 보수 최종 발표 준비 Koreatech Ubiquitous Computing Practice 21

업무분담 seven 상규 기존 Coretex 마이크로프로세서를 네트워크 기반 SNS를 이용하여 프로그래밍하였더니 신기하였다. 종민 기존의 마이크로프로세서를 이용하는 것보다 간단하게 하드웨어를 구성할 수 있다는 점이 흥미로웠다. 희성 새로운 하드웨어를 접해보고 거기에 기능들을 여러가지 구현해보는게 굉장히 재미있었다. 성혁 아두이노를 처음 만져 봐서 재밌었고 앞으로 취미로 이용학 싶다는 생각을 하였습니다.처음 목표했던 기능을 모두 구현하지 못해 많이 아쉬웠고.안식년 가시기 전에 좋은 수업 감사합니다.~~~ 현경 아두이노가 오픈소스하드웨어라곤 했지만 안드로이드처럼 많은 소스를 찾기 힘들었다. 아두이노를 공부해서 내가 만든 소스를 공유해야겠다. Koreatech Ubiquitous Computing Practice 22

Q & A Koreatech Ubiquitous Computing Practice 23 Koreatech Ubiquitous