-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCLIF-Arduino.ino
More file actions
43 lines (31 loc) · 865 Bytes
/
CLIF-Arduino.ino
File metadata and controls
43 lines (31 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x20 for a 16 chars and 2 line display
SoftwareSerial HC06(3, 2); //HC06-TX Pin 3, HC06-RX to Arduino Pin 2
//int LED = 12; //Use whatever pins you want
//int LDR = A0; //Sensor Pin to Analog A0
String input;
char val;
int ledpin = 8;
void setup() {
pinMode(ledpin, OUTPUT);
//initialize lcd screen
lcd.init();
// turn on the backlight
lcd.backlight();
// HC06.begin(9600); //Baudrate 9600 , Choose your own baudrate
Serial.begin(9600);
// pinMode(LED, OUTPUT);
//pinMode(LDR, INPUT);
}
void loop() {
lcd.setCursor(0,0);
// lcd.clear();
while(Serial.available()>0){
input = Serial.readStringUntil('\n');
lcd.print(input);
Serial.print(input);
//digitalWrite(8, HIGH);
}
}