HP E1429A Manuel d'utilisateur Page 42

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 420
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 41
length = (sizeof(set_commands) / sizeof(char*));
/* Execute each command using a loop */
for (loop = 0; loop < length; loop++)
{
IOOUTPUTS(ADDR, set_commands[loop], strlen(set_commands[loop]));
}
/* function call to check for digitizer configuration errors */
check_error("ad_conf");
}
/****************************************************************************/
void ad_fetch(void)
{
char go;
int i = 0, readings = 20;
float *rdgs;
/* dynamically allocate memory for readings */
rdgs = malloc(20 * sizeof(float));
/* fetch (retrieve) and print readings */
IOOUTPUTS(ADDR, "FETC1?", 6);
IOENTERA(ADDR, rdgs, &readings);
for (i = 0; i < readings; i++)
{
printf("\nReading %d = %f", i, *rdgs++);
}
free(rdgs - readings);
}
/****************************************************************************/
void rst_clr(void)
{
/* Reset and clear the digitizer */
Continued on Next Page
42 Getting Started Chapter 1
Vue de la page 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 419 420

Commentaires sur ces manuels

Pas de commentaire