I try to use this code http://myrobotlab.org/service/Bno055 to query my bno055 device (I have 2 of them, both seem to be no worky?)

from the code in bno.begin I understand that we try to read register 0 of the device and that it should return the value x0A0. In the log of mrl I get for both of my devices the message "BNO055 sensor not found"

in serial monitor of my Arduino I see these 2 messages sent:
170 006 017 001 040 002 007 000
170 005 018 001 040 001 000 

and for both this answer:
170 023 001 021 100 101 118 105 099 101 032 100 111 101 115 032 110 111 116 032 101 120 105 115 116 

Any hint what else I could try?


5 years 10 months ago

Hi Juerg

The message that you get back is an error message:

170 = Start of message

023 = Lenght of message


021 = NAK ( Negative acknowledgement )

The rest of the messages is ascii values for the text "device does not exist"

So something is missging in the initiation from Bno055 => Arduino => MRLComm. Not sure yet what it is. 

I will try again with some of my i2c devices to try to figure out if it has to do with the i2c initiation or the attachInterruptPin, since that is a method that isn't used by other i2c devices.


Hi Juerg

The problem is that I can't debug the bno055, since I don't have one. WhenI try to test the Bno055 service with just the Arduino connected, I get exactly the same problem that you get. Then I tried with the MPU6050 and it works. So I'm suspecting that there is something that cause your bno055 to not answer on the initial request. So the problem seems to be that the Arduino don't find the bno055. 

Was the bno055 service working with any older version of MRL / MRLComm ?

Can you test with some other code, like the sketch you use for your self leveling hand to verify that everything is connected OK ?

Are you testing MRL with the same Arduino as you used for the hand or som other Arduino ?

If you use an Arduino Uno, the i2c pins are pin 4 ( SDA ) and 5 (SCL ).

If you use an Arduino Mega the i2c pins are 20 ( SDA ) and 21 (SCL). 



Thanks for your looking into this. Connected my bno055 to an arduino nano and it works.
Retrying with my arduino uno and mrl it logs "BNO055 sensor not found"

using this code:

arduino = Runtime.createAndStart("arduino","Arduino")
bno = Runtime.createAndStart("bno","Bno055")
# interrupt pin is attach to pin 8
bno.attachInterruptPin(arduino, 22)
#this method is called each time the sensor report an interrupt
def onInterrupt(data):
  event = bno.getOrientationEuler()
  print event.yaw
  print event.roll
  print event.pitch
  #be sure to reset the interrupt so we can get new one
print "vor bno.begin()"
if bno.begin():
  #manually set the calibration offset. you can get the data from getCalibrationOffset(Device) after a successful calibration
  bno.setCalibrationOffset(bno.Device.ACCELEROMETER, 0.40, 0.55, 0.20, bno.Unit.ACC_M_S2)
  bno.setCalibrationOffset(bno.Device.GYROSCOPE, -0.1875, -0.0625, 0.125, bno.Unit.ANGULAR_RATE_DPS)
  #enable Interrupt(type of interrupt, xAxis, yAxis, zAxis, threshold, duration) see BNO055 documentation for appropriate value
  bno.enableInterrupt(bno.InterruptType.ACC_AM, True, True, True, 30, 1)
  print "bno.begin, interrupt enabled"
  #bno.enableInterrupt(bno.InterruptType.GYR_AM, True, True, True, 0.5, 4)

Hi Juerg

I ordered a bno055 yesterday. The shipping has been confirmed today, so I think it will arrive tomorrow. 



5 years 9 months ago

In reply to by Mats

Hi Juerg

I received the bno055 today. I tested it with the code from the servicepage.


and it works. I don't get the error message that you get. I get a few other errors, related to publishPortNames and Oscope2, but the bno055 script is still worky.

Please check so that you have the MRLComm loaded from the same version of MRL as you run. And that you have selected the right type of board when you compile MRLComm. 

I used the latest version of mrl to test with. ( 2226 )

And check the electrical connections.

I used an Arduino Uno to test with.

 Arduino 5v to bno055 Vin

Gnd to Gnd

Sda ( pin 4) to Sda

Scl ( pin 5) to Scl

Pin 8 to int

Something must be different between the setup that I use, and your setup.

I hope that you can find out what the difference is. At least I have been able to verify that the bno055 service is working.




now as you mention interrupt I realize that with my trials with the Arduino and the bno055 in the hand I do not have the interrupt signal because I have only 4 cables connected and it's almost impossible to add another one through my modified wrist.

With my trials with the nano I was simply reading the values repeatedly and that does not require the interrupt signal.

Any chance I can use the bno055 service without having the interrupt line available?