It was a really nice Sunday. I gave my self some time to do a reset for the week ahead. This will be the first week in which I will be blogging daily and working to make the most of each day. Aside from the reset, I continued working on the code responsible for making the motors within Gambit function. After banging my head against the desk for a few hours I ultimately got it to work. For now.
I also got to thinking about the many projects I want to complete over the next 60 days. I'll probably share them with you all in the coming days, so be ready. I already know the list will grow as time passes, but that's a problem for another day. Nevertheless, I am scared I will not be able to accomplish as much as I want to over this endeavor after dealing with the Gambit problem over the last day and a half. I am sure it's a learning curve thing, but only time will tell. I just have to keep at it, and don't beat myself up too much over the problems I am sure to face as embark on this journey of learning.
Another good day in the books. Excited for what tomorrow has in store.
A '\n' and an equal sign. A '\n' and an equal sign. A '\n' and an equal sign is what has caused me to spend many many hours of my day looking at code that would not work.
So looking at what I was trying to accomplish again. I set out to create a script that allowed me to enter a direction (up, down, left, right), and a number coorelating to the amount of rotations the motor should turn. With this input, the script would then turn the input into respective moves made by the motor. Depending on the direction, motor one, two, or both would turn clockwise or counter-clockwise.
My script seemed to be working fine as I would typically ask it to turn left and provide 20 rotations. However, on the second time, no matter what direction I asked it to go, if I asked it to turn 20 rotations, the motors would not react. Also, it would always make the motors turn counter clockwise. Something that should only happen when I type 'left'. In regards to the first problem, I came to find out that the motors stored the position throughout the script and was absolute and not relative. What I mean by this is that like my good friend Jonathan put it, if you ask a football player to go to the 20 yard line, and then ask it again, it will not move. However, if it was relative, you would just ask the football to move 20 yards each turn and ultimately, the football player would reach the destination you actually want them to.
I was able to resolve this reltatively easily by just setting the position of the motor to 0 after each iteration. The \n problem was a different story. As mentioned, prior to inputting the revolutions, I needed to input a direction. As I also mentioned, I would always start by entering left into the serial monitor. Always. What I came to find out was that the reason the motors would always turn counter clockwise was because it was the first if statement I had within the script. Within this if statement, I used a singular equal sign instead of two. This single equal sign would always have its condition met as long as I entered something to the serial monitor making the motors turn counter-clockwise. Always making them turn counter-clockwise. I then added the second equal sign which still did not resolve my issue. Now no condition was being met across the four directions I had in place. It wasn't until I entered a '\n' at the end the directions within the condition of the if statements that it worked flawlessly. A '\n' typically notes the creation of a new line, or hitting enter on the keyboard. Which is something I had to do each time I input something within the serial monitor. This '\n' and equal sign caused me much pain over the hours that I looked over the code. But boy when I say there was no greater feeling to seeing the motors turn as I had intended, I mean it.
With the help of the co-chair for RLDC, Brenda, the metrics pertaining to the conference were provided and input within the document that I need to provide our recommenders with. I have it scheduled to be sent out tomorrow morning, and I truly hope they find the metrics impressive, because what that team was able to accomplish was a conference worth remembering.
Have you ever tried air fried 'boiled' eggs? Well you should. Heat some up at 270 degrees farenheit for about 15 minutes and you will have yourself a nice treat. Definetely going to be using this more often than you know. Might have to watch my cholesterol though...
Today, I journaled, stretched (quite intensely), read, tracked my caloric intake, and worked on at least one of my personal projects. Today was a good day.
What I am thankful for
I am thankful for that special someone who I am honored to have spent the last nine months with. Thank you for putting up with me.