123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //////////////////////////////////////////////////////////////////////
- // //
- // Programmname: <Bitte einen treffenden Namen> //
- // Datum: TT.MM.JJJJ //
- // Beschreibung: <Kurze Beschreibung des Programms> //
- // //
- // 1. Autor: Vorname Name, Matrikel, Matrikel-Nr. //
- // 2. Autor: Vorname Name, Matrikel, Matrikel-Nr. //
- // //
- //////////////////////////////////////////////////////////////////////
- ////////// Inkludierte Header-Dateien //////////
- #include "Toaster.h"
- ////////// Globale Variablen //////////
- DS18B20 Tempsensor = DS18B20(TEMPSENSOR_PIN);
- LiquidCrystal Display = LiquidCrystal(13, 12, 10, 9, 8, 7);
- ////////// Setup-Funktion //////////
- void setup(void) { // put your setup code here, to run once:
- ////////// Lokale Variablen //////////
- ////////// GPIO Setup //////////
- Serial.begin(BAUDRATE);
- Display.begin(16,2);
- ////////// Einmalige Anweisungen //////////
-
- }
- ////////// Loop-Funktion //////////
- void loop(void) { // put your main code here, to run repeatedly:
- ////////// Lokale Variablen //////////
- ////////// Hauptprogramm //////////
- }
- ////////// Unterfunktionen / ISR //////////
- void lcd(float temp_in_c, int tact_in_s, int tmax_in_s) {
- Display.setCursor(0, 0);
- Display.print("Temp=");
- Display.print(temp_in_c);
- Display.print("*C ");
- Display.setCursor(0, 1);
- Display.print("t=");
- Display.print(tact_in_s);
- Display.print("s");
- Display.print(" tmax=");
- Display.print(tmax_in_s);
- Display.print("s");
- }
- float get_temp(void) {
- return Tempsensor.getTempC();
- }
|