Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Kiihtyvyysanturin

...

käyttöönotto

...

Tämän

...

esimerkin

...

avulla

...

saat

...

näkyviin

...

robotin

...

kiihtyvyyden

...

kolmella

...

eri

...

akselilla

...

(X,

...

Y,

...

Z).

{
Code Block
}
#pragma config(Sensor, S1,     ACCELOMETER,           sensorI2CCustom)


#include "drivers/HTAC-driver.h" // download and include drivers

task main () {
  int x_axis = 0;
  int y_axis = 0;
  int z_axis = 0;

  while (true) {
    eraseDisplay();

    // Read all of the axes at once
     HTACreadAllAxes(ACCELOMETER, x_axis, y_axis, z_axis);

    wait1Msec(100);
  }
}
{code}