Lanner LVC-5770 Instrukcja Użytkownika Strona 41

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

Komentarze do niniejszej Instrukcji

Brak uwag