Cleanup, dodan wemos prototip
parent
a6b98ee5f2
commit
3dc636ff7a
|
@ -1,23 +0,0 @@
|
||||||
// Keyboard Matrix Tutorial Example
|
|
||||||
// baldengineer.com
|
|
||||||
// CC BY-SA 4.0
|
|
||||||
|
|
||||||
// JP1 is an input
|
|
||||||
byte keys[] = {16, 17, 5, 18};
|
|
||||||
byte pressed[] = {0, 0, 0, 0};
|
|
||||||
byte KEYLEN = 4;
|
|
||||||
|
|
||||||
void setup() {
|
|
||||||
Serial.begin(9600);
|
|
||||||
for(int i = 0; i < KEYLEN; i++) {
|
|
||||||
pinMode(keys[i], INPUT_PULLUP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void loop() {
|
|
||||||
for(int i = 0; i < KEYLEN; i++) {
|
|
||||||
pressed[i] = !digitalRead(keys[i]);
|
|
||||||
Serial.print(String(pressed[i]) + " ");
|
|
||||||
}
|
|
||||||
Serial.println();
|
|
||||||
delay(50);
|
|
||||||
}
|
|
|
@ -16,7 +16,8 @@ using namespace BLA;
|
||||||
//#define WIFI_OSC
|
//#define WIFI_OSC
|
||||||
#define BT_OSC
|
#define BT_OSC
|
||||||
|
|
||||||
#define OUTPUT_READABLE_WORLDACCEL
|
//#define OUTPUT_READABLE_WORLDACCEL
|
||||||
|
#define OUTPUT_READABLE_REALACCEL
|
||||||
|
|
||||||
// SERIAL
|
// SERIAL
|
||||||
#ifdef BOARD_HAS_USB_SERIAL
|
#ifdef BOARD_HAS_USB_SERIAL
|
||||||
|
@ -204,13 +205,13 @@ void setup() {
|
||||||
// supply your own gyro offsets here, scaled for min sensitivity
|
// supply your own gyro offsets here, scaled for min sensitivity
|
||||||
// !!! Run Zero IMU to get readings (read comments for instructions)
|
// !!! Run Zero IMU to get readings (read comments for instructions)
|
||||||
|
|
||||||
/* First proto (right hand, black&blue)*/
|
/* Kegel */
|
||||||
mpu.setXGyroOffset(76);
|
mpu.setXAccelOffset(-4011);
|
||||||
mpu.setYGyroOffset(68);
|
mpu.setYAccelOffset(1059);
|
||||||
mpu.setZGyroOffset(10);
|
mpu.setZAccelOffset(4738);
|
||||||
mpu.setXAccelOffset(-3527);
|
mpu.setXGyroOffset(86);
|
||||||
mpu.setYAccelOffset(-913);
|
mpu.setYGyroOffset(69);
|
||||||
mpu.setZAccelOffset(1027);
|
mpu.setZGyroOffset(-1);
|
||||||
|
|
||||||
/* Second proto, translucent / white
|
/* Second proto, translucent / white
|
||||||
mpu.setXGyroOffset(-3650);
|
mpu.setXGyroOffset(-3650);
|
||||||
|
@ -221,6 +222,15 @@ void setup() {
|
||||||
mpu.setZAccelOffset(-12);
|
mpu.setZAccelOffset(-12);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Third proto, D1 mini
|
||||||
|
mpu.setXAccelOffset(-1272);
|
||||||
|
mpu.setYAccelOffset(-700);
|
||||||
|
mpu.setZAccelOffset(1486);
|
||||||
|
mpu.setXGyroOffset(60);
|
||||||
|
mpu.setYGyroOffset(11);
|
||||||
|
mpu.setZGyroOffset(28);
|
||||||
|
*/
|
||||||
|
|
||||||
// make sure it worked (returns 0 if so)
|
// make sure it worked (returns 0 if so)
|
||||||
if (devStatus == 0) {
|
if (devStatus == 0) {
|
||||||
// Calibration Time: generate offsets and calibrate our MPU6050
|
// Calibration Time: generate offsets and calibrate our MPU6050
|
||||||
|
@ -261,7 +271,8 @@ void setup() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BT_OSC
|
#ifdef BT_OSC
|
||||||
SerialBT.begin("wavey wind");
|
//SerialBT.begin("wavey wind");
|
||||||
|
SerialBT.begin("wavey wind 2");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue