class and script creation
This commit is contained in:
24
code/arduino/Movement-sensor-code/Movement-sensor-code.ino
Normal file
24
code/arduino/Movement-sensor-code/Movement-sensor-code.ino
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "SensorManager.h"
|
||||
|
||||
SensorManager sensorManager;
|
||||
|
||||
void setup() {
|
||||
Wire.setClockStretchLimit(150000L); // Default stretch limit 150mS
|
||||
Serial.begin(9600);
|
||||
Serial.println("startup");
|
||||
delay(10000);
|
||||
sensorManager.sensorSetup();
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
SensorManager::Rotation rotation = sensorManager.readLoop();
|
||||
|
||||
Serial.print(rotation.x);
|
||||
Serial.print(" ");
|
||||
Serial.print(rotation.y);
|
||||
Serial.print(" ");
|
||||
Serial.print(rotation.z);
|
||||
|
||||
Serial.println();
|
||||
}
|
Reference in New Issue
Block a user