Kuhnya Changed IP for MQTT. Added JLed
This commit is contained in:
@@ -12,6 +12,7 @@ LiquidCrystal_PCF8574 lcd(0x3F); // set the LCD address to 0x27 for a 16 chars a
|
||||
WiFiClient espClient;
|
||||
|
||||
Bounce butt = Bounce();
|
||||
auto gLed = JLed(GREEN);
|
||||
|
||||
float tempC;
|
||||
char f[4];
|
||||
@@ -116,14 +117,16 @@ void setup() {
|
||||
connectToWifi();
|
||||
|
||||
crun = millis();
|
||||
gLed.Breathe(2000).DelayAfter(1000).MaxBrightness(16).Forever();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
float tempT(NAN), humT(NAN), pressT(NAN);
|
||||
static int gint = 1;
|
||||
static bool gdir = true;
|
||||
// static int gint = 1;
|
||||
// static bool gdir = true;
|
||||
|
||||
ArduinoOTA.handle();
|
||||
gLed.Update();
|
||||
|
||||
butt.update();
|
||||
if (butt.rose()){
|
||||
@@ -135,10 +138,10 @@ void loop() {
|
||||
crun = millis();
|
||||
minCount++;
|
||||
|
||||
if(gdir) gint += 25;
|
||||
else gint -= 25;
|
||||
if((gint > 499) || (gint < 2)) gdir = !gdir;
|
||||
analogWrite(GREEN, gint);
|
||||
// if(gdir) gint += 25;
|
||||
// else gint -= 25;
|
||||
// if((gint > 499) || (gint < 2)) gdir = !gdir;
|
||||
// analogWrite(GREEN, gint);
|
||||
|
||||
adc = analogRead(A0);
|
||||
mv = digitalRead(MOVE_S);
|
||||
|
||||
Reference in New Issue
Block a user