wire.begin

This commit is contained in:
Thefeli73 2021-04-13 21:51:43 +02:00
parent 3eaf27d29e
commit 7b49d8974c
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#include <Wire.h>
//temporary variable to measure main loops //temporary variable to measure main loops
int temp_loops; int temp_loops;
@ -60,6 +62,7 @@ unsigned long timeoldA;
unsigned long timeoldB; unsigned long timeoldB;
void setup() { void setup() {
Wire.begin();
Serial.begin(115200); Serial.begin(115200);
while (!Serial) while (!Serial)
delay(10); // will pause Zero, Leonardo, etc until serial console opens delay(10); // will pause Zero, Leonardo, etc until serial console opens

View File

@ -1,7 +1,6 @@
//gyroscope stuff //gyroscope stuff
#include <Adafruit_MPU6050.h> #include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h> #include <Adafruit_Sensor.h>
#include <Wire.h>
Adafruit_MPU6050 mpu; Adafruit_MPU6050 mpu;