kemonine
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 22:51:01 +00:00
b0764b684a Add help text for intervals
20c73767de Add help text to hdmi on/off
Compare 2 commits »
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 22:31:44 +00:00
bfbb296784 Remove logging, finalize fan default settings
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 19:20:20 +00:00
80828aa021 Tweaks for fan service to keep it offline more frequently and scale up faster ; wil adjust polling interval after further testing and verification
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 19:04:47 +00:00
6c6bbe02fe Adjust looping on fan ; add debug output for fine tuning purposes
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 18:57:16 +00:00
638bd93675 Add fan control service
592a152860 Updated vendoring
Compare 2 commits »
kemonine commented on issue PiFrame/piframe#39 2020-09-04 18:37:09 +00:00
Replace pimoroni fan shim

Replaced with argon fan ; will be adding fan speed based on temp to piframe-go soon

kemonine closed issue PiFrame/piframe#39 2020-09-04 18:37:09 +00:00
Replace pimoroni fan shim
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 18:35:52 +00:00
0e5d316731 Add temp util ; break up temp lookups into their own mini-module
kemonine pushed to master at PiFrame/piframe 2020-09-04 18:16:21 +00:00
76d8874eb7 Add note about argon fan
kemonine pushed to master at PiFrame/piframe-go 2020-09-04 01:01:21 +00:00
fffd67f8c0 Further implementation of config management
kemonine pushed to master at PiFrame/piframe 2020-09-03 23:27:45 +00:00
e897d6dc27 Remove duplicate lines from docs/config file
kemonine pushed to master at kemonine/serial_debugger 2020-09-03 23:24:13 +00:00
67cfd18165 Initial bring up
kemonine commented on issue PiFrame/piframe#41 2020-09-03 19:56:30 +00:00
Debug console

Closing / wontfix as this is well outside the scope of PiFrame. Moved to a personal project instead.

kemonine closed issue PiFrame/piframe#41 2020-09-03 19:56:30 +00:00
Debug console
kemonine created repository kemonine/serial_debugger 2020-09-03 19:55:56 +00:00
kemonine commented on issue PiFrame/piframe#41 2020-09-03 18:10:23 +00:00
Debug console

// Varous system / library includes
#include <Adafruit_NeoPixel.h>

// Debugging via serial monitor (don't turn this on unless you're hacking on the firmware code)
#define DEBUG true

// Battery level measurement
#define VBATPIN A6
float measuredVBat;
float batteryPercent;

#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

void setup() {
  // Setup red LED to indicate device is on (in case we disable NeoPixel battery level later)
  pinMode(3, OUTPUT);
  digitalWrite(3, HIGH);

  // Setup NeoPixels
  pixels.begin();
  pixels.clear();
  pixels.setBrightness(10);

  // Green : pixels.Color(0, 255, 0)
  // Yellow : pixels.Color(255, 255, 0)
  // Orange : pixels.Color(255, 128, 0)
  // Red : pixels.Color(255, 0, 0)
  pixels.setPixelColor(0, pixels.Color(0, 0, 0));
  pixels.show();
}

// Measure battery level and change NeoPixel accordingly
void batteryLevel() {
  measuredVBat = analogRead(VBATPIN);
  measuredVBat *= 2;    // we divided by 2, so multiply back
  measuredVBat *= 3.3;  // Multiply by 3.3V, our reference voltage
  measuredVBat /= 1024; // convert to voltage
  batteryPercent = measuredVBat / 3.3;
  if (batteryPercent >= 0.75) {
    pixels.setPixelColor(0, pixels.Color(0, 255, 0));
  }
  else if (batteryPercent >= 0.50) {
    pixels.setPixelColor(0, pixels.Color(255, 255, 0));
  }
  else if (batteryPercent >= 0.25) {
    pixels.setPixelColor(0, pixels.Color(255, 128, 0));
  }
  else {
    pixels.setPixelColor(0, pixels.Color(255, 0, 0));
  }
  pixels.show();

  if (DEBUG) {
    Serial.print("VBat: " ); Serial.println(measuredVBat);
    Serial.print("Bat %: "); Serial.println(batteryPercent);
  }
}

void loop() {
  // Update battery level as appropriate
  batteryLevel();
  
  delay(250);
}

kemonine pushed to master at PiFrame/piframe-go 2020-09-03 05:25:47 +00:00
1b5d77e07a Tweak string format, exit if config changes -- let monit and / or systemd restart if the config changes on disk out from under the running app ; will add save/exit button later to ensure that making changes via the config ui doesn't cause the app to restart after every change
kemonine deleted tag 20200903.1 from PiFrame/piframe-go 2020-09-03 05:21:41 +00:00
kemonine pushed tag 20200903-1 to PiFrame/piframe-go 2020-09-03 05:21:27 +00:00
kemonine pushed to master at PiFrame/piframe 2020-09-03 05:20:53 +00:00
7f020705a2 Tweak docs to match new gui artifact