1

I've uploaded the code below to my esp8266, but it does not work and it shows random values on the serial monitor. I need help to resolve this problem. Regards. My code is used for dimmer project:

#define BLYNK_PRINT Serial            
#include <ESP8266WiFi.h>            
#include <BlynkSimpleEsp8266.h>  
#include <RBDdimmer.h>           

BlynkTimer timer;


void checkPhysicalButton();
#define auth "ZeBzdsvxb1tzv6zIxYmTyTbpc0bd"   
#define ssid "MYLAP"                             
#define pass "12345678"                          

#define SERVER "blynk-cloud.com "             
#define PORT 8442

#define outputPin  16  // PWM pin for dimmer
#define zerocross  5 // for boards with CHANGEBLE input pins

dimmerLamp dimmer(outputPin, zerocross); 

int outVal = 0; // Intialisation value for dimmer
int dim_val; // dimmer value to dim the appliance

BLYNK_CONNECTED() {

  Blynk.syncVirtual(V1);

}

void setup()
{
  Serial.begin(9600); 
  dimmer.begin(NORMAL_MODE, ON); 
  Blynk.begin(auth, ssid, pass,"blynk-cloud.com", 8442);
 timer.setInterval(500L, checkPhysicalButton);
}

void loop()
{
  Blynk.run(); 
  timer.run();
}
  BLYNK_WRITE(V1)  {  // Set to your virtual pin
  outVal = param.asInt(); // Get State of Virtual Button
  }
  
void checkPhysicalButton()
{
  dim_val = map(outVal, 0, 1023, 0, 100); 
  dimmer.setPower(dim_val);               
  Blynk.virtualWrite(V1, dim_val); 
}

error is shown on the serial monitor :

--------------- CUT HERE FOR EXCEPTION DECODER ---------------
⸮⸮⸮r⸮z^⸮ISR not in IRAM!

User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Abort called

>>>stack>>>

ctx: cont
sp: 3ffffed0 end: 3fffffc0 offset: 0000
3ffffed0:  ffffffff 3fffc6fc 00000033 3ffe84f8  
3ffffee0:  000000fe 00000000 00000000 00000000  
3ffffef0:  00000000 00000000 00000000 00ff0000  
3fffff00:  5ffffe00 5ffffe00 00000020 00000000  
3fffff10:  00000002 00000005 00000005 40204df6  
3fffff20:  401007a2 3ffefd3c 3ffefd24 40204e08  
3fffff30:  0000001c 00002580 00000005 4020534d  
3fffff40:  00000000 40205f0d ffffffff 00000001  
3fffff50:  feefeffe 00000001 3ffeeda8 3ffeeed4 
1

Browse other questions tagged or ask your own question.