Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bitluni committed Oct 21, 2018
0 parents commit e79cb15
Show file tree
Hide file tree
Showing 9 changed files with 494 additions and 0 deletions.
449 changes: 449 additions & 0 deletions DIYScooter/DIYScooter.ino

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions DIYScooter/MPU.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//genreic mpu implementations

#include <Wire.h>
const int MPU_addr = 0x68; // I2C address of the MPU-6050

//global gyro values
int16_t AcX, AcY, AcZ, Tmp, GyX, GyY, GyZ;

void initMPU()
{
Wire.begin();
Wire.beginTransmission(MPU_addr);
Wire.write(0x6B); // PWR_MGMT_1 register
Wire.write(0); // set to zero (wakes up the MPU-6050)
Wire.endTransmission(true);
}

void readMPU()
{
Wire.beginTransmission(MPU_addr);
Wire.write(0x3B); // starting with register 0x3B (ACCEL_XOUT_H)
Wire.endTransmission(false);
Wire.requestFrom(MPU_addr, 14, true); // request a total of 14 registers
AcX = Wire.read() << 8 | Wire.read(); // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)
AcY = Wire.read() << 8 | Wire.read(); // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)
AcZ = Wire.read() << 8 | Wire.read(); // 0x3F (ACCEL_ZOUT_H) & 0x40 (ACCEL_ZOUT_L)
Tmp = Wire.read() << 8 | Wire.read(); // 0x41 (TEMP_OUT_H) & 0x42 (TEMP_OUT_L)
GyX = Wire.read() << 8 | Wire.read(); // 0x43 (GYRO_XOUT_H) & 0x44 (GYRO_XOUT_L)
GyY = Wire.read() << 8 | Wire.read(); // 0x45 (GYRO_YOUT_H) & 0x46 (GYRO_YOUT_L)
GyZ = Wire.read() << 8 | Wire.read(); // 0x47 (GYRO_ZOUT_H) & 0x48 (GYRO_ZOUT_L)
}

Binary file added DIYScooter_Schaltplan b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Models/scooter/brake.blend
Binary file not shown.
Binary file added Models/scooter/brake.stl
Binary file not shown.
Binary file added Models/scooter/brakehandle.stl
Binary file not shown.
Binary file added Models/scooter/scooter case lit.stl
Binary file not shown.
Binary file added Models/scooter/scooter case.blend
Binary file not shown.
13 changes: 13 additions & 0 deletions readme.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DIY Scooter

Code and models for the DIY Scooter shown on bitluni's lab YouTube
https://www.youtube.com/playlist?list=PLjUbKCHhzPEyLdycsl0JJv-v3YPya3sPf

# License

Public Domain
...but I am thankful for any shout-out


Have fun
- bitluni

0 comments on commit e79cb15

Please sign in to comment.