View unanswered posts | View active topics It is currently Thu Jul 19, 2018 7:24 pm






Reply to topic  [ 1 post ] 
Virtual Worlds works wrong with EV3. How to move straight? 
Author Message
Rookie

Joined: Sat Mar 19, 2016 5:11 pm
Posts: 1
Post Virtual Worlds works wrong with EV3. How to move straight?
I've created simple program to test Ev3 virtual worlds.
As they said in documentation:
Code:
// This makes it go straight (both get equal amount of power)
   // for 1000 encoder counts at power level 50
   setMotorSyncEncoder(left, right, 0, 1000, 50);
   sleep(1500);


But robot doesn't move straight. It turns... I've tried different nTurnRatios? nothing helps..

Code:
#pragma config(Sensor, S1,     touchSensor,    sensorEV3_Touch)
#pragma config(Sensor, S2,     gyroSensor,     sensorEV3_Gyro, modeEV3Gyro_RateAndAngle)
#pragma config(Sensor, S3,     colorSensor,    sensorEV3_Color, modeEV3Color_Color)
#pragma config(Sensor, S4,     sonarSensor,    sensorEV3_Ultrasonic)
#pragma config(Motor,  motorA,          armMotor,      tmotorEV3_Large, PIDControl, encoder)
#pragma config(Motor,  motorB,          leftMotor,     tmotorEV3_Medium, PIDControl, driveLeft, encoder)
#pragma config(Motor,  motorC,          rightMotor,    tmotorEV3_Medium, PIDControl, driveRight, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
   for (;;){
      setMotorSyncEncoder(motorC,motorB, 0, 200,50);
      sleep(500);
   }
}


Sat Mar 19, 2016 5:25 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.