Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2, dout = 13, interval = 5000, Rtop = 20000, A = 0.001125308852122, B = 0.000234711863267, C = 0.000000085663516;
- LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
- void setup() {
- // put your setup code here, to run once:
- digitalWrite(dout, HIGH);
- lcd.begin(16, 2);
- // Print a message to the LCD.
- lcd.print("hello, world!");
- }
- void loop() {
- // put your main code here, to run repeatedly:
- lcd.setCursor(0, 1);
- int diff = analogRead(2);
- int Rbot = diff / 5 * Rtop * (1 / (1 - (diff / 5)));
- int temp = 1 / (A + B * log(Rbot) + C * pow(log(Rbot), 3));
- // print the number of seconds since reset:
- lcd.print(temp);
- delay(5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement