Go Back   986 Forum - The Community for Porsche Boxster & Cayman Owners > Porsche Boxster & Cayman Forums > DIY Project Guides

 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 06-27-2014, 08:12 AM   #11
On the slippery slope
 
JayG's Avatar
 
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,799
Garage
Quote:
Originally Posted by Polaris View Post
I'm pretty sure the last switch statement should just look like:

default: //no movement currently
if(openBtnCount > 0) {
openMode = 1;
movementCount = openTime;
digitalWrite(closeBtnOut, LOW);
digitalWrite(openBtnOut, HIGH);
} else if(closeBtnCount > 0) {
openMode = 2;
movementCount = closeTime;
digitalWrite(closeBtnOut, HIGH);
digitalWrite(openBtnOut, LOW);
} else {
allStop();
}

I'm also pretty sure the "movementCount -= loopInterval;" lines shouldn't be in the case 3 and case 4 and default switches. They are unnecessary in case 3 and 4, and constantly decremented when there is no motion in the default case.
just tried those changes and the output still does not stay high except for the time when the switch is closed, in other words no auto operation.

I am using the onboard LED (pin 13) as the output for testing as it is easier than uploading the code and installing in the car to test
__________________
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 online now   Reply With Quote
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -8. The time now is 03:06 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2025 Pelican Parts, LLC - Posts may be archived for display on the Pelican Parts Website -    DMCA Registered Agent Contact Page