Monday, September 11, 2017

31 August '17- Start with Arduino Lab

Day 2 began with starting the lab on the arduino and bread board.  We began class by gathering the necessary equipment and installing of the arduino IDE onto our computers.  From there, we started a very simple program to make a single LED blink from the "Tools" drop down menu while hooking up the wire to the arduino. Once we were able to get a single blinking LED we expanded the program to include 4 LEDs and ultimately have them turn on in sequence to match the knight rider car.
(Lab #1: mimicking the knight rider car KITT with LEDs)
Once lecture began Professor Mason discussed priority of operators.  Just like in math, certain operators take precedence in C.  The following list shows which operators and in what order they should be read:


After going over these operators we were given a task of writing an equation into C syntax so we can solve for the area of a trapezoid.  Writing the C syntax for this equation led us to solving a improper polynomial fraction.  A short cut to input the long polynomial was to input the numerator and denominator separately then having the program divide the numerator by the denominator.  This technique would yield a few steps as opposed to inputing everything on one line but had fewer chances for mistakes.  
Near the end of class we began writing a program to compute the height of both male and female skeletal structures from given length of the humerus and femurs.  The program looked like this:

( Program for height calculations )
For homework we were required to finish the KITT LEDs and to modify the forensics program for outputting converted values of height and also to write a program to compute the molecular weights of certain amino acids.   



No comments:

Post a Comment