
Jayutmb

Ok I am sure someone has it listed in the threads ( cant find a specific one however)
I have hacked printer parts to make a periscope lifter for my R2,and I am using an EZB 360 servo to power it.. however I need to be able to limit the up and down pretty precisely when I have the ezb execute the lift and lower script... I am guessing the only way to do this would be limit switches at the top and bottom of the physical lifer mechanism.. If so can anyone guide me on how that would look like scripted ? And no I cant do a simple "timing" script as the timing varies and a half second off either way will break the lifter.
Thanks in advance
Maybe something like this?
#180 value may need to be 1 if the servo moves in the wrong direction and vice versa
Code:
Also I would advise you update to the new ezb4 x/2 board (if you haven't done so already) as it way faster at monitoring analog and digital reads. Not to mention other superior features as well...
I'm with Richard on recommending the /2 upgrade as well. I see you have a /1 comm board still. The /2 will provide increased communication speed (about 100 times faster): EZ-B v4/2 Comm Upgrade
You'll need to calibrate with the EZ-B since position 0 to position 180 won't indicate degrees anymore, just min and max.
Alan
I got lazy (still recovering from holidays ) and just put a limit switch at top and one at bottom. Now I have a peri up button and peri down with each respective button having a termination of script once digital port reads "true" and its working good for my lazy man fix
Perfectly legitimate solution. A lot of times a bunch of us will throw out a bunch of answers to a question just to show those coming later that there are multiple ways to do things. Some will work better in a situation than others. Limit switches are perfectly fine as long as you absolutely have the script that listens for them running any time the periscope is moving.
Alan