Windows Release 2016.01.30.00



- MPU9150 (All-In-One) sensor update

  Get EZ-Builder for Windows


wooHoo! Compass and temperature both working. compass still a little jumpy, but hovers right around the actual direction it is pointing. I can definitely make this work.

Now I need to start working on how to script 45 and 90 degree turns. Easy except where I cross the 360/0 boundary. Calculating the heading is easy, but measuring that I have reached it I need to think about a bit.



This may help @Alan... I wrote it years ago for a robot that followed a GPS to a waypoint... Maybe it might help you? Or not LOL Smile I cleaned it up for ez builder but it may be of no use with the compass. Maybe you can adapt it somehow?...


# $wp1 = desired heading
# $tr1 = current heading
# twp = number of degrees to rotate

$wp1 = 90
$tr1 = $CompassHeading

repeatUntil($wp1 = $tr1)
$tr1 = $CompassHeading #update the compass
IF($wp1 < $tr1) #calculate the shortest direction of turn to waypoint bearing

IF($twp <= 180) # 'move right
right() # more code may be needed here
ELSE # 'move left
left() # more code may be needed here


Thanks @Richard. This is very similar to what I was thinking of doing, but has triggered some additional ideas.



Hi Richard,
This is similar to my need also. Thanks for posting it.

Hi Alan,
I am interested in seeing your ideas also, once developed.

Ron R


Hello All,

I purchased an mpu9150 on line and it appears to be working per the lattest tutorial, etc. I have an adventure bot and not sure how to mount and calibrate it on the robot? I have included a photo of how I have it mounted and was wondering if this will work for proper compass readings. Also I watched video on how to calibrate an iphone compass but not sure how this relates to my adventure bot and where the sensor board is located. Maybe someone with an adventure bot or other robot with this sensor board may have some ideas or a video?
User-inserted image

Thanks much ! Rick
Smile Smile Smile


That is a good location for it. I had mounted mine on the front, above the wheel servos, and the motors generate enough magnetic interference that it is not as accurate as it could be. I think I'll try moving to the back like this as well.

To calibrate, you do it just like an iPhone or Android phone. With the compass control active, pick up the robot and move in a figure-eight pattern. (this is going to be tricky when I mount on my robot dog that is going to weigh ~90 lbs. I may need a different solution by the time I get it built...).



Hello Alan,

Thanks for the reply ! I've searched on you tube and have found several methods to calibrate the iphone compass.

With the compass in the location it is at how do I initially hold it when starting the calibration? Does it need to be held flat with the sensor board to the right and would north be zero degrees once it is calibrated properly? Thanks much Alan ! Rick Smile Smile Smile


It doesn't matter how you hold it to start. It is the figure 8 movement that matters.

Yes, 0 degrees will be north when you are done.



I assume the figure 8 needs to be done on the Horizontal plain?