Pni RM3000-F Sensor Suite Instrukcja Użytkownika Strona 46

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 46
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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();
}
Przeglądanie stron 45
1 2 ... 41 42 43 44 45 46

Komentarze do niniejszej Instrukcji

Brak uwag