Skip to content

Instantly share code, notes, and snippets.

View hadouin's full-sized avatar
💾
Saving...

Hadouin hadouin

💾
Saving...
View GitHub Profile
@hadouin
hadouin / ecg_acorr.m
Created January 13, 2023 11:58
ECG with autocorrelation in MATLAB
clear all
close all
filenames= ["100.wav", "101.wav", "102.wav", "103.wav", "104.wav", "105.wav", "106.wav", "107.wav", "108.wav", "109.wav"];
for name = filenames
[bpm, segments, windowSize, fs, signal, increment] = getBPMFromFile(name);
fprintf(" %s BPM = %.2f\n", name, bpm)
figure
subplot(3,1,1)
@hadouin
hadouin / capteurCardiaque.cpp
Created November 25, 2022 11:05
Code pour le capteur cardiaque
#include <Arduino.h>
#include <stdio.h>
#define PORT PD_0
int valeurPrecedente = 0;
int lastTime = 0;
int valeurSeuil = 150;
void setup() {
Serial.begin(9600);
@hadouin
hadouin / TestCo2.cpp
Created November 8, 2022 13:55
Code de Test pour le capteur de C02
#include <Arduino.h>
#include <stdio.h>
byte PWM_PIN = A4;
int pwm_value;
int pwm_percent;
void setup() {
pinMode(PWM_PIN, INPUT);
Serial.begin(9600);
@hadouin
hadouin / main.cpp
Created October 21, 2022 07:55
Capteur DHT11 with TM4C123
#include <Arduino.h>
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
}
void dec2bin(int n)
{