Linear compass display to use with a MPU

Hello @philtkp,

This aligned the numbers to the scale:

    ahm.text(""+i*20, 20, 20*i -10, -150, 20); // draws left side degrees   
    ahm.text(""+i*20, -20, 20*i -10, 150, 20); // draws right  side degrees

I do not often use the text box so had to look that up!

Reference:
text() / Reference / Processing.org

This also worked on my end:

  pitch = ((int) map(mouseX, 00, width, -95,  95));
  pitch = constrain(pitch, -90, 90);
  
  int ym = 160-90; // y margin
  pitchDeg = (int) map(pitch, -90, 90, ym, 300- ym); // You want this mapped to the scale
  println(pitch, pitchDeg);
  
  ahm.noStroke();
  ahm.fill(0, 180, 255);//fills sky
  ahm.rect(0, 0, 300, 300);
  ahm.fill(95, 55, 40); //Fills ground
  
  ahm.rect(0, 0, 300, pitchDeg);

What data is being received for yaw, pitch and roll?
Helps on my end to simulate with mouse or otherwise.
I like to simulate!

Have fun!

:)