diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-27 01:33:53 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-27 01:33:53 +0100 |
commit | 5f17327c0d9d5bd2da69139a324434d461519403 (patch) | |
tree | 8d16d0a40decf1c6625756f593f6c4698b8d9a6f /facetracknoir/clientfiles/HAT_100/README | |
parent | 324f47f0740dda04cc37674d817b1bfcd1a7ec48 (diff) |
initial import of hatire by Furax49
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'facetracknoir/clientfiles/HAT_100/README')
-rw-r--r-- | facetracknoir/clientfiles/HAT_100/README | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/facetracknoir/clientfiles/HAT_100/README b/facetracknoir/clientfiles/HAT_100/README new file mode 100644 index 00000000..1e4f2926 --- /dev/null +++ b/facetracknoir/clientfiles/HAT_100/README @@ -0,0 +1,35 @@ + Frame exchange protocol fixed size of 30 bytes like this : + + typedef struct { + int16_t Begin ; // 2 Debut + uint16_t Cpt ; // 2 Compteur trame or Code + float gyro[3]; // 12 [Y, P, R] gyro + float acc[3]; // 12 [x, y, z] Acc + int16_t End ; // 2 Fin +} _hatire; +_hat hat; + + +void setup() { + Serial.begin(115200); + // header frame + hatire.Begin=0xAAAA; + // Frame Number or Error code + hat.Cpt=0; + // footer frame + hat.End=0x5555; +} + + + void loop() { + mpu.dmpGetYawPitchRoll(hatire.gyro); + mpu.dmpAccXYZ(hatire.acc); + // Send Trame to HATIRE PC + Serial.write((byte*)&hatire,30); + hatire.Cpt++; + if (hatire.Cpt>999) { + hatire.Cpt=0; + } + delay(1); +} + |