Thread: AutoTop DIY
View Single Post
Old 06-27-2014, 01:32 PM   #64
JayG
On the slippery slope
 
JayG's Avatar
 
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,796
Garage
Quote:
Originally Posted by Polaris View Post
Ooh! I just found my old Nano with onboard USB. I'll set it up and test the code and add support for the parking break pin, too.

I'm not seeing why you needed to add the lines to case 1 and case 2. The pins get written high in the default case before switching to case 1 or 2. Without the default case writing the pin high, the case 1 or case 2 won't be run until the second time around the loop, 50ms later since the default case is what sets the openMode to 1 or 2.
I was just trying a few things. I am very new to programming these things, so it is highly likely unneeded code. Without the added lines it did not run in auto mode at all. The output was high only as long as the switch was closed. A short push did not enable auto mode.

In any case, I'll wait for you to test, especially with the e brake support

Thanks
__________________
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"

Last edited by JayG; 06-27-2014 at 02:32 PM.
JayG is online now   Reply With Quote