very new to the blynk world and also to the photon world, however ive made several arduino uno projects. my latest project uses a particle photon board with a 4 channel relay shield. i have the photon and shield working together online with the blynk app. i have four switches that activate each relay.
i would like some help trying to get the blynk buttons to work one at a time. so if you turn any button on it would come on as normal and if any other button was on it would deactivate. that way i only ever have one relay on at a time.
also i would like the relays and/or buttons to only stay on for a set amount of time and than turn off. im sure itll be done in code but just not sure how to set it up. the code i have is just the basic blynk sketch
#define BLYNK_PRINT Serial // Set serial output for debug prints
//#define BLYNK_DEBUG // Uncomment this to see detailed prints
#include <blynk.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "AUTH CODE";
// Attach a Button widget (mode: Switch) to the Digital pin 7 - and control the built-in blue led.
// Attach a Graph widget to Analog pin 1
// Attach a Gauge widget to Analog pin 2
void setup()
{
Serial.begin(9600);
delay(5000); // Allow board to settle
Blynk.begin(auth);
}
void loop()
{
Blynk.run();
}