One button on PS3 controller to extend/ extract an actuator

Like the subject says, I am trying to control the extension and retraction of a linear actuator with one button on my PS3 controller. If no (R2) button is pushed then the actuator will be or go into retraction, if I press and hold the R2 button it will start to extend, let go, and it will retract, so on and so forth.

Thanks for the help!

Oh, and I am using a L298N motor driver and 12v battery.

with some IPA's, so yeah, needing assistance . Thanks ya'll

Hello mayhew2111

Welcome to the worldbest Arduino forum ever.

This is a nice project to get started.

Keep it simple and stupid firstly.

Follow the example code that comes with the library or
run some tutorials for the hardware selected.
If you are happy with the results of the tutorials you can merge these to your project.

Have a nice day and enjoy coding in C++.

Thanks for the response, I've been playing with a lot of sample code, however, I can not get the result I am looking for. It seems simple, do not press anything and it will retract till it hits it limit, press the button and it extends, till you press the button again and it starts to retract.

Post your sketch, well formated, with well-tempered comments and in so called code tags "< code >" and a detailed circuit diagram to see how we can help.

I really don't know what I am doing. I've run sample code and have been able to control the actuator, just not the way I would like to.

Hello

Take this tutorial how to detect state change.

So you can learn how to do it and derive a solution for your project.

Thank you Paul! This is good stuff, quick question though, since I am using PS3 controller with bluetooth will I need all the resistors and such, I don't see understand where that would be necessary.

I guess my biggest issue is, how to incorporate all this sample code to work with a PS3 controller

I do see how the article you sent could work though! thanks man!!

Paul, are you on the east coast?

Hey Paul, I am stuck! Grab a PS3 controller, a micro controller, 12v battery and a motor drive, preferably anL298N and show/ tell me how to do what it is what i want to do. thank you

Ill give you my # if you wanna call?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.