Rover 1 w/ scoop

you can add

servo5 = 2250 - servo4

any place before

pulsout 15,servo5

yea jim, i found that, but it still doesn’t work, and the mask bits u have in the program im using contradict that tutorial :confused:

ok, it works, i just put one of the servos on a channel that was already programmed in, dont know y i didn’t just do that when andy told me to :blush:

all the same hoever, id like to get the shoulder buttons to work the scoop instead of R1, R2 and left and right on the D-pad :laughing:

well the scoop works good, ill need to put some counter weight in the back though, i tried to lift a shoe, got it up and went over a little bump and…it pulled an endo or backwards wheelie, also the test servos i was using, the little holes on them, they snapped, so my scoop is out of commission until i order the new servos and brackets off the main site

o yea, i thought of a new idea so i can dump :smiling_imp:
have like a servo or small acuactor on the side of the scoop with a rubber pad in the end of a rod, and when i want to dump, i just push the rubber pad into the ground and presto, the bucket stops and the rover gets lifted up and it dumps :open_mouth: , quite crude, i no, but it will definatley be safer than my other crazy silly idea

-Jared

Chunga, got any pics or videos of your project now that you have it working? huh huh huh? :laughing:

yea mike, ill see if i can some how strap the servo on, gimme like, 5 min, and ill have some for all u little kiddies

img485.imageshack.us/img485/9008/picture0066sk.th.jpg

img485.imageshack.us/img485/8117/picture0072ai.th.jpg

img361.imageshack.us/img361/3308/picture0082lu.th.jpg

Video: media.putfile.com/Scoop-in-action

there ya go guys, my finished but not finished rover

o yea, that substance im picking up is dog food :laughing:

Well they are both accurate. The tutorial is referring to which bit to mask. The program is referring to which bit value to mask. Bit 3 has a value of 8.

Bit = 0, 1, 2, 3
Value = 1, 2, 4, 8

No countradiction in operation, just in the numbering system used. They were done by different people.
I think technically Nathan used the wrong terminology. I will correct the program and put it on the website.

o0o0o, i see :open_mouth:

do you have the mask bit for the PS2 L1 and L2 buttons? and if you do, do you think you could give them to me? im very fuzzy on all of this

The corrected file is uploaded…
L1 is bit 2 and L2 is bit 0.

thanks so much Jim, ill let u know how it turns out

it is probably just my beginner programming skills, but i still can’t get the L1 and L2 buttons to work, all that happens is the servo that is on pin 15 goes all the way to the stop point

temp=button2 & 8 ' Filter out all but bit 3, R2. if temp=0 then ' If button is pressed then do the following. servo4 = servo4 - 25 ' Open the gripper. if servo4 < 750 then ' Hold the value to 750 minimum. servo4 = 750 endif endif temp=button2 & 2 ' Filter out all but bit 1, R1. if temp=0 then ' If button is pressed then do the following. servo4 = servo4 + 25 ' Close the gripper. if servo4 > 2250 then ' Hold the value to 2250 maximum. servo4 = 2250 endif endif

can i juse copy this part of the code and paste it, replace the mask bit for L1 and L2 and activate the pin 15 pulseout and all those other things? cause i tried that and it doesn’t work

Chunga, What micro are you using? the BS2 or the Atom?

oops… I made an error… I didn’t take into account the low-side offset of 750.

To properly invert servo4 to servo5

servo5 = 3000-servo4

im using the ATOM

temp=button2 & 8 ' Filter out all but bit 3, R2. if temp=0 then ' If button is pressed then do the following. servo5 = 3000 - servo4 ' Open the gripper. if servo5 < 750 then ' Hold the value to 750 minimum. servo5 = 3000 - servo4 endif endif temp=button2 & 2 ' Filter out all but bit 1, R1. if temp=0 then ' If button is pressed then do the following. servo5 = 3000 - servo4 ' Close the gripper. if servo4 > 2250 then ' Hold the value to 2250 maximum. servo5 = 3000 - servo4 endif endif

so is this is wat it should look like andy?

nope…

temp=button2 & 8            ' Filter out all but bit 3, R2. 
   if temp=0 then             ' If button is pressed then do the following. 
      servo4 = servo4 - 25    ' Open the gripper. 
      if servo4 < 750 then   ' Hold the value to 750 minimum. 
         servo4 = 750 
      endif 
   endif 
temp=button2 & 2            ' Filter out all but bit 1, R1. 
   if temp=0 then             ' If button is pressed then do the following. 
      servo4 = servo4 + 25   ' Close the gripper. 
      if servo4 > 2250 then   ' Hold the value to 2250 maximum. 
         servo4 = 2250 
      endif 
   endif

servo5 = 3000-servo4

thats it? i just plug

servo5 = 3000-servo4 in where i want the code to be?

yup!
The big if…then bit is about using the state of the buttons to increment or decrement on running position value for servo4.

We aren’t trying to do anything except for make a copy of whatever that value is, and invert it. So we let servo4 and its control logic behave just as before, then invert it over into servo5.

that’s it. :slight_smile: