4 ms·
He even ported his tcc compiler to it. Brilliant! I wonder if we could tap into the device file system. Given the increasing number of sensors in mobile phones
by wicknicks 15y ago
He even ported his tcc compiler to it. Brilliant! I wonder if we could tap into the device file system. Given the increasing number of sensors in mobile phones and no standard way of reading from them, a linux like interface would be awesome.
int main (int argc, char **argv)
{
int f = open("/dev/android_accelerometer");
double ax = f.read();
double ay = f.read();
double az = f.read();
printf ("Current 3d acceleration: %d %d %d", ax, ay, az);
return 0;
}