06-27-2014, 10:55 AM
|
#61
|
On the slippery slope
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,797
|
Quote:
Originally Posted by Polaris
...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"
|
|
|
06-27-2014, 11:43 AM
|
#62
|
Registered User
Join Date: Apr 2013
Location: Springfield, Oregon
Posts: 62
|
If you are going to write high there, you need to also write low to the other pin so you don't accidentally have both open and close high at the same time...that would be dangerous.
|
|
|
06-27-2014, 01:11 PM
|
#63
|
Registered User
Join Date: Apr 2013
Location: Springfield, Oregon
Posts: 62
|
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.
Last edited by Polaris; 06-27-2014 at 01:15 PM.
|
|
|
06-27-2014, 01:32 PM
|
#64
|
On the slippery slope
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,797
|
Quote:
Originally Posted by Polaris
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.
|
|
|
06-27-2014, 04:18 PM
|
#65
|
Registered User
Join Date: Apr 2013
Location: Springfield, Oregon
Posts: 62
|
Success!!!
I found the correct final sketch, and I updated it to include a parking brake pin on pin 4.
I'm a little weary about the parking break pin simply because it doesn't require an extra lock-out on the parking brake so it'll operate when somebody presses the button at any speed...in other words, use it at your own risk.
I updated the link to the code in the original post. Also, a side note, the link goes directly to the .ino sketch, but since there is no defined MIME for that extension, it just shows it as text. You should be able to right click on the link to download the actual .ino file directly.
There's supposedly a speed control wire that goes to the stereo, so I may investigate using that to set up a high speed lockout.
|
|
|
06-27-2014, 05:21 PM
|
#66
|
Registered User
Join Date: Apr 2013
Location: Springfield, Oregon
Posts: 62
|
Of course, like clockwork, the FTDI Friend just showed up in the mail.
|
|
|
06-27-2014, 05:34 PM
|
#67
|
On the slippery slope
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,797
|
Quote:
Originally Posted by Polaris
Success!!!
I found the correct final sketch, and I updated it to include a parking brake pin on pin 4.
I'm a little weary about the parking break pin simply because it doesn't require an extra lock-out on the parking brake so it'll operate when somebody presses the button at any speed...in other words, use it at your own risk.
I updated the link to the code in the original post. Also, a side note, the link goes directly to the .ino sketch, but since there is no defined MIME for that extension, it just shows it as text. You should be able to right click on the link to download the actual .ino file directly.
There's supposedly a speed control wire that goes to the stereo, so I may investigate using that to set up a high speed lockout.
|
You are a Gentleman and a Scholar
the new code works great! :dance:
THANK YOU!!
do you have instructions for connecting for the pbrake interlock?
speed control would be very cool
__________________
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"
|
|
|
06-27-2014, 05:43 PM
|
#68
|
Registered User
Join Date: Apr 2013
Location: Springfield, Oregon
Posts: 62
|
pBreak should be the same circuit as the other output pins and should wire to the non-grounded side of the parking break switch....which will probably be a pain in the butt to get to.
I had a thought about the safety of the parking brake interlock, only make it activate when putting the top down, since you have the extra step of the top latch, but leave the close interlock as is so you have to click the parking brake handle one click manually. That way you don't accidentally close the top while driving down the highway.
|
|
|
06-27-2014, 08:27 PM
|
#69
|
On the slippery slope
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,797
|
just installed it in my car and it works perfectly
The new code Polaris posted is spot on!
I will look into connecting the p brake later, for now, 1 click is fine
Thanks again Polaris!
BTW, it does not matter which way the transistors are wired as long as you get base correct as they are switching ground
__________________
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"
|
|
|
06-30-2014, 12:59 PM
|
#70
|
Registered User
Join Date: Apr 2012
Location: Riverside, CA
Posts: 1,665
|
I just did a "Tortoise Diff" on the Old vs New code and there are lots of differences so don't even try to cut and paste the fixed sections in place in the old one base on the comments here as you WILL miss something.
Better you just redownload the code from the same Link and save the .ino file with date appended so you can get rid of the old incomplete one.
Just saying to help ensure everyones success.
Kudo's to Polaris for developing this and sharing freely with his fellow enthusiasts.
I'm waiting on the speed line upgrade and then I'll jump in as well.
That would be about number 4 on my list of todo's for the 986
__________________
"It broke because it wants to be Upgraded "
2012 Porsche Performance Driving School - SanDiego region
2001 Boxster S, Top Speed muffler, (Fred's) Mini Morimotto Projectors, Tarret UDP,
Short Shifter, Touch Screen Dual Din Radio, 03 4 Bow glass Top (DD & Auto-X since May 17,2012)
|
|
|
06-30-2014, 03:29 PM
|
#71
|
On the slippery slope
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,797
|
Quote:
Originally Posted by jb92563
I just did a "Tortoise Diff" on the Old vs New code and there are lots of differences so don't even try to cut and paste the fixed sections in place in the old one base on the comments here as you WILL miss something.
Better you just redownload the code from the same Link and save the .ino file with date appended so you can get rid of the old incomplete one.
Just saying to help ensure everyones success.
Kudo's to Polaris for developing this and sharing freely with his fellow enthusiasts.
I'm waiting on the speed line upgrade and then I'll jump in as well.
That would be about number 4 on my list of todo's for the 986
|
Yes, I saw a bunch of differences as well. Polaris mentioned he muust have origionally uploaded one of the earlier code versions from development
As a FYI, if you are looking at the code and have opened teh link before, you should refresh the cache (scrfeen) as you may be looking at the old code\
in the beginning of the code:
#define openBtnOut 2
#define closeBtnOut 3
#define pBrakeOut 4
#define openBtnIn 8
#define closeBtnIn 9
IF pBrakeOut is not defined, it is the old code
JB, I am in N San Diego, so if you need some help, let me know
__________________
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"
|
|
|
07-19-2014, 03:20 AM
|
#72
|
Registered User
Join Date: Apr 2014
Location: Leeds UK
Posts: 105
|
Having decided to have a go at this I have now got all the bits and down loaded the code to the board and about to start the wiring. I laid all components and wire out and planned when they would go, this is where the problems start. It could be me as never done this type of stuff before, but my board seems to be missing a GND and the + - below is a pic of the board. Any help really appreciated
Cheers
David
|
|
|
07-19-2014, 06:14 AM
|
#73
|
Registered User
Join Date: Jun 2014
Location: LB, Germany
Posts: 1,507
|
Hi David,
take a closer look at the pin description.
Arduino - ArduinoBoardNano
Maybe this will also help:
PIN 30 = + 6-20 volts
PIN 27 = + 5 volts
PIN GND = ground (2)
Regards
Markus
Last edited by Smallblock454; 07-19-2014 at 06:21 AM.
|
|
|
07-19-2014, 06:50 AM
|
#74
|
On the slippery slope
Join Date: Mar 2014
Location: Austin and Palm Springs
Posts: 3,797
|
There is only one ground connection. You use it for all the grounds in the wiring
Mine works great and was really easy to install
__________________
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"
|
|
|
07-22-2014, 03:29 AM
|
#75
|
Registered User
Join Date: Apr 2014
Location: Leeds UK
Posts: 105
|
Thanks for your help guys, all tested and working.
Special thanks to Polaris for sharing
[IMG] [/IMG]
|
|
|
07-22-2014, 05:00 AM
|
#76
|
Registered User
Join Date: Apr 2014
Location: Leeds UK
Posts: 105
|
Fitted and working, thanks JayG and Smallblock
Special thanks to Polaris for sharing in the 1st place
|
|
|
10-05-2014, 05:17 AM
|
#77
|
Registered User
Join Date: Apr 2004
Posts: 86
|
I have just bought all the components needed for this project and I am about to dig out my trusty old soldering iron to get things started.
I was just wondering if anyone has thought of any other Boxster related projects that the Arduino could handle - seems a bit of a waste to let such a powerful computer to just do the top switch.
What about things like curtesy headlights (headlights stay on for say 20sec at night after switching off) or auto-closing windows on arming (I already have a module to handle that, but conceivably the Arduino could handle it instead). Can anyone think of other "comfort" features that we can put the Arduino to work for?
__________________
--1989 Mazda MX6 GT
--1997 Porsche Boxster
--2005 Lexus RX330
--2007 Maserati Quattroporte Sport GT
|
|
|
10-05-2014, 05:19 AM
|
#78
|
Registered User
Join Date: Sep 2013
Location: Coral Springs, FL USA
Posts: 96
|
Yes! Three blink turn signals. Hardware and software should be very similar.
|
|
|
04-13-2015, 05:13 AM
|
#79
|
Registered User
Join Date: Jul 2014
Location: Buckinghamshire
Posts: 1
|
Kudos Polaris. I just built this with an Arduino Nano and it works perfectly. I added some code into the sketch so the roof can be triggered via serial connection on the USB to my in-dash Nexus 7. Now I've just gotta get that working on the tablet. Unfortunately Lollipop has made this more difficult as SL4A doesn't work with it.
|
|
|
04-14-2015, 01:02 PM
|
#80
|
Registered User
Join Date: Apr 2012
Location: Riverside, CA
Posts: 1,665
|
Quote:
Originally Posted by Jinster
I have just bought all the components needed for this project and I am about to dig out my trusty old soldering iron to get things started.
I was just wondering if anyone has thought of any other Boxster related projects that the Arduino could handle - seems a bit of a waste to let such a powerful computer to just do the top switch.
What about things like curtesy headlights (headlights stay on for say 20sec at night after switching off) or auto-closing windows on arming (I already have a module to handle that, but conceivably the Arduino could handle it instead). Can anyone think of other "comfort" features that we can put the Arduino to work for?
|
I actually used an EZ430 (thumbnail sized microprocessor) to illuminate the projectors "Dragon Eyes" breathing pattern red glow that I want activated when the security system is armed.
https://youtu.be/y07LMs5-zFA
We could add that to the Arduinos task list.
__________________
"It broke because it wants to be Upgraded "
2012 Porsche Performance Driving School - SanDiego region
2001 Boxster S, Top Speed muffler, (Fred's) Mini Morimotto Projectors, Tarret UDP,
Short Shifter, Touch Screen Dual Din Radio, 03 4 Bow glass Top (DD & Auto-X since May 17,2012)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -8. The time now is 05:40 AM.
| |