From 701624b37898f695920c1ef0b1bacf8116efc6fe Mon Sep 17 00:00:00 2001 From: dtb Date: Wed, 2 Aug 2023 16:35:39 -0400 Subject: [PATCH] fix wiring for ecg --- tekubi/main.ino | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/tekubi/main.ino b/tekubi/main.ino index 4549d9b..892b28a 100644 --- a/tekubi/main.ino +++ b/tekubi/main.ino @@ -1,27 +1,27 @@ +#define RAD_PIN 0 +#define ECG_PIN 14 /* A0 */ /* TEKUBI - * ___________ ____________________________ - * | | | | - * | USB POWER | | TEENSY 4.0 | - * | | | | - * |__GND__5V__| |__Vin__GND__D3__SDA0__SCL0__| - * | | | | | | | - * | +--------+----|---|-+--|-----|----------+ - * | | | | | | | | - * +----|-------------+---|-|--|-----|----------|----+ - * | | | | | | | | | - * | | +---------|---+ | +---+ | | | - * __ | __ |__ | __ __ | __ |____ | | ____ | __ | __ - * | GND 5V INT | | GND Vcc | | | | Vcc GND | - * | (100mA?) | | (10mA) SDA--+-|----SDA (4mA) | + * ___________ ________________________________ + * | | | | + * | USB POWER | | TEENSY 4.0 | + * | | | | + * |__GND__5V__| |__Vin__GND__D0__SDA0__SCL0__A0__| + * | | | | | | | | + * | +--------+----|---|-+--|-----|----|----------+ + * | | | | | | | | | + * +----|-------------+---|-|--|-----|----|-----+ | + * | | | | | | | | | | + * | | +---------|---+ | +---+ | +-+ | | + * __ | __ |__ | __ __ | __ |____ | | | ____ | __ | __ + * | GND 5V INT | | GND Vcc | | | | | GND Vcc | + * | (100mA?) | | (10mA) SDA--+ | +-A (4mA) | * | | | | | | | - * | GEIGER COUNTER | | GYRO SCL----+----SCL ECG | + * | GEIGER COUNTER | | GYRO SCL----+ | ECG | * |________________| |______________| |______________| */ - /* geiger counter * https://www.rhelectronics.store - * /radiation-detector-geiger-counter-diy-kit-second-edition - * INT -> Teensy D3 */ + * /radiation-detector-geiger-counter-diy-kit-second-edition */ #include #define RAD_LOG_PERIOD 5000 /* milliseconds; sample rate */ #define MINUTE 60000 /* milliseconds in a minute */ @@ -33,8 +33,8 @@ void rad_interrupt(){ ++rad_count; } /* https://www.pjrc.com/teensy/td_timing_elaspedMillis.html */ elapsedMillis rad_period = 0; void geiger_setup(){ - pinMode(3, INPUT); - digitalWrite(3, HIGH); + pinMode(RAD_PIN, INPUT); + digitalWrite(RAD_PIN, HIGH); attachInterrupt(0, rad_interrupt, FALLING); } void geiger_loop(){ @@ -46,9 +46,7 @@ void geiger_loop(){ } /* gyro - * https://www.elecrow.com/crowtail-mpu6050-accelerometer-gyro.html - * SDA -> Teensy SDA0 - * SCL -> Teensy SCL0 */ + * https://www.elecrow.com/crowtail-mpu6050-accelerometer-gyro.html */ /* https://github.com/jrowberg/i2cdevlib/ * Most inexplicable stuff is because it was in Arduino/MPU6050/examples/ * MPU6050_raw/MPU6050_raw.ino */ @@ -74,11 +72,8 @@ void gyro_loop(){ } /* ecg - * https://www.elecrow.com/crowtail-pulse-sensor-p-1673.html - * SDA -> Teensy SDA0 - * SCL -> Teensy SCL0 */ + * https://www.elecrow.com/crowtail-pulse-sensor-p-1673.html */ void ecg_setup(){ - /* I2C is set up in gyro_setup */ } /* teensy 4.0