HT stopfen modifies. Some improvements in the firmare.

master
klaute 4 years ago
parent 3c2eb795ff
commit 7be4fe23ab
  1. 1
      doc/links.md
  2. 3
      firmware/config.h
  3. 10
      firmware/firmware.ino
  4. 46
      hardware/ht-dn50_stopfen.scad

@ -1,2 +1,3 @@
https://arduinodiy.wordpress.com/2017/01/02/reviewing-the-wemos-battery-shield/
https://arduinodiy.wordpress.com/2016/12/25/monitoring-lipo-battery-voltage-with-wemos-d1-minibattery-shield-and-thingspeak/
https://www.thingiverse.com/thing:3015533

@ -1,6 +1,7 @@
#define DEBUG 1
//#define DEBUG 1
#define BATTERY_POWERED 1
#define POWERSAVING 1
#define SENSOR_TEMPERATURE 0

@ -62,6 +62,8 @@ void setup() {
digitalWrite(STATUS_LED_PIN, HIGH);
lowBatCheck(getBatteryVoltage());
// Establish WiFi connection
String wifiName = "oko-weather-" + String(ESP.getChipId());
@ -111,7 +113,7 @@ void setup() {
digitalWrite(STATUS_LED_PIN, LOW);
lowBatCheck();
lowBatCheck(currentSensorData[SENSOR_BAT_VOLTAGE]);
WiFi.mode(WIFI_OFF);
WiFi.forceSleepBegin();
@ -126,9 +128,9 @@ void setup() {
//*************************************************************************//
void lowBatCheck()
void lowBatCheck(float v)
{
if (currentSensorData[SENSOR_BAT_VOLTAGE] <= BAT_LOW_VOLTAGE)
if (v <= BAT_LOW_VOLTAGE)
{
#ifdef DEBUG
Serial.println("Low battery, going into deep sleep.");
@ -140,8 +142,6 @@ void lowBatCheck()
void loop() {
lowBatCheck();
#ifdef POWERSAVING
delay(50);
return;

@ -1,22 +1,24 @@
union() {
difference() {
cylinder(h=30, r=25, $fn=300);
translate([0, 0, -5])
cylinder(h=40, r=23, $fn=300);
}
difference() {
union() {
translate([0, 0, 30])
cylinder(h=3, r=30, $fn=300);
color("green")
translate([-22, -12, 31])
cube([44, 24, 5]);
}
color("red")
translate([-20, -10, 25])
cube([40, 20, 15]);
}
}
radius=25;
height=30;
union() {
difference() {
cylinder(h=height, r=radius, $fn=300);
translate([0, 0, -5])
cylinder(h=height+10, r=radius-2, $fn=300);
}
difference() {
union() {
translate([0, 0, height])
cylinder(h=3, r=radius+5, $fn=300);
color("green")
translate([-22, -12, 31])
cube([44, 24, 5]);
}
color("red")
translate([-20, -10, 25])
cube([40, 20, 15]);
}
}

Loading…
Cancel
Save