Pni RM3000-F Sensor Suite Manuel d'utilisateur Page 46

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 46
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 45
PNI Sensor Corporation Doc #1016102 r04
RM3000-f & RM2000-f Sensor Suite User Manual Page 46
/*************************************************************************
* Function Name : DataReady()
* Description : Check DRDY pin, return true if high, otherwise false.
* Input : None
* Output : None
* Return : true or false
*************************************************************************/
bool DataReady()
{
if (DRDY_PIN == 1)
return true;
else
return false;
}
/*************************************************************************
* Function Name : main()
* Description : Init 3D MagIC, set config, and read one measurement
* Input : None
* Output : None
* Return : None
*************************************************************************/
main()
{
//Init 3D MagIC
ThreeD_magic_init();
//The following is to get one measurement on X, Y and Z
//To get multiple measurement, repeat the following in a loop.
//Set up 3D MagIC to read one measurement on X, Y and Z axes
ThreeD_magic_setup();
//If data is not ready, wait here
while (DataReady() != true);
//Clock out (read) the measurement.
mag_sample();
}
Vue de la page 45
1 2 ... 41 42 43 44 45 46

Commentaires sur ces manuels

Pas de commentaire