marvinroger / arduino-shutters

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

Can't get exemple sketch to work #23

Closed SebDominguez-zz closed 5 years ago

SebDominguez-zz commented 6 years ago

I may be doing something wrong but I really don't know what

kapture 2018-11-30 at 16 58 47

Edit: Activating the debug mode throw me this message "Stored state is invalid".

I tried to call shutters.reset(); but then this happened...

kapture 2018-12-01 at 10 27 27

Edit2: Ok now it seems to work. I just edited upCourseTime = 30 * 1000; to upCourseTime = 30000;

marvinroger commented 5 years ago

Alright, thanks for the input. Is it fixed for you, then?

SebDominguez-zz commented 5 years ago

All seems to work fine now ! A little rectification on my last post: the bug was in the 45 * 1000 part. Since the compiler seems to keep the result in a short (and 45000 is > to 32767), I was ending trying to put in eeprom a negative number. So just writing the cours time in ms or just casting them do the trick.

But I still get gibberish on the serial port when I try to use shutters &reset();

I may use it wrong ?