marvinroger / arduino-shutters

Arduino library to control non-smart roller shutters using time
MIT License
60 stars 17 forks source link

EXAMPLE NOT WORKING #25

Open BMBIT-oss opened 4 years ago

BMBIT-oss commented 4 years ago

Hi Marvin , I'm trying to use your library and start with the example provided , but it doesn't work . I set the new level from the serial monitor and nothing happens , level always stays @ 255 . I'm using Arduino IDE 1.8.7 Can you please help me in this matter. Thank you .

Issue

BMBIT-oss commented 4 years ago

So I have done some more research and it looks like the example is working on a ESP 8266 , any body knows why is not working on Uno / Nano ? anything to do with the eeprom ?

klaudiusz223 commented 4 years ago

Hi, Maybe your problem is related to issue #23 ? Change these lines in the example

const unsigned long upCourseTime = 30 * 1000;
const unsigned long downCourseTime = 45 * 1000;

for example like that

const unsigned long upCourseTime = 30u * 1000;
const unsigned long downCourseTime = 45u * 1000;

After these changes it's working on Mega.

You could also uncomment #define DEBUG in Shutters.h to see what's going on.

BMBIT-oss commented 4 years ago

I have discovered why is not working , It's something to do with the Eeprom . It works as intended on ESP 8266 , but on Nano , Uno , Mega I had to comment everything related about the ESP 8266 Eeprom (flash) specific settings like :

ifdef ESP8266

EEPROM.begin(512);

endif

Maybe somebody has an Idea what going on , but this was the fix , to have it working on non ESP devices .