IronJungle
Senior Member
I posted up my completed Robot Hand project here a few months ago. Source code and all is at:
http://www.picaxeforum.co.uk/showthread.php?19242-All-about-my-18M2-Robot-Hand
This weekend I am showing a buddy of the coolness of the PICAXE vs his Arduino using my robot hand.
I loaded up my original (and final) version source code into the editor. We looked at the code some and I hit download to PICAXE. Immediately after d/l the servos on the Robot Hand started to jitter slightly when they used to be silent and still. I do recall having the jitter issue before and corrected it with the "servopos 0, off" command. When I re-downloaded this weekend something sure changed and I would like to guidance on what it may be.
Below I have posted a 'shortened' version on the code to make it easier to sort through. The jitter happens even if I put a "STOP" command right before the "do until pinC.1 = 1" loop.
Thanks!
http://www.picaxeforum.co.uk/showthread.php?19242-All-about-my-18M2-Robot-Hand
This weekend I am showing a buddy of the coolness of the PICAXE vs his Arduino using my robot hand.
I loaded up my original (and final) version source code into the editor. We looked at the code some and I hit download to PICAXE. Immediately after d/l the servos on the Robot Hand started to jitter slightly when they used to be silent and still. I do recall having the jitter issue before and corrected it with the "servopos 0, off" command. When I re-downloaded this weekend something sure changed and I would like to guidance on what it may be.
Below I have posted a 'shortened' version on the code to make it easier to sort through. The jitter happens even if I put a "STOP" command right before the "do until pinC.1 = 1" loop.
Thanks!
Code:
' PICAXE 18M2 for Hand Gesture Robot JULY 2011
' www.ironjungle.com
' Other than the minium PICAXE 18M2 'keep alive' 22K R & 10K R
' no other R, C, L, etc need for the project.
' Everything powered by 4.5VDC
' The PICAXE drives the servos straight from the chip.
' See pinouts in comments
' 0 is Thumb (PICAXE pin 6)
' 1 is Pointer (PICAXE pin 7)
' 2 is Middle (PICAXE pin 8)
' 3 is Ring (PICAXE pin 9)
' 4 is Pink (PICAXE pin 10)
' Normally Open Button Switch is PICAXE pin 18 (pulled HIGH with 10K)
'Define Servo values to fully EXtend/Open finger
Symbol Ex_Thumb = 60
Symbol Ex_Pointer = 60
Symbol Ex_Middle = 245
Symbol Ex_Ring = 60
Symbol Ex_Pink = 60
'Define Servo values to fully CLose finger
Symbol CL_Thumb = 225
Symbol CL_Pointer = 240
Symbol CL_Middle = 50
Symbol CL_Ring = 240
Symbol CL_Pink = 240
'Init the servos
servo 0, Ex_Thumb
servo 1, Ex_Pointer
servo 2, Ex_Middle
servo 3, Ex_Ring
servo 4, Ex_Pink
pause 400
servopos 0, off
servopos 1, off
servopos 2, off
servopos 3, off
servopos 4, off
do until pinC.1 = 1 'wait for RED button press (PICAXE pin18)
RANDOM w12 ' w13 will be use to in Case Statement
w13 = w12 // 11 + 1 '"//" is modulus divide (returns remainder)
loop