Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.print("start");
}
void loop() {
if (Serial.available()) {
delay(100); //wait some time for the data to fully be read
lcd.clear();
while (Serial.available() > 0) {
char c = Serial.read();
lcd.write(c);
}
}
}
import serial
import time
s = serial.Serial(11, 9600) #port is 11 (for COM12, and baud rate is 9600
time.sleep(2) #wait for the Serial to initialize
s.write('Ready...')
while True:
str = raw_input('Enter text: ')
str = str.strip()
if str == 'exit' :
break
s.write(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment