Lanner LVC-5770 Manuel d'utilisateur Page 41

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 49
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 40
41
Accessing the Digital Accelerometer
Appendix C
Embedded and Industrial Computing
while (1)
{
short x = (short) ich7_SM_ReadByte
(0x1d, DATAX1) << 8 | ich7_SM_ReadByte (0x1d,
DATAX0)<<0 ;
short y = (short) ich7_SM_ReadByte
(0x1d, DATAY1) << 8 | ich7_SM_ReadByte (0x1d,
DATAY0)<<0 ;
short z = (short) ich7_SM_ReadByte
(0x1d, DATAZ1) << 8 | ich7_SM_ReadByte (0x1d,
DATAZ0)<<0 ;
printf (“\rX=%.2f Y=%.2f Z=%.2f, ((float)
x)/2048,((float)y)/2048,((float)z)/2048) ;
}
}
Vue de la page 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 47 48 49

Commentaires sur ces manuels

Pas de commentaire