Wednesday, January 25, 2012

Lab 1

Lab #1

FiRST PROGRAM

· If you change “setup” to “Setup,” the program won’t compile. SYNTAX MATTERS!

· Serial.println makes the text go on a new line, one below another.

· Serial.begin à serial.begin: syntax matters!

· Don’t leave off a “;” at the end of the line.

VARIABLES AND NUMBERS

The following is a simple loop that continuously adds and x changes at each iteration:

If you try a large number, it adds more quickly:

MAKE AN LED FLASH (BLINK)

Here's a video of our flashing light:

LED FLASHES AT A FASTER AND FASTER RATE

MAKE 2 LEDS FLASH IN ALTERNATION

PUSH BUTTON AND READ ITS STATE

MONITOR THE OPERATION OF A PUSHBUTTON SO THAT WHEN IT IS PRESSED, SOMETHING IS WRITTEN ON THE SERIAL MONITOR


WHEN THE BUTTON IS PUSHED, AN LED GOES ON.

Here's a picture of what the circuit looks like:


USING THE LCD

Write a program that writes "Hello BE470 Student!" to the LCD, wait two seconds, erases the LCDs, counts down, and writes blast off!

1st Medical Device

1a.

1b.

MEDICAL DEVICES