Thread: AutoTop DIY
View Single Post
Old 06-27-2014, 09:55 AM   #61
JayG
On the slippery slope
 
JayG's Avatar
 
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,794
Garage
Quote:
Originally Posted by Polaris View Post
...and delay(50) should be delay(loopInterval)
The delay is active

I did add the highlighted lines and it appears to now work.
I do have to install it and see for sure

switch(openMode) { ////0=no auto movement, 1=auto open, 2 = auto close, 3 = manual open, 4 = manual close
case 1: //currently auto-opening
digitalWrite(openBtnOut, HIGH);
movementCount -= loopInterval;

and

case 2: //currently auto-closing
digitalWrite(closeBtnOut, HIGH);
movementCount -= loopInterval;

with those 2 extra lines of code, it does auto open/close and a press of the opposite direction button will immediate stop and a press longer than shortPressInterval of the same direction button will stop it
__________________
2004 Boxster S 6 speed - DRL relay hack, Polaris AutoTop DIY
2004 996 Targa Tip
Instructor - San Diego region
2014 Porsche Performance Driving School
2020 BMW X3, 2013 Ram 1500, 2016 Cmax, 2004 F-150 "Big Red"
JayG is offline   Reply With Quote