View unanswered posts | View active topics It is currently Thu Apr 26, 2018 11:30 am






Reply to topic  [ 3 posts ] 
it is possible to calibrate the gyro sensor? 
Author Message
Rookie

Joined: Sat Aug 01, 2015 11:17 am
Posts: 12
Post it is possible to calibrate the gyro sensor?
it is possible to calibrate the gyro sensor connected to multiplexer?


Tue Sep 20, 2016 3:18 pm
Profile
Expert

Joined: Thu Dec 01, 2011 12:07 am
Posts: 151
Post Re: it is possible to calibrate the gyro sensor?
Please specify:
1) Which Gyro
2) Which Mindstorms CPU
3) Which multiplexor


Tue Sep 27, 2016 12:36 pm
Profile
Rookie

Joined: Sat Aug 01, 2015 11:17 am
Posts: 12
Post Re: it is possible to calibrate the gyro sensor?
EV3 Sensor Multiplexer for EV3 or NXT:http://www.mindsensors.com/ev3-and-nxt/23-ev3-sensor-multiplexer-for-ev3-or-nxt
Sensor Gyro : https://shop.lego.com/en-US/EV3-Gyro-Sensor-45505
I am using the code below, this correct? The sensor does not work properly in this way ....

Code:
#pragma config(Sensor, S1,     luz1,           sensorEV3_Color)
#pragma config(Sensor, S2,     luz2,           sensorEV3_Color)
#pragma config(Sensor, S3,     multi,          sensorEV3_Gyro, modeEV3Gyro_RateAndAngle)
#pragma config(Sensor, S4,     dis2,           sensorEV3_GenericI2C)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//


int Sensor3=0,Sensor7,Sensor8;


#include "mindsensors-ev3smux.h";
tMSEV3 muxedSensor[3];

tEV3SensorTypeMode typeMode[3] = {infraRedProximity, gyroAngle,sonarCM};


task main(){

   eraseDisplay();
initSensor(&muxedSensor[0], msensor_S4_1, typeMode[0]);
initSensor(&muxedSensor[1], msensor_S4_2, typeMode[1]);
   /**/
initSensor(&muxedSensor[2], msensor_S4_3, typeMode[2]);


   while(true){
      readSensor(&muxedSensor[0]);

      readSensor(&muxedSensor[1]);

      readSensor(&muxedSensor[2]);




      Sensor3=muxedSensor[0].distance;
      Sensor7= (muxedSensor[1].angle%360);
      Sensor8=muxedSensor[2].distance/10;


      displayTextLine(8,"%d  %d %d %d",Sensor3,Sensor8,(Sensor7));

      sleep(100);
   }
}


Tue Sep 27, 2016 8:40 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

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.