자이로센서를 활용한 졸음 방지 모자 개발
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

자이로센서를 활용한 졸음 방지 모자 개발에 대한 보고서 자료입니다.

본문내용

0 || predistance>=3000)){
tone(7,600);
delay(10);
}
else{
noTone(7);
}
}
else{
noTone(7);
}
}
void initSensor() {
Wire.begin();
Wire.beginTransmission(MPU_ADDR);
Wire.write(0x6B);
Wire.write(0);
Wire.endTransmission(true);
}
void getData() {
Wire.beginTransmission(MPU_ADDR);
Wire.write(0x3B);
Wire.endTransmission(false);
Wire.requestFrom(MPU_ADDR, 14, true);
AcX = Wire.read() << 8 | Wire.read();
AcY = Wire.read() << 8 | Wire.read();
AcZ = Wire.read() << 8 | Wire.read();
Tmp = Wire.read() << 8 | Wire.read();
GyX = Wire.read() << 8 | Wire.read();
GyY = Wire.read() << 8 | Wire.read();
GyZ = Wire.read() << 8 | Wire.read();
}
void getDT() {
now = millis();
dt = (now - past) / 1000.0;
past = now;
}
void calibrateSensor() {
double sumAcX = 0, sumAcY = 0, sumAcZ = 0;
double sumGyX = 0, sumGyY = 0, sumGyZ = 0;
getData();
for (int i = 0; i < 10 ; i++) {
getData();
sumAcX += AcX; sumAcY += AcY; sumAcZ += AcZ;
sumGyX += GyX; sumGyY += GyY; sumGyZ += GyZ;
delay(100);
}
baseAcX = sumAcX / 10;
baseAcY = sumAcY / 10;
baseAcZ = sumAcZ / 10;
baseGyX = sumGyX / 10;
baseGyY = sumGyY / 10;
baseGyZ = sumGyZ / 10;
}
void bbibbi() {
int piezo = 7;
pinMode(piezo, OUTPUT);
tone(piezo, 659);
delay(100);
}
  • 가격1,000
  • 페이지수6페이지
  • 등록일2021.11.22
  • 저작시기2021.5
  • 파일형식한글(hwp)
  • 자료번호#1158918
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니