Flashing Light Prize (4) Arduino Horror
Bwahahahaha and ha.
[Sinistering Intensifies]


Ingredients
1. Arduino Uno
2. HiLetgo Pulse Sensor Module
3. 5V Relay
4. Heart (4$/eBay)
5. Blair Witch Project
6. 10K Pot
7. 1K Resistor
8. NPN Transistor



Notation(s)
1. Opted to disregard specialized code/software for the reasons of code-illiteracy -- the contradiction being that the native code for the pulse sensor blinks an LED. Meh.
2. Bcz the sensor is placed on a finger with very little to ensure consistent application, the analog values varied giving irregular peak values. To adjust per each application, we (me) added a pot to adjust the peak triggering value (high).
3. The Blair Witch Project is best served when watched alone. To accompany another is to give an identifiable secured surrounding relieving the immersive stresses permitted by the film's atmosphere. It is a superb horror film you nay saying butt holes!

Cardio Pulmonary Resketchiation
// Flashing Light Prize (4) Arduino Horror
// VijeMiller

int led = 13;
int relay = 2;
int pulse = A0;

int val;
int tot;
int nxt;
int high;

int potpin = A5;
int potval;

void setup() {
Serial.begin(115200);

pinMode(relay, OUTPUT);
pinMode(led, OUTPUT);

// Get Comfortable
for (int i = 0; i <= 5; i++) {
digitalWrite(led, HIGH);
delay(500);
digitalWrite(led, LOW);
delay(500);
}

}

void loop() {

// Reset Value
tot = 0;

// Smoothing
for (int i = 0; i <= 25; i++) {
val = analogRead(pulse);
tot = val + tot;
delay(2);
}
nxt = tot / 25;
Serial.println(nxt);

// To Solve Pulse Reading Inconsistency
// Adjust the Relay Trigger Peak Value
potval = analogRead(potpin);
high = map(potval, 0, 1023, 520, 570);

if (nxt > high) {
digitalWrite(relay, HIGH);
digitalWrite(led, HIGH);
} else {
digitalWrite(relay, LOW);
digitalWrite(led, LOW);
}

delay(5);
}

Archive
https://hackaday.io/project/25916-flashing-light-prize-4-arduino-horror

05:4:16 122-017

@pkvi
"...may not meet professional standards."
12,168 miters
0 miters today
203 tenons
Subscribe