Tuesday, February 28, 2017

Spring 2017 Week 5

This week, I was able to meet up with the software/mobile application team in order to ask them for help with the code. As expected, instead of putting all the functions into a while loop that also contains the pathing, Tim and Johnny on the software/mobile application team suggested that I try a different method. Fortunately, they were kind enough to help me with that, and came up with the idea of using stack arrays instead. 

Therefore, I was able to learn both something new and useful because I was able to get the pathing code working as it did before, but this time by using stack arrays and without blocking other code. I would post the code onto here, but it would be extremely long because it involves a lot of nested functions in order to accommodate all 12 paths that are possible on the track. However, the code works by creating a stack array based on the path assigned to the pod car only if the stack array is empty and a path is given. Then the pod car would switch (or not switch) based on the values in the stack array (0's and 1's) and pop off the end value of the stack array every time the pod car detects a magnet. 

Now that we finally have a method of pathing without blocking all other code, we are ready to integrate all our functions together. Hopefully, there will be little to no issues during integration even though it is very unlikely.

Tuesday, February 21, 2017

Spring 2017 Week 4

This week has involved more coding on my part in regards to pathing. As mentioned last week, problems in integrating pathing with the rest of the code would most likely arise. Unfortunately, I was correct. I found that because I used a while loop in order to "hold on" to an array or to make sure the code stays on the array that we assign it, every other function does not run until the while loop has ran its course.

However, a solution may be to put the rest of the code that needs to run simultaneously into the while loop. This may sound very excessive, but this simply moves a majority of the code into the while loop. In addition, break commands can be used to break out of the while loop in cases where it is needed. For example, if the pod car is sent another path while in the middle of another path, the code would break out of the while loop and restart with the new path.

I am sure there is a better solution to this issue, but this is the only one that I could think of currently. In addition, I must consult with the software team to make sure that this would not cause any problems with their phone application. Depending on their answer, I can either advance with the solution I thought of or simply continue working on a different solution. Perhaps, I may be able to ask for help from Dr. Furman or the software team if it comes down to it.

Wednesday, February 15, 2017

Spring 2017 Week 3

This week, I worked more on the pathing code. Last week, I was able to get the code to switch the servo based on an array, but the code was very simple and all it did was get the servo to switch based on an array that it was assigned. Therefore, the code was not sufficient enough for pathing because it would simply switch the servo back and forth regardless of whether or not the hall effect sensor detects a magnet. Fortunately, I was able to make significant progress with the code this week. The code is now capable of taking any array or path and switch the servos based on whether or not the hall effect sensor detects a magnet.

As such, the next thing to worry about is getting this piece of code to work with all the other functioning code. Although I am positive that there will be some complications when trying to integrate the pathing code, I hope it is minimal.

Tuesday, February 7, 2017

Spring 2017 Week 2

In the last two weeks, I had met up with Luis, Chris, and the Software team in order to discuss what needs to be done this semester. Issues that may arise along the semester were also addressed. For example, it seems the positioning team is slightly behind so the vehicle controls and software must plan ahead in the case that the positioning team is unable to finish their work by Maker's Faire. 

For the most part, I will be assisting Luis and Chris with the code with regards to pathing and motor control. So far, I have been testing a psuedo code for pathing that utilizes arrays. Each path is assigned an array of 1's and 0's, which tells the pod car whether or not to switch when the "smart" sensor on the right side detects a magnet. 

Although my team and I only have to worry about writing the code for pathing and motor control, we must still finish in a timely fashion such that there will be enough time to resolve any issues that may arise. 


Tuesday, December 6, 2016

Fall 2016 Week 15

This week, Luis and I worked on compiling all the code that we have been working on together so that we could test the whole thing on our test bench. Although we got all parts of the code working together, the task proved to much more difficult than we thought it would be. For example, we had trouble getting the motors to run or stop when we wanted it to, or getting the RGB led to display the correct color depending on the pod car's status.

In addition to compiling the code for both the Arduino Uno and Micro, I also worked on the final presentation that we will be giving this upcoming Wednesday. We have finally finished the first half of our project and I am very excited to begin finishing up the rest of it next semester.


Wednesday, November 30, 2016

Week 14

This week, Luis, Chris and I began working on the code for both the Arduino Micro and Uno. For example  I wrote a program that would assign each RFID tag a station number and then send that station number to the computer or mobile app, depending on where the data is requested to. What the code basically does is read the RFID tag and then run the predetermined tag id through an if/else loop. If the RFID tag is one that is recognized, then the program would assign a station number to it. This could be done for as many RFID tags possible so long as the predetermined RFID tag id is known. I also weote a program that would send a True value if the ultrasonic sensor detects an object that is closer than 6 inches and False value if not.

This week was basically dedicated to writing code individually and then combining all the functions into one code. Altogether, I am confident we will develop a successful test bench for all our sensors and electronic parts by next week.

Friday, November 25, 2016

Week 13

Nothing new has really happened this week as I helped Luis go through the summer team's code some more in order to figure out which parts could be reused or modified. Since we were able to get I2C communication working between the Arduinos, the summer team's code was a lot easier to understand. For example, Luis and I could not figure out how the Arduino Uno was receiving data from the ultrasonic sensor, which was connected to the Arduino Micro, because they were not using I2C communication and only had one pin connected to one another.

Other than that, Luis and I tried to get as much done this week because our team will be unable to meet next week.