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 BT_OSC
|
||||
|
||||
#define OUTPUT_READABLE_WORLDACCEL
|
||||
//#define OUTPUT_READABLE_WORLDACCEL
|
||||
#define OUTPUT_READABLE_REALACCEL
|
||||
|
||||
// SERIAL
|
||||
#ifdef BOARD_HAS_USB_SERIAL
|
||||
|
@ -204,13 +205,13 @@ void setup() {
|
|||
// supply your own gyro offsets here, scaled for min sensitivity
|
||||
// !!! Run Zero IMU to get readings (read comments for instructions)
|
||||
|
||||
/* First proto (right hand, black&blue)*/
|
||||
mpu.setXGyroOffset(76);
|
||||
mpu.setYGyroOffset(68);
|
||||
mpu.setZGyroOffset(10);
|
||||
mpu.setXAccelOffset(-3527);
|
||||
mpu.setYAccelOffset(-913);
|
||||
mpu.setZAccelOffset(1027);
|
||||
/* Kegel */
|
||||
mpu.setXAccelOffset(-4011);
|
||||
mpu.setYAccelOffset(1059);
|
||||
mpu.setZAccelOffset(4738);
|
||||
mpu.setXGyroOffset(86);
|
||||
mpu.setYGyroOffset(69);
|
||||
mpu.setZGyroOffset(-1);
|
||||
|
||||
/* Second proto, translucent / white
|
||||
mpu.setXGyroOffset(-3650);
|
||||
|
@ -221,6 +222,15 @@ void setup() {
|
|||
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)
|
||||
if (devStatus == 0) {
|
||||
// Calibration Time: generate offsets and calibrate our MPU6050
|
||||
|
@ -261,7 +271,8 @@ void setup() {
|
|||
#endif
|
||||
|
||||
#ifdef BT_OSC
|
||||
SerialBT.begin("wavey wind");
|
||||
//SerialBT.begin("wavey wind");
|
||||
SerialBT.begin("wavey wind 2");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue