2020-06-26 (F) Weekly Summary

I started mapping out the sensor data, and I started with the Get X and Get Y abilities built into the Blockly programming portal. By themselves, the functions tell me which way the device is oriented, but there is no information here regarding twisting about the Z-axis which is what I need for the first step in my haptic compass.
Get X and Get Y were my first subjects

 The number I was concerned with was the Z-Gyro reading, which is what told me the IMU was turning clockwise or counter-clockwise (anti-clockwise) when viewing the screen. It was tricky to see the changes because the value reflected rotational speed. I probably could have gotten a good idea if I sat in a chair and spun around.
Resting numbers and Min/Max

To calculate position from speed, I had to track time. My first program proved the idea was possible because I could spin myself, and the reading would change, then change back when I turned the other way. There were a lot of erratic readings, but I was on the right track.
First attempt at direction tracking

Getting rid of the erroneous readings was going to take some work. I spent a day thinking about how to do it and decided that I would monitor the accelerometers. When the device was stationary, I would take gyroscope readings, which should be at zero, and use those numbers to counteract the unwanted variances.
Pseudo code sketch

My plan failed because I forgot that the accelerometers were there for detecting inclination, not motion. I would have to rely on a manual method for zeroing out the gyroscope readings.
Automatic, but failed zeroing routine

Pressing the primary button will initiate a function to zero out the gyroscope readings, but it waits one second for the device to settle. I recorded the values into a list, but when I asked for the list's average, I got an error. It worked better when I asked for a sum and divided, but I couldn't even print values from the list, so I think there is something about them I don't understand. I assume they work like arrays.
Manual calibration routine

The rest of the summary posts have been arranged by date.
First time here?

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.

Comments