#include <Wire.h>
#include<Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include <Adafruit_NeoPixel.h>
Adafruit_SSD1306 display( 128, 64); // 128 pixels width, 64 pixels height
#define LED_PIN
#define LED_COUNT 1
Adafruit_NeoPixel neoPixel LED COUNT, LED PIN, NEO GRB + NEO_KHZ800);
const int mpuAddress = 0x68;
// 12C address of the MPU-6ese
float xByGyro, yByGyro, zByGyro;
// Global variables for the rotation
// Set the origin in the middle of the display
const int xorigin = 64;
const int yorigin 32;
const float viewDistance - 150.0; // higher for less perspective, lower
// Vertices for a cube
// A cube has 8 corners and each coordinate has x,y,z values.
#define NUM_VERTICES 8
const int cube_vertex[NUM_VERTICES][3] =
{-20,
-20, 20 ), // x, y, z
(20, -20, 28 },
(20,28,20 ),