I am using your BNO055 with the sketch restore_offsets and the arduino UNO.This is working fine.
My plan is to build an autopilot for my boat so I need to read the course in a variable. That is where I fail.
I create a float course and assign that to event.orientation.x. Serial.print(course) gives me 0 while writing to LCD
with lcd.print(event.orientation.x,0) gives correct number.
I sent part of the code.
Thank you very much for any respons.
BNO055
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BNO055
Please post your entire sketch, and please post the Serial Monitor output from the sketch
- hans1
- Posts: 3
- Joined: Sat Mar 05, 2016 11:33 am
Re: BNO055
Thank you for your respons, I posted the complete sketch but I still have to find out how to include the monitor output as that is continuously going on.
I feel not too bright.
I feel not too bright.
- Attachments
-
- restore_offsets-160306a.zip
- (2.62 KiB) Downloaded 292 times
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BNO055
Un-check the Auto Scroll box in the lower left of the Serial Monitor window. Then run your sketch
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: BNO055
I don't know how this statement compiles successfully. But it's wrong.
You want to do this:
Code: Select all
mv=(event.orientation.x,0);
Code: Select all
sensors_event_t event;
bno.getEvent(&event);
float mv;// Also tried double and int
mv = event.orientation.x;
/* Display the floating point data */
Serial.print("koers: ");
// Serial.print((float)event.orientation.x,0);
Serial.print(mv, 4);
- hans1
- Posts: 3
- Joined: Sat Mar 05, 2016 11:33 am
Re: BNO055
It is allright now, thank you very much.
In case you are still interesred in the output, I sent it hereby.
In case you are still interesred in the output, I sent it hereby.
- Attachments
-
- putty.log
- (5.13 KiB) Downloaded 391 times
Please be positive and constructive with your questions and comments.