This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
binary_sensor: | |
- platform: gpio | |
id: pullswitch | |
pin: | |
number: 32 | |
mode: INPUT_PULLUP | |
- platform: template | |
id: switch_actuated | |
internal: true | |
lambda: 'return id(pullswitch).state;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: sop-power-monitor | |
friendly_name: sop-power-monitor | |
esp32: | |
board: esp32dev | |
framework: | |
type: arduino | |
# Enable logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(1, 2); // RX, TX | |
// Pin definitions | |
// START | |
const int LED_RED_1 = 2; | |
const int LED_GREEN_1 = 3; | |
const int SWITCH_1 = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import os | |
import xml.etree.ElementTree as ET | |
# Set the directory containing the dataset files | |
data_dir = '/path/to/dataset/files/' | |
# Set the threshold for outlier detection (in standard deviations from the mean) | |
threshold = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(1, 2); // RX, TX | |
// Pin definitions | |
// START | |
const int LED_RED_1 = 2; | |
const int LED_GREEN_1 = 3; | |
const int SWITCH_1 = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int button[8] = {0, 1, 2, 3, 4, 5, 6, 7}; | |
const int LED[16] = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}; | |
int buttonState[8]; | |
void setup() { | |
for (int i = 0; i < 8; i++) { | |
pinMode(button[i], INPUT_PULLUP); | |
} | |
for (int i = 0; i < 16; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import digitalio | |
import board | |
import busio | |
# Initialize the buttons | |
buttons = [digitalio.DigitalInOut(board.GPIO0), digitalio.DigitalInOut(board.GPIO1)] | |
# Initialize the LEDs | |
leds = [digitalio.DigitalInOut(board.GPIO2), digitalio.DigitalInOut(board.GPIO3), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This program will send USB HID keyboard presses to initiate | |
a PTT call with system of choice. | |
* Press and hold button 1 to activate PTT (Push-to-Talk) functionality. | |
*/ | |
#include <DigiKeyboard.h> // Library for sending keystrokes as an HID device over USB | |
#include <OneButton.h> // Library for button input functions | |
OneButton button1( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
NewerOlder