ROBOTC.net forums
http://robotc.net/forums/

Datalogging with EV3
http://robotc.net/forums/viewtopic.php?f=1&t=11600
Page 1 of 1

Author:  sawyerfs [ Fri Jun 26, 2015 6:23 pm ]
Post subject:  Datalogging with EV3

I need help with my program look for the*************** in the code

Code:
#pragma config(Sensor, S4,     distancereadings, sensorEV3_Ultrasonic)
#pragma config(Motor,  motorB,          ultrasonicdrive, tmotorEV3_Large, PIDControl, encoder)
#pragma config(Motor,  motorC,          targetdrive,   tmotorEV3_Large, PIDControl, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()

{







   // zero encoders motor b abd c

   resetMotorEncoder(motorB);

   resetMotorEncoder(motorC);

   sleep(3000);





   // setting to turn on rsdar sensor

   setMultipleMotors(5, motorB, motorC);

   moveMotorTarget(motorB , 10, 5);

   moveMotorTarget(motorC, 10, 5);

   sleep(3000);







   // turn on rsdar sensor


   //******** NEED TO TURN ON GETTING MOTOR BE ENCODER GETTING ANGLE AND WRITING TO FILE**********
   //******** NEED TO TURN ON ALTRASONIC SENSOR GETTING DISTANCE AND WRITING TO FILE**************

   //  first half cylcle

   setMultipleMotors(5,motorB,motorC);

   moveMotorTarget(motorB, 170, 5);

   moveMotorTarget(motorC, 170, 5);

   sleep(3000);





   // first full cycle

   setMultipleMotors(-5,motorB,motorC);

   moveMotorTarget(motorB, 160, -5);

   moveMotorTarget(motorC, 160, -5);

   sleep(3000);



   // second half cycle

   setMultipleMotors(5,motorB,motorC);

   moveMotorTarget(motorB, 160, 5);

   moveMotorTarget(motorC, 160, 5);

   sleep(3000);



   // sensond full cycle

   setMultipleMotors(-5,motorB,motorC);

   moveMotorTarget(motorB, 160, -5);

   moveMotorTarget(motorC, 160, -5);

   sleep(3000);



   // turn off radar sensor

   //******** NEED TO TURN OFF GETTING MOTOR BE ENCODER GETTING ANGLE AND WRITING TO FILE**********
   //******** NEED TO TURN OFF ALTRASONIC SENSOR GETTING DISTANCE AND WRITING TO FILE**************
[/color]


   // stop all motors

   stopMultipleMotors(motorB, motorC);

   sleep(3000);





}

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/