Hi,
No need to be a Proton expert to see the example is ... not so good !
a closer look to your "Help file" example will show you there's some inconsistance ...
1) Buttons are connected between inputs and ground, good ... BUT you must add 10k resistors between V+ and inputs to give some "pullup" ...
2)
Replace
IF PORTA.0 = 0 Then IF Pos < 3000 Then Pos = Pos + 1 ' Move servo left
IF PORTA.1 = 0 Then Pos = 1500 ' Centre servo
IF PORTA.2 = 0 Then IF Pos > 0 Then Pos = Pos - 1 ' Move servo right
by
IF PORTA.0 = 0 Then IF Pos < 2200 Then Pos = Pos + 1 ' Move servo right
IF PORTA.1 = 0 Then Pos = 1500 ' Centre servo
IF PORTA.2 = 0 Then IF Pos > 800 Then Pos = Pos - 1 ' Move servo left
This will prevent damaging your servo or having strange behaviour ... by overtravel !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks