Lanner LVC-5770 Manual do Utilizador Página 41

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 49
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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) ;
}
}
Vista de página 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 47 48 49

Comentários a estes Manuais

Sem comentários