arduino-shutters icon indicating copy to clipboard operation
arduino-shutters copied to clipboard

EXAMPLE NOT WORKING

Open BMBIT-oss opened this issue 4 years ago • 3 comments

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 avatar Nov 28 '19 14:11 BMBIT-oss

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 ?

BMBIT-oss avatar Nov 30 '19 00:11 BMBIT-oss

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.

klaudiusz223 avatar Dec 01 '19 17:12 klaudiusz223

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 .

BMBIT-oss avatar Dec 02 '19 01:12 BMBIT-oss