by AirGears » Mon 17. Mar 2014, 20:53
const int ledPin = 13;
int incomingByte;
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
//general setup for inputs and variables
void setup() {
lcd.begin(16, 2);//begins use of LCD screen
lcd.clear();//clears LCD screen prior to program that way there is no old information on it
Serial.begin(9600);//begins serial communication with the computer
}
void loop() {
if (Serial.available() > 0) {//if serial communication is available:
incomingByte = Serial.read();//read what is being sent through serial and save it as variable incomingByte
lcd.write(incomingByte);//write incomingByte on LCD screen
}
if (millis() >5000) {
lcd.clear();//clear LCD screen every 5 seconds to allow new information to display
}
}
that is my code for Arduino
and this should be a picture of X-Sim as it is, if it displays, if not ill have to find another way to make it do so
- Attachments
-

Capture.PNG (230 KiB) Viewed 2883 times