Start a new topic

YEI + UART communication with Arduino

Hello all!

Working on a project, and I'd like to read Euler angles from the YEI 3 Space using UART communication with an Arduino. 

Has anyone had success with this before? It seems simple enough, but I haven't been able to read any values back. Thanks so much in advance.

// YEI 3 Space Sensor

byte temp = 0;

byte inByte101 = 0;

byte inByte102 = 0;

byte inByte103 = 0;

float roll = 0; // create variables to store roll, pitch, yaw values

float pitch = 0;

float yaw = 0;

void setup() {

  Serial.begin(115200); // opens serial port, set baud rate to 57600 bps


void loop() {

  Serial.write(':1\n '); // colon = start of ASCII packet, Command Value, Command Data, End of packet

  temp =;


  if (temp == '0') // success = 0 in ASCII


      temp =; // read logical ID to see which sensor sent response

      temp =; // read data length

      if (temp != '0')


        inByte101 =;

        inByte102 =;

        inByte103 =;


        pitch = inByte101;

        yaw = inByte102;

        roll = inByte103;      


        Serial.print("PYR: ");


        Serial.print(" ");


        Serial.print(" ");








1 person has this question

Just following up to see if you had any luck with this.  We are having tremendous problems with Unity 5 and the YEI and think maybe we can circumvent these problems by reading the YEI through the arduino.  

For what its worth, I'm communicating to a Three Space USB on a com port using VS2017  Two commands in a batch message Euler (1) and Heading (35).  Serial communication got a little tricky but I seem to be getting reasonable results now.  

I just got a 3 Space and I am trying to do the same thing, and I'm having the same problem. Did you ever get this to work?


Login or Signup to post a comment