ITMT 488 Flex. Manufacturing Engineering Tech Lab Report 3

You might also like

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

ITMT 488

Flex. Manufacturing Engineering Tech


Lab Report 3
Department of Applied Engineering and Technology
College of Science and Technology
Morehead State University
Describe the purpose of the laboratory (at least 50 words):
The purpose of this laboratory experiment is to understand just how complex
these Arduino boards really are. By simply using breadboards, the Arduino
boards, wires, a resistor, and an LED light. We are able to program a code in
which we can communicate between two computers via two separate
Arduinos wired together acting as a communications port between the two
PCs.

1. What commands or functions did you learn for Arduino?


There are several instances that I am familiar with in this code such as the
printIn, void loops, the while and for loops as well. I did learn new code
parameters such as the Serial.begain(9600), and the digital write code as well.
2. Paste in this report the programming code (do not attach files).

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
#define LED 2
void setup() {
pinMode(LED, OUTPUT);
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Goodnight moon!");
mySerial.begin(4800);
mySerial.println("Hello, world?");

}
void loop() {
if (mySerial.available()) {
Serial.write(mySerial.read());
digitalWrite(LED, HIGH);
}
if (Serial.available()) {
mySerial.write(Serial.read());
digitalWrite(LED, LOW);
}
}

You might also like