Touch 24 Challenge (cane)

The challenge is use a 3rd small motor to move a "cane" with a touch sensor on the end of the cane. This is a difficult challenge because of some practical engineering problems. The sensor only will depress when the force is directly along the axis of the switch. The force needed to make the large. Below you can see a suggested code. can you improve the code or the build of the robot to make this work better? THIS CODE WAS CREATED IN AN ATTEMPT TO SEE CODE CREATE BY ADAM STOCKHAUSEN AND THIS STUDENTS SEE THEIR CODE HERE.

Photo of code, see the full text code in the link below
Click here to see the code without comments to copy &paste. ==>
//just the code no comments
use Libraries.Robots.Lego.Motor//tim cane 1
use Libraries.Robots.Lego.TouchSensoruse Libraries.Robots.Lego.Buttonuse Libraries.Robots.Lego.SoundMotor motorTouchSensor touchButton buttonSound soundmotor:SetSpeed("A", 25)//cane motormotor:SetSpeed("B", 35)//drive motormotor:SetSpeed("C", 35)//drive motor//motor:SetSpeed("D", 10)//cane motorsound:SetVolume(25)repeat until touch:IsPressed()=true motor:RotateForward("B") motor:RotateForward("C") motor:RotateByDegrees("A",90) motor:Wait("A") motor:RotateByDegrees("A",-90) motor:Wait("A") sound:PlayTone(220,1000)endmotor:Stop("A")motor:Stop("B")motor:Stop("C")sound:Buzz()sound:BeepSequenceDown()
Sample Video appears to the right.Scroll down to see student summited videos


Student Videos

GITHUB BUTTON HERE