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
* ___________ ____________________________
* | | | |
* | 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 <SPI.h>
#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