1
0

fix wiring for ecg

This commit is contained in:
dtb 2023-08-02 16:35:39 -04:00
parent 4764fb9bab
commit 701624b378

View File

@ -1,27 +1,27 @@
#define RAD_PIN 0
#define ECG_PIN 14 /* A0 */
/* TEKUBI /* TEKUBI
* ___________ ____________________________ * ___________ ________________________________
* | | | | * | | | |
* | USB POWER | | TEENSY 4.0 | * | USB POWER | | TEENSY 4.0 |
* | | | | * | | | |
* |__GND__5V__| |__Vin__GND__D3__SDA0__SCL0__| * |__GND__5V__| |__Vin__GND__D0__SDA0__SCL0__A0__|
* | | | | | | |
* | +--------+----|---|-+--|-----|----------+
* | | | | | | | | * | | | | | | | |
* +----|-------------+---|-|--|-----|----------|----+ * | +--------+----|---|-+--|-----|----|----------+
* | | | | | | | | | * | | | | | | | | |
* | | +---------|---+ | +---+ | | | * +----|-------------+---|-|--|-----|----|-----+ |
* __ | __ |__ | __ __ | __ |____ | | ____ | __ | __ * | | | | | | | | | |
* | GND 5V INT | | GND Vcc | | | | Vcc GND | * | | +---------|---+ | +---+ | +-+ | |
* | (100mA?) | | (10mA) SDA--+-|----SDA (4mA) | * __ | __ |__ | __ __ | __ |____ | | | ____ | __ | __
* | 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 /* geiger counter
* https://www.rhelectronics.store * https://www.rhelectronics.store
* /radiation-detector-geiger-counter-diy-kit-second-edition * /radiation-detector-geiger-counter-diy-kit-second-edition */
* INT -> Teensy D3 */
#include <SPI.h> #include <SPI.h>
#define RAD_LOG_PERIOD 5000 /* milliseconds; sample rate */ #define RAD_LOG_PERIOD 5000 /* milliseconds; sample rate */
#define MINUTE 60000 /* milliseconds in a minute */ #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 */ /* https://www.pjrc.com/teensy/td_timing_elaspedMillis.html */
elapsedMillis rad_period = 0; elapsedMillis rad_period = 0;
void geiger_setup(){ void geiger_setup(){
pinMode(3, INPUT); pinMode(RAD_PIN, INPUT);
digitalWrite(3, HIGH); digitalWrite(RAD_PIN, HIGH);
attachInterrupt(0, rad_interrupt, FALLING); attachInterrupt(0, rad_interrupt, FALLING);
} }
void geiger_loop(){ void geiger_loop(){
@ -46,9 +46,7 @@ void geiger_loop(){
} }
/* gyro /* gyro
* https://www.elecrow.com/crowtail-mpu6050-accelerometer-gyro.html * https://www.elecrow.com/crowtail-mpu6050-accelerometer-gyro.html */
* SDA -> Teensy SDA0
* SCL -> Teensy SCL0 */
/* https://github.com/jrowberg/i2cdevlib/ /* https://github.com/jrowberg/i2cdevlib/
* Most inexplicable stuff is because it was in Arduino/MPU6050/examples/ * Most inexplicable stuff is because it was in Arduino/MPU6050/examples/
* MPU6050_raw/MPU6050_raw.ino */ * MPU6050_raw/MPU6050_raw.ino */
@ -74,11 +72,8 @@ void gyro_loop(){
} }
/* ecg /* ecg
* https://www.elecrow.com/crowtail-pulse-sensor-p-1673.html * https://www.elecrow.com/crowtail-pulse-sensor-p-1673.html */
* SDA -> Teensy SDA0
* SCL -> Teensy SCL0 */
void ecg_setup(){ void ecg_setup(){
/* I2C is set up in gyro_setup */
} }
/* teensy 4.0 /* teensy 4.0