Output Button on analog port lose the state on iPhone App

Hi,

I have a project where Im using the Blynk app with a relay board and Particle Photon. Because I need to control 16 outputs, I use a few digital and analog port as a digital OUTPUT.

I have a random problem with the Blynk App. When I stop the dashboard or don’t use it for a few hours the status of a the buttons associate to analog ports change to “OFF” but are “ON” in the hardware.

For example, I have 16 button turned ON, if I close the iPhone app, and open it again, a the ANALOG associate buttons in the app change state to OFF, but are ON in hardware. The digital pins button kept the state.

How I can kept the sync between the blank app and the hardware in analog output pin?

My code is very simple:

#define BLYNK_PRINT Serial
#include “blynk/blynk.h”

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “xxxxxx”;
// No coding required for direct pin operations!

void setup()
{
Serial.begin(9600);
delay(5000); // Allow board to settle
Blynk.begin(auth);
}

// Keep this flag not to re-sync on every reconnection
bool isFirstConnect = true;

// This function will run every time Blynk connection is established
BLYNK_CONNECTED() {
if (isFirstConnect) {
Blynk.syncAll();
isFirstConnect = false;
}
}

void loop()
{
Blynk.run();
}

Thanks for help.

@ashvetsov could you please check?

@Dmitry thanks for your help.

Im still facing issues with this bug @ashvetsov

I love your app, and bought a big package of credits but without this working I can’t do anything.

Thanks again.

Hi,

Still waiting for help in this issue, or any answer about where to expect to be fixed,

Thanks