New to the game. ( few years ago a played around with a BOE-BOT but have forgotten nearly everything!)
1. Parallax BS2 BOE
3. Mercury Motor SM-42BYG011-25: 30 tooth GT-2 timing pulley; belt, same pulley on the "other end" 12" away.
4. Typical micro switches mounted on either side used to limit travel.
So far I have constructed a slider on on a discarded inkjet printer rail and can run the slider back and forth... no big deal.
Now I am attempting to incorporate left-right limit switches into the code. Can't even get to 1st base.
I am using model airplane servo wires/connectors (3 wire).
Q1: Here I have a 6" servo wire connected to pin9 (right), another to pin10 (left) and the 3rd to Vdd. But the 'other end' is not connected to anything. In the main loop, why does the pin display as '0' but if I even touch the insulation (or grasp a plastic connector) it will change to '1'.
Q2: If I connect that 6" servo extension to the servo wires that are connected to the left-right micro switches ('C' and 'NO') pin9 (the one I am testing with) ALWAYS shows as '1' yet both micro switches are open.
I have more years of experience than I care to admit with automotive DC electrics (no need to ask about hooking up and testing the micro-switches, etc) but not much at all with this stuff. There are some other random issues with pin state but I will leave than for another discussion.
Any advice greatly appreciated.