GY-50 L3G4200D axis digital gyroscope sensor module angular velocity module
- High quality Immersion Gold pcb, machine welding process, quality assurance
- Name the: L3G4200D modules (three-axis gyroscope module)
- Using the chip: L3G4200D
- Power supply :3-5v
- Means of communication: IIC / SPI communication protocol
- Measuring range: 250/500/2000 dps
วิธีการต่อใช้งาน GY-50 L3G4200D
Arduino uno r3 -> เซ็นเซอร์ GY-50 L3G4200D • 5V -> VCC • GND -> GND • ขา A4 -> SCL • ขา A5 -> SDAโหลด Library
4
Read more: http://www.jarzebski.pl/arduino/czujniki-i-sensory/3-osiowy-zyroskop-l3g4200d.html
6
Web: http://www.jarzebski.pl
7
(c) 2014 by Korneliusz Jarzebski
21
// Initialize L3G4200D
22
// 250 dps: L3G4200D_250DPS
23
// 500 dps: L3G4200D_500DPS
24
// 2000 dps: L3G4200D_2000DPS
25
if (gyroscope.begin(L3G4200D_2000DPS))
27
// Calibrate gyroscope. The calibration must be at rest.
28
// If you don't want calibrate, comment this line.
29
gyroscope.calibrate();
31
// Set threshold sensivty. Default 3.
32
// If you don't want use threshold, comment this line or set 0.
33
gyroscope.setThreshold(3);
39
// Read normalized values
40
GyroscopeRaw raw = gyroscope.readRaw();
42
// Read normalized values
43
GyroscopeNormalize norm = gyroscope.readNormalize();
46
Serial.print(" Xraw = ");
47
Serial.print(raw.XAxis);
48
Serial.print(" Yraw = ");
49
Serial.print(raw.XAxis);
50
Serial.print(" Zraw = ");
51
Serial.print(raw.YAxis);
54
Serial.print(" Xnorm = ");
55
Serial.print(norm.XAxis);
56
Serial.print(" Ynorm = ");
57
Serial.print(norm.YAxis);
58
Serial.print(" ZNorm = ");
59
Serial.print(norm.ZAxis);