Hey! Sorry that I didn’t write yesterday. Mentally I’ve spiralled downwards but it appears to only have been for three days!After today I’ll be back to normal for this season. Overall this is really good. This is only the third time that this sort of mental embargo has happened in this season.
Obviously, I didn’t get any schoolwork done and I’m too tired to really do any more things today. I’ll after I journal make my plan of attack for tomorrow and in the morning do what I needed to do tonight.
So here’s how my day went (it was fun by the way). We had a UMSAT’s meeting and learned about FreeRTOS and how to write tasks for it. We learned how to use mutex’s and how mutex’s actually work. However, using a mutex is a rather tedious process where you first check to see if the mutex variable isn’t equal to null, then you have the function block for a up to a predefined time to see if it can aquire the mutex. If it does, run one set of code that involves the protected data and then release the mutex, if it doesn’t do something else or wait. Then have the function go to sleep for a set period of time so that other functions can do work. However the only thing that really changes what was code was exactly run to upon acquisition of the mutex. So perhaps objectifying the acquisition of the mutex and pass in another object that contains the actual individual varying code per situation?
Anyway, I’m getting distracted.
So what we did was create three tasks that did the following every 1 second:
Add even number to array
Add odd number to array
Print out array.
I used mutex’s to all things, but really you only needed mutex whenever you’re modifying the array’s content, for reading you don’t need a mutex but it’s not wrong to use one.
In the late afternoon, I went to Across the Board and meet up with fellow scouts and we played different board games.
I’m hoping to get some SNAT development done in the coming days. However my priorities in descending order are:
Take care of myself mentally and physically
SNAT is very important but in order for me to do a good job, I need to make sure that everything else is going well.
PS, I made it to 150 day mark for Project Fox!