hello guys I cant realise my little project can somone help me out,
i try to make a servo that, When I push button 1, a servo motor must every 5 seconds move 20 degrees, when I push a second button, button 2 the servo motor has to stop immidatly
First, have you found a servo that can continually turn another 20 degrees forever if you don't push button 2? Servos generally only have a limited range of movement, typically 120-180 degrees in total.
OKey so I work with an arduio uno, and yes my servo only can turn 180degrees.
this is my code atm
but I cant figure out how I Shoudl put in my Push buttons. This is what I already found on thinercad, but then I tried my own code but this wont work.
Hi,
Please read the post at the start of any forum , entitled "How to use this Forum".
This will help with advice on how to present your code and problems.
Your code will be posted in a scrolling window.
Also before posting your code, press [ CTRL ] [ T ], this will format your code and make it easier to read.
Why all the fiddling with drukken and map()? Why not just pos = pos + 20? And delay(5) isn't 5 seconds. Also it won't repeat the move unless you keep dk1 pressed.
please tell me what is so hard to write down this hint?
You should post code by using code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps
press Ctrl-T for autoformatting your code
do a rightclick with the mouse and choose "copy for forum"
paste clipboard into write-window of a posting
I do this with a hotstring programmed with Autohotkey
a hotstring-definition in autohotkey looks like this
:R:TheHotString::Text that shall be typed automatically by autohotkey
my personal hotstring for the text above is "postcode"
:R:postcode::You should post code by using code-tags`rThere is an automatic function for doing this in the Arduino-IDE`rjust three steps`r1) press Ctrl-T for autoformatting your code`r2) do a rightclick with the mouse and choose "copy for forum"`r3) paste clipboard into write-window of a posting`r`r
whenever I write the character-sequence "postcode"
The character-sequence p-o-s-t-c-o-d-e gets replaced by the text above
This means by typing 8 characters the above text is inserted in the posting
explaining the most comfortable way to get newcomers to post their entire sketch.
What are your arguments that justify to describe the other methods which prove beeing unsuccessfull again and again?
it does not count if you argue I use linux/mac. I'm 101% sure linux and mac have something with an equal functionality. (linux and iOs are very smart operation-systems aren't they? And for linux/mac there exists very smart software doesn't it?)
New users are also taken automatically to the forum topic explaining how to get the most out of the forum by using it correctly when they first log in. Do they take any notice ?
As to automating the insertion of standard messages
you need to type 7 characters ? What a waste !
All it takes for me to post one of my standard replies is a single click on a keypad attached to an Arduino Leonardo running a sketch that I wrote and mods also have access to canned replies that cover many situations
If you have tried then post the code that you tried and we can go from there. There's nothing in any code you posted that shows you're taking any notice of the help people are trying to give you.
Also it would help if you answered some of the many questions you have been asked.
Please tell me why you think it's a good idea that loads of us should all post identical "hints" that don't make any attempt to answer the OPs problem?