Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma config(Sensor, dgtl1, up, sensorTouch)
- #pragma config(Sensor, dgtl2, down, sensorTouch)
- #pragma config(Sensor, dgtl3, uplimit, sensorTouch)
- #pragma config(Sensor, dgtl4, downlimit, sensorTouch)
- #pragma config(Motor, port2, booom, tmotorServoContinuousRotation, openLoop)
- //++++++++++++++++++++++++++++++++++++++++ MAIN +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- task main()
- {
- while(true){
- if ( SensorValue[uplimit] == 1){
- motor[booom] = -50;
- }else if ( SensorValue[downlimit] == 1){
- motor[booom] = 50;
- }else{
- }
- }
- }
- //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement