User Tools

Site Tools


sensor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sensor [2011/10/17 22:10] 61.74.205.7sensor [2018/07/18 14:10] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== 스위치 ======
 +
 +디지털 4번에 pull up으로 버튼연결
 +
 +<code c>
 +int buttonPin = 4;
 +int ledPin = 13;
 +boolean value;
 +
 +void setup() {
 +  pinMode(buttonPin, INPUT);
 +  pinMode(ledPin, OUTPUT);      
 +}
 +
 +void loop() {
 +  value = digitalRead(buttonPin);
 +  if (value == HIGH) {
 +    digitalWrite(ledPin, HIGH);
 +  } else {
 +    digitalWrite(ledPin, LOW);
 +  }
 +}
 +</code>
 +
 +
 +====== CdS =====
 +
 +{{ http://i.imgur.com/MWuax.png }}
 +{{http://i.imgur.com/kedj4.png?500}}
 +
 +  * http://learn.adafruit.com/photocells/example-projects
 +  * http://www.adafruit.com/blog/2009/05/19/piezo-with-an-arduino-photoresistor/
 ====== 플렉스 센서 ====== ====== 플렉스 센서 ======
 FLEX-01 FLEX-01
Line 4: Line 36:
 {{ :bend.jpg?400 |}} {{ :bend.jpg?400 |}}
 {{ :flexs.gif?400 |}} {{ :flexs.gif?400 |}}
 +====== 온도 센서 ======
 +LM35
 +
 +http://www.national.com/ds/LM/LM35.pdf
 +
 +adafruit
 +http://www.ladyada.net/learn/sensors/tmp36.html
 +
 +캘리브레이션: http://www.arduino.cc/playground/Main/LM35HigherResolution
  
 ====== 적외선 센서 ====== ====== 적외선 센서 ======
 {{ http://luckylarry.co.uk/wp-content/uploads/2009/11/Sharp-GP2Y0A02-circuit.png?300 |}} {{ http://luckylarry.co.uk/wp-content/uploads/2009/11/Sharp-GP2Y0A02-circuit.png?300 |}}
 +{{ :ss_kn8n3t.png?300 |}}
 {{ http://u-shopping.net/data/cheditor/1107/024.gif?300 |}} {{ http://u-shopping.net/data/cheditor/1107/024.gif?300 |}}
 +
 +캘리브레이션: 참고출처 
 +http://luckylarry.co.uk/arduino-projects/arduino-using-a-sharp-ir-sensor-for-distance-calculation/
 +
 +<code c>
 +int IRpin = 1;                                    // analog pin for reading the IR sensor
 +void setup() {
 +  Serial.begin(9600);                             // start the serial port
 +}
 +void loop() {
 +  float volts = analogRead(IRpin)*0.0048828125;   // value from sensor * (5/1024) - if running 3.3.volts then change 5 to 3.3
 +  float distance = 65*pow(volts, -1.10);          // worked out from graph 65 = theretical distance / (1/Volts)S - luckylarry.co.uk
 +  Serial.println(distance);                       // print the distance
 +  delay(100);                                     // arbitary wait time.
 +}
 +</code>
 +
 +===== 미션 =====
 +GP2YOA02에 스펙에 맞추어 캘리브레이션 하기!
sensor.1318889443.txt.gz · Last modified: 2018/07/18 14:09 (external edit)