This past week, I was able to get I2C working. I was so relieved to see that I could send and receive information on both the Micro and the Uno. I became frustrated when I could not acquire or send the correct values. The best way to send and receive data between the two microcontrollers was to use an array of values where each placeholder in the array indicated some value such as distance, hall effect sensor reading, station ID reading, or LED status.
I was also able to define the LED states based on what state the Micro was receiving from the ultrasonic sensor and the values from the Uno. We had 5 predefined states. 0 for green (podcar in motion), 1 for red (podcar stopped due to collision prevention), 2 for blue (hall effect sensor reading), 3 for blinking red (kill switch activated), and 4 for red (arrived at station, podcar has stopped). For the kill switch, I was able to create a latching button using code to prevent us from buying latching buttons. Using this method, we would not have to hold the button to make the podcar stop in the case of an emergency. On the contrary, we cannot restart the system by pressing the button again. We would have to either implement a separate button to restart the system, reset the Micro or change the code so that it will wait a certain amount of time before resetting the system.
In the coming week, I will be preparing well for our last presentation so that we can show how much we have improved since the first presentation. Before this semester, I was terrible at presentations and used to be really scared to speak in public. Now I feel much more better about presenting and should not be a problem when we showcase our project next semester at Maker Faire and the Paseo Prototyping challenge. I will also be helping my team prepare the rough draft of our report as well as compiling the code for the Uno so that it can be included in the final draft of the report. I will also have the system running by next week so that we have solid evidence that our system will work and will look promising.
No comments:
Post a Comment