mirror of
https://github.com/EFeru/hoverboard-sideboard-hack-STM.git
synced 2025-08-17 00:56:10 +00:00
Initial commit
This commit is contained in:
BIN
docs/1_MPU-6000-Datasheet.pdf
Normal file
BIN
docs/1_MPU-6000-Datasheet.pdf
Normal file
Binary file not shown.
BIN
docs/2_MPU-6000-Register-Map.pdf
Normal file
BIN
docs/2_MPU-6000-Register-Map.pdf
Normal file
Binary file not shown.
BIN
docs/3_MPU-6000-Motion-Driver6.12-Getting-Started.pdf
Normal file
BIN
docs/3_MPU-6000-Motion-Driver6.12-Getting-Started.pdf
Normal file
Binary file not shown.
BIN
docs/4_MPU-6000-Motion-Driver6.12-Features-Guide.pdf
Normal file
BIN
docs/4_MPU-6000-Motion-Driver6.12-Features-Guide.pdf
Normal file
Binary file not shown.
BIN
docs/5_MPU-6000-Motion-Driver6.12-Porting-Guide.pdf
Normal file
BIN
docs/5_MPU-6000-Motion-Driver6.12-Porting-Guide.pdf
Normal file
Binary file not shown.
BIN
docs/6_MPU-6000-HW-Offset-Registers1.2.pdf
Normal file
BIN
docs/6_MPU-6000-HW-Offset-Registers1.2.pdf
Normal file
Binary file not shown.
BIN
docs/7_MPU-6000-Orientation-Matrix-Transformation-chart.pdf
Normal file
BIN
docs/7_MPU-6000-Orientation-Matrix-Transformation-chart.pdf
Normal file
Binary file not shown.
BIN
docs/motion_driver_6.12.zip
Normal file
BIN
docs/motion_driver_6.12.zip
Normal file
Binary file not shown.
BIN
docs/pictures/MCU_pinout.png
Normal file
BIN
docs/pictures/MCU_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
docs/pictures/MPU6050_pinout.png
Normal file
BIN
docs/pictures/MPU6050_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
BIN
docs/pictures/STM_pics.pptx
Normal file
BIN
docs/pictures/STM_pics.pptx
Normal file
Binary file not shown.
BIN
docs/pictures/back.png
Normal file
BIN
docs/pictures/back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 MiB |
BIN
docs/pictures/front.png
Normal file
BIN
docs/pictures/front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.0 MiB |
BIN
docs/pictures/sideboard_pinout.png
Normal file
BIN
docs/pictures/sideboard_pinout.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
BIN
docs/pictures/sketch_processing_pic.png
Normal file
BIN
docs/pictures/sketch_processing_pic.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
82
docs/sketch_processing/sketch_processing.pde
Normal file
82
docs/sketch_processing/sketch_processing.pde
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
hoverboard-sidebboard-hack MPU6050 IMU - 3D Visualization Example
|
||||
Copyright (C) 2020-2021 Emanuel FERU
|
||||
*/
|
||||
import processing.serial.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.io.IOException;
|
||||
|
||||
Serial myPort;
|
||||
float roll, pitch,yaw;
|
||||
int idx = 0;
|
||||
int inBytePrev;
|
||||
short bufWord;
|
||||
|
||||
void setup() {
|
||||
size (1400, 800, P3D);
|
||||
printArray(Serial.list()); // List all the available serial ports
|
||||
myPort = new Serial(this, "COM5", 38400); // starts the serial communication
|
||||
|
||||
}
|
||||
|
||||
void draw() {
|
||||
|
||||
while (myPort.available() > 0) {
|
||||
int inByte = myPort.read();
|
||||
bufWord = (short)(inBytePrev | (inByte << 8));
|
||||
idx++;
|
||||
if(bufWord == -21846) { // check START_FRAME = 0xAAAA
|
||||
idx = 0;
|
||||
}
|
||||
if (idx == 2) {
|
||||
roll = float(bufWord) / 100;
|
||||
}
|
||||
if (idx == 4) {
|
||||
pitch = float(bufWord) / 100;
|
||||
}
|
||||
if (idx == 6) {
|
||||
yaw = float(bufWord) / 100;
|
||||
}
|
||||
inBytePrev = inByte;
|
||||
}
|
||||
|
||||
// println(bufWord); //<>//
|
||||
|
||||
translate(width/2, height/2, 0);
|
||||
background(51);
|
||||
textSize(22);
|
||||
text("Roll: " + roll + " Pitch: " + pitch + " Yaw: " + yaw, -200, 300);
|
||||
|
||||
// Rotate the object
|
||||
rotateX(radians(roll));
|
||||
rotateZ(radians(-pitch));
|
||||
rotateY(radians(yaw));
|
||||
|
||||
// 3D 0bject
|
||||
|
||||
// Draw box with text
|
||||
fill(0, 76, 153);; // Make board BLUE
|
||||
box (426, 30, 220);
|
||||
textSize(25);
|
||||
fill(255, 255, 255);
|
||||
text("MPU-6050 DMP DEMO", -150, 10, 111);
|
||||
|
||||
// Add other boxes
|
||||
translate(-70, -18, -30);
|
||||
fill(100, 100, 100);
|
||||
box (20, 5, 20); // MPU-6050
|
||||
|
||||
translate(70, 0, 0);
|
||||
box (40, 5, 40); // GD32
|
||||
|
||||
translate(0, 0, -70);
|
||||
fill(255, 255, 255);
|
||||
box (50, 40, 15); // USART Main
|
||||
|
||||
translate(0, 0, 200);
|
||||
box (50, 40, 15); // Color Led connector
|
||||
|
||||
translate(-60, 0, 0);
|
||||
box (40, 40, 15); // Blue Led connector
|
||||
|
||||
}
|
BIN
docs/stm32f103c8-Datasheet.pdf
Normal file
BIN
docs/stm32f103c8-Datasheet.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user