Skip to content
Snippets Groups Projects
Commit 345792cc authored by Stefan Gehr's avatar Stefan Gehr
Browse files

moved setup down

parent 3212e9ec
Branches
Tags
No related merge requests found
#include "pins.h"
#include <SoftwareSerial.h>
static SoftwareSerial mp3(mp3RX, mp3TX);
static SoftwareSerial mp3(MP3RX, MP3TX);
void mp3Setup(void) {
mp3.begin(4800);
......
......
......@@ -8,6 +8,6 @@ const uint8_t T2DOWN = 5;
const uint8_t PUMP1 = 8;
const uint8_t PUMP2 = 9;
const uint8_t BUTTON = 10;
const uint8_t mp3TX = 12;
const uint8_t mp3RX = 13;
const uint8_t MP3TX = 12;
const uint8_t MP3RX = 13;
#endif
......@@ -8,19 +8,6 @@
// LCD display at address 0x27 with 16 columns and 2 rows
static LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup(void) {
lcd.init();
Serial.begin(9600); // for debugging
// start the relevant libraries used by temperature.cpp
temperatureBegin();
mp3Setup();
pinMode(PUMP1, OUTPUT);
pinMode(PUMP2, OUTPUT);
pinMode(BUTTON, INPUT_PULLUP);
}
// custom possibility for digital input
static const int8_t B_UNCHANGED = -1;
// return whether the button changed to HIGH, LOW, or was B_UNCHANGED
......@@ -153,6 +140,19 @@ void displayLight(bool turnOn) {
}
}
void setup(void) {
lcd.init();
Serial.begin(9600); // for debugging
// start the relevant libraries used by temperature.cpp
temperatureBegin();
mp3Setup();
pinMode(PUMP1, OUTPUT);
pinMode(PUMP2, OUTPUT);
pinMode(BUTTON, INPUT_PULLUP);
}
void loop(void) {
static float t1up_C = 0.0;
static float t1down_C = 0.0;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment