dumped all my old arduino stuff in here.
This commit is contained in:
parent
8cc6f23f59
commit
8f8959b76f
76 changed files with 8127 additions and 2 deletions
21
lm35/lm35.ino
Normal file
21
lm35/lm35.ino
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <LiquidCrystal.h>
|
||||
|
||||
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
|
||||
|
||||
float temp;
|
||||
int tempPin = 0;
|
||||
|
||||
void setup() {
|
||||
lcd.begin(16, 2);
|
||||
lcd.print("Temperature:");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
temp = analogRead(tempPin);
|
||||
temp = temp * 0.48828125;
|
||||
//temp = (5.0 * temp * 100.0)/1024.0;
|
||||
lcd.setCursor(0, 1);
|
||||
lcd.print(temp);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue