2020-07-13 (M) InCompass



Yesterday, I proved that I could establish a Bluetooth connection with the example code and my hardware. Today, I folded the example code into my InCompass program. I was able to print the heading to my phone's screen, but it was not easy to read. The formatting was twisted, it was slow, and there was a lag when it was time to turn off the vibrating motor.

Part of the formatting issue was that I could not send a newline (\n) character because that instructed the Bluetooth module to terminate the message. The best I could do was use tabs (\t) to make it fit my screen. Since I am using Adafruit's Bluefruit Connect app, I cannot force it to recognize newlines, and it is not the biggest problem.

I changed the frequency the program checked the IMU, and that sped up my refresh time for the readings, which also fixed my hanging buzzer. I took a screenshot of my heading readings while I spun the device. Everything tracked well.

All my testing on the wireless had the compass tethered to a computer, and the example code I lifted required a connection before I could move on. Startup checks were a bad situation because I needed the device to run as soon as it got power instead of waiting to see a data connection. I removed those checks from the setup, and it worked fine, even when I connected wirelessly later.

The last issue, which I haven't solved, is that I lose connection when I'm wearing the compass on my hat. From what I can tell looking at the signal strength, the module is only outputting the minimum power, and it's not strong enough to go through, or around, my enormous head.
Live readings from the orientation sensor

The rest of the posts for this project have been arranged by date.
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7

Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com

This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.

All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.

All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by  Brian McEvoy, cannot be used to claim property or assets.

Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.

This blog, including pictures and text, is copyright to Brian McEvoy.
2020-07-12

Comments