Monday, May 29, 2017

Day 12

Topics

  • Lecture Notes
  • Eye Squared See
  • Gradient Programming
Lecture Notes


Eye Squared See
   The setup for this program was the same the I2C device with a few lines to take care of the speaker. One part that did need to change was the tone, who's frequence had to scale the F values in order to tell the difference from one degree to another. 



Gradient Programming
   I ended up seperating the two functions of finding peaks and valleys. I am sure there is a more effectient way to do this all with nested for loops but I will have to spend a little more time with this to work of the logic of that. I also decided to leave all the parts on one page and comment out the funtionallity while sperating the parts by commenting extensivly. This way I have an entire history of the iterations to compare easily.

   The lowest value gave me some pause. I thought for a little while and realized that I could set the lowest point as staring as the heighest point instead because I couldn't start with 0 and I didn't want to assume a maximum height. This way I can treat it as a general 7 by 7 array.

   I calculated the position from the bottom by using the distance formula with my x-naught/y-naught positions being the array elements of [6][0]

   These are the results at each stage of my programming. 











No comments:

Post a Comment