Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

ITMT 488

Flex. Manufacturing Engineering Tech


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);
}

You might also like