Week 20
This is the last week and there are no other assignments left, except for the final project.
I finish the debugging of the code for the GPS module and integrate it into the main program, which went well, once I had figured out how to run the gps encoding loop without interfering with the rest of the program.
Finally, there was a sunny day in Ísafjörður and I set up the machine in a sheltered place. Once the GPS signal was aquired the axes moved into position and the only thing I had to do, was to adjust the azimuth by rotating the machine and manually adjust the zenith offset value in the program to center the shadow on the sensor.
Then I set up a GoPro camera to record a timelapse video of the machine in action.
All went well for several hours, but at some point strange movements started to happen. I had to do some more debugging on the code and I found, that in two places in the code I had declared an int
variable to calculate the number of steps needed to reach the setpoint, but exceeded the variable size. Changed the declaration to long
did the trick.
In one other location, I had forgotten to change the unint16_t
variable to a double
, because I had to expect also negative values due to the zero offset.
Now it worked perfectly and I recorded another full 24 hour period to verify as well the return procedure from 359° to 1° azimuth angle.
The rest of this week was spent on finishing the documentation and presentation.