Close

Teensy and the GY-91

A project log for Quick Draw Motion Tracking

See if I can't make a 9/10 DOF sensor for a buddy's larger project

toddTodd 12/22/2017 at 20:430 Comments

Adding the GY-91 was easy, but oddly (read: my incomplete understanding of C), it would reports type conversion errors on:

int16_t mag_max[3]  = {0x8000, 0x8000, 0x8000},

 So after some research I changed it to:

int16_t mag_max[3]  = {-32768, -32768, -32768},

And it compiled.

Then at then some point it starting giving me errors "undefined reference to `_kill`" and similar, and wouldn't compile, so after some Googling, I added this to my .ino:

extern "C" {
  int _getpid() { return -1;}
  int _kill(int pid, int sig) { return -1; }
  int _write() {return -1;}
}

 The LCD display lines are:

  1. acceleration values in milli-G's
  2. gyro values in degree/sec
  3. mag values in degree/sec
  4. yaw pitch roll

Discussions