WEEKLY ASSIGNMENTS

output Divice

Following up on the same task for the input device to read the data on the LCD as an output device. The first issue was the Trimmer 10K OHM, nothing was showing on the screen and testing the board soldering especially the one for the Trimmer, it shows it has a good connection but when to try to tune it's not working at all.

As plan B to solve the issue is to use an outer Trimmer ) problem solved. 

// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 10, en = 8, d4 = 3, d5 = 2, d6 = 1, d7 = 0;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#define B 3750.0
#define R25 10000.0
float T;
float R, A;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("BOX temp :");
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);

A=analogRead(6);
A = 5*A/1024;
R = (A*10000.0)/(5.0-A);
T = 1.0/(log(R/R25)/B+(1/(25.0+273.15)))-273.15;
lcd.print(T);
}

 

To download the files, right click with the mouse and chose “save link as”