![]() |
Quote:
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 |
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.
|
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. |
Quote:
In any case, I'll wait for you to test, especially with the e brake support Thanks |
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. |
Of course, like clockwork, the FTDI Friend just showed up in the mail.
|
Quote:
the new code works great! :dance: THANK YOU!! do you have instructions for connecting for the pbrake interlock? speed control would be very cool |
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. |
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! :cheers: BTW, it does not matter which way the transistors are wired as long as you get base correct as they are switching ground |
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 :D |
Quote:
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 |
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 Davidhttp://986forum.com/forums/uploads01...1405764206.jpg |
Hi David,
take a closer look at the pin description. ;) Arduino - ArduinoBoardNano Maybe this will also help: http://arduino.cc/de/uploads/Main/NanoFront.jpg PIN 30 = + 6-20 volts PIN 27 = + 5 volts PIN GND = ground (2) Regards Markus |
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 |
Thanks for your help guys, all tested and working.
Special thanks to Polaris for sharing [IMG]http://i898.photobucket.com/albums/a...fbb17ba8e1.jpg[/IMG] |
Fitted and working, thanks JayG and Smallblock
Special thanks to Polaris for sharing in the 1st place |
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? |
Yes! Three blink turn signals. Hardware and software should be very similar.
|
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.
|
Quote:
https://youtu.be/y07LMs5-zFA We could add that to the Arduinos task list. |
All times are GMT -8. The time now is 01:45 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