  * @param num the integer which should be converted to hexa
  * @param ch a pointer to the string being built
  */
-void uint8_to_hexstr(uint8_t num, char *ch)
-{
-	ch[0] = TO_HEX(((num & 0xF0) >> 4));
-	ch[1] = TO_HEX((num & 0x0F));
+void uint16_to_hexstr(uint16_t num, char *ch)
+{
+	// most significant nibble is always 0
+	// ch[0] = TO_HEX(((num & 0xF000) >> 12));
+	ch[0] = TO_HEX(((num & 0x0F00) >> 8));
+	ch[1] = TO_HEX(((num & 0x00F0) >> 4));
+	ch[2] = TO_HEX((num & 0x000F));
 }
 
 /**

 * @param the array representing posture
 * @param the size of the array
 */
void reset_posture(uint8_t *posture, uint8_t posture_size)
{
	for (int i = 0; i < posture_size; i++) {
		posture[i] = 0;

 * one single packet.
 *
 * A sample packet has the form:
 * |3|015|003|000|006|013|014|00a|02e|000|000|001|
 *
 * size of the array being transmitted depends on the number of regions
 * on the recognition sphere which is calculated based on THETA_REGIONS
