You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on my first project and I have a timer issue. Short version. my timer is running way to fast than the normal time. I already got some good support from crankyoldgit (crankyoldgit/IRremoteESP8266#364 (comment)) and followed his advices. Now I can edge my issue pretty much to one of the functions in this library "onMessage()". My ino looks like that:
static unsigned long last = millis();
if (millis() - last > 5000) {
last = millis();
Serial.printf("[MAIN] Free heap: %d bytes\n", ESP.getFreeHeap());
}
WiFi.mode(WIFI_STA);
Serial.printf("Verbindungs zu %s wird aufgebaut ", WIFI_SSID);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(">");
delay(100);
}
Serial.println("");
Serial.printf("Verbunden! SSID: %s, IP Adresse: %s\n", WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
}
void devices()
{
fauxmo.addDevice("Test"); //ID 0
//fauxmo.onMessage(request);
}
`
If I run it like that, my output is fine and the delays in MusicTest are working as they should. BUT if I use the version where I uncomment fauxmo.onMessage(request) in devices(), my output isn't delayed. Hope one of you can help me!
best regards,
Michel
The text was updated successfully, but these errors were encountered:
What's up guys (peace),
I'm working on my first project and I have a timer issue. Short version. my timer is running way to fast than the normal time. I already got some good support from crankyoldgit (crankyoldgit/IRremoteESP8266#364 (comment)) and followed his advices. Now I can edge my issue pretty much to one of the functions in this library "onMessage()". My ino looks like that:
`
#include <IRremoteESP8266.h>
#include <IRsend.h>
#include <ESP8266WiFi.h>
#include "fauxmoESP.h"
fauxmoESP fauxmo;
IRsend irsend(4);
#define WIFI_SSID "Mr. NiceGuy (.Y.)"
#define WIFI_PASS "***********"
void setup()
{
irsend.begin();
Serial.begin(115200);
wifiSetup();
fauxmo.enable(true);
devices();
MusicTest();
}
void loop()
{
fauxmo.handle();
}
void MusicTest()
{
Serial.println("Anlage AN");
irsend.sendNEC(0x10E03FC, 32);
delay(4000);
Serial.println("Anlage Eingang CD");
irsend.sendNEC(0x10E23DC, 32);
delay(10000);
Serial.println("Anlage AUS");
irsend.sendNEC(0x10EF906, 32);
}
void request(unsigned char device_id, const char * device_name, bool state)
{
if (state)
{
if(device_id == 0)
{
MusicTest();
}
}
}
void wifiSetup()
{
// ----------
// WLAN SETUP
// ----------
}
void devices()
{
fauxmo.addDevice("Test"); //ID 0
//fauxmo.onMessage(request);
}
`
If I run it like that, my output is fine and the delays in MusicTest are working as they should. BUT if I use the version where I uncomment fauxmo.onMessage(request) in devices(), my output isn't delayed. Hope one of you can help me!
best regards,
Michel
The text was updated successfully, but these errors were encountered: