Day 20: the day of reckoning. As we began the class, we felt a eerie aura surround professor mason as he walked into the classroom grinning from ear to ear. He had a look in his eyes that would make any grown person tremble to the bone. His long strides felt thunderous as he made his way to the front of the classroom. He carried his head high and peaked out to the students as their lingered over their keyboards as they furiously try to finish whatever work they hadn't finished. It has become apparent that most students have succumbed to the ever dreary nearing end of the semester.
The lab began with introduction into interrupt timers. This neat little trick allow the Arduino to work almost simultaneous with multitasking. In essence, it effectively can weave tasks together. Using hardware interrupts are triggered depending on the state, or change of state, of an input I/O pin. this allows you to not have to poll the state of a button each time through the loop. hard ware interrupts are a trade off from polling input pins. to ensure the arduino is listening for the interrupt you must declare the variable with
volatile before the variable you want to watch. part of the homework was to implement a CdS sensor to immediately change an LED red when the sensor goes dark.
 |
| (the program for the interrupt lab) |
After the lab professor mason introduced us to the arrays of structures in C. Structures allow us to sort information in arrays with multiple variables and be able to access within the array for any structure. Again for homework we have to categorize hurricanes and be able to utilize the structures to input names, categories, and also dates for each storm.
 |
(given table of information for homework)
|
For homework we had to use this table to write a program that will be accessible for modifying and printing out different data sets.
No comments:
Post a Comment