This document contains a midterm for an engineering technology course at Morehead State University. The student, Shane Holbrook, learned how to group together two separate Arduino programs in this exercise. The student pasted in the report the programming code for an Arduino sketch that uses analogWrite to set the brightness of an LED connected to pin 3 based on the ASCII value of characters received through Serial.
This document contains a midterm for an engineering technology course at Morehead State University. The student, Shane Holbrook, learned how to group together two separate Arduino programs in this exercise. The student pasted in the report the programming code for an Arduino sketch that uses analogWrite to set the brightness of an LED connected to pin 3 based on the ASCII value of characters received through Serial.
This document contains a midterm for an engineering technology course at Morehead State University. The student, Shane Holbrook, learned how to group together two separate Arduino programs in this exercise. The student pasted in the report the programming code for an Arduino sketch that uses analogWrite to set the brightness of an LED connected to pin 3 based on the ASCII value of characters received through Serial.
MIDTERM Department of Applied Engineering and Technology College of Science and Technology Morehead State University Name: Shane Holbrook ID: m1104818
1. What commands or functions did you learn for Arduino?
As far as new commands these were simply reuses of previous labs, however we did learn how to group together the two separate programs in this exercise. 2. Paste in this report the programming code (do not attach files). // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 3; int i=0; char c; String a; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { //Serial.print("*"); while(Serial.available()) { c=Serial.read(); analogWrite (led, (c-48)*(255/9)); } delay (100); }