CanServo/POSITION-32

From HITEC_HELP
Revision as of 16:32, 29 September 2021 by Choiyh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Servo Position = (signed)TURN x 16384 + (unsigned)POSITION

2 Registers

  • Low 2 byte = 0x1A
    • Value = Low Word of Position
  • High 2 byte = 0x1C
    • Value = High Word of Position
// Host: C style:
int16_t H = (int16_t) read_register(0x1C);
uint16_t L = (uint16_t) read_register(0x1A);
int32_t get_position = H x 65536 + L;