What the heck?!

Since I have the star sensor working, and it’s a default behavior, I started to work on a small command set that you could use to set the LEDs on the star sensor or change the score. I was running into a very strange problem where I was sending data to the star sensor over I to see, but it wouldn’t show up. I would send the data and I would miss values that I was inputting the first value that was coming and was wrong went back to my other projects like the MacSAO, where the data was coming in as I was expecting.

It was the same library so I didn’t understand why the data coming in would behave any differently after hours of testing and evaluating I finally dug into the library and how it handles input.

There online 145 of the MacSAO version of the library was commented out the code that made the first byte of the I2C message an offset value for the incoming array data. Back in the StarSensor SAO that line was reading and moving the data unexpectedly. If for no other reason I am writing this down in this log so that next year when I try to do something similar, I will not have trouble getting it to behave itself.

Anyway. It’s working now.