// Howdy 👋.
//
// If you are new to writing code in Flux make sure to check out our get started docs: https://docs.flux.ai/reference/introduction
//
// We also have a Flux Slack Community in case you need help: https://join.slack.com/t/fluxcommunity/shared_invite/zt-p48n941f-wzQ06kGmuFJ2HXnGYT1JkA
//
// To infinity and beyond 🚀
const int buttonPin = 40; // Pin for the button
const int ledPin = 13; // Pin for the LED
const int relayPin = 28; // Pin for the relay
const int pulsePin = A0; // Pin for measuring pulse
unsigned long pulseStartTime = 0; // Variable to store pulse start time
bool buttonState = LOW; // Variable to store button state
bool lastButtonState = LOW; // Variable to store last button state
bool relayState = LOW; // Variable to store relay state
unsigned long relayStartTime = 0; // Variable to store relay start time
void setup() {
pinMode(buttonPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(relayPin, OUTPUT);