• BME 200

Instructions

Write your answers to the questions below in an electronic document of your choice (Word, Pages, Google Docs, etc.). Convert this document to a PDF before submitting to Blackboard. Include all group member names.

Problems

1. Copy and paste the code in the “Writing your first program” section into a sketch. Run the progam with while(1) in the program and look at the Serial Monitor. Then, clear the output of the Serial Monitor and comment out while(1) in the code. Re-upload the code and run again. How is the output different in Serial Monitor? Why did your change have this effect? Hint: check the language reference.

2. With while(1) commented out and your programming running, choose Tools->Serial Plotter. What does this do? Make sure the baud (the number in Serial.begin(XXXX)) and in Serial Plotter are the same.

3. Write a simple program that:

a. Flashes the on-board LED 10 times with a delay of 10 ms, 100 ms, and then 1000 ms.
b. Prints the current delay in the Serial Monitor.
d. Uses for loops to flash the LED 10 times.
4. Write a program that blinks the on-board LED 10 times, but this time the delay starts at 100 ms and grows by 100 ms each blink. If the delay is > 400 ms, then your program should print the delay to the Serial Monitor. (See language reference on how to use if statements). Include your code in the document. Be prepared to demonstrate your program in class.