sensor
This is an old revision of the document!
플렉스 센서
적외선 센서
캘리브레이션: 참고출처 http://luckylarry.co.uk/arduino-projects/arduino-using-a-sharp-ir-sensor-for-distance-calculation/
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. }
미션
GP2YOA02에 스펙에 맞추어 캘리브레이션 하기!
sensor.1318890023.txt.gz · Last modified: 2018/07/18 14:09 (external edit)