0% found this document useful (0 votes)
35 views2 pages

Codingku

The document contains code for a program that uses a temperature sensor and LCD to display temperature readings from two sensors and the elapsed time in seconds. The code includes libraries for the LCD, OneWire interface, and Dallas temperature sensors. It initializes the LCD and sensor, then in a loop requests temperatures and displays them along with the time on the LCD.

Uploaded by

Siti Khoirunika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Codingku

The document contains code for a program that uses a temperature sensor and LCD to display temperature readings from two sensors and the elapsed time in seconds. The code includes libraries for the LCD, OneWire interface, and Dallas temperature sensors. It initializes the LCD and sensor, then in a loop requests temperatures and displays them along with the time on the LCD.

Uploaded by

Siti Khoirunika
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

//

//Siti Khoirunika//

//K2313067//

//Pendidikan Fisika 2013//

#include <LiquidCrystal.h>

#include <OneWire.h>

#include <DallasTemp`erature.h>

#define ONE_WIRE_BUS 7

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

[Link](16, 2);

[Link]();
}

void loop()

[Link]();

[Link](0, 0);

[Link]("SH:");

[Link](3, 0);

[Link]([Link](0));

[Link](0, 1);

[Link]("SP:");

[Link](3, 1);

[Link]([Link](1));

[Link](10, 1);

[Link](millis() / 1000);

You might also like