|
You can use the p1_y, p2_y values in the default code. The SEROUT command maps the p1_y, p2_y values to the actual PWM outputs.
As for the code above. It sounds a lot like a wiring problem.
Remember -
Blue/Brown = Power and Ground
White/Black = Inputs
Pick either White or Black and wire it up. DONT USE BOTH!!!!
White-wired sensors return a 1 if they detect something and a 0 if the detect nothing. Black-wired sensors are exactly opposite.
The code would be correct for a white-wired sensor on rc_sw15 + rc_sw16.
|