Skip to content

Instantly share code, notes, and snippets.

uid: OH3_Solar_Energy_Summary
tags: []
props:
parameters:
- description: Title
label: Title
name: title
required: false
type: TEXT
- context: item
@PRosenb
PRosenb / forwardAudio.py
Last active November 25, 2020 21:15
Forward audio from BlackHole to the output device.
#!/usr/bin/env python
import sounddevice as sd
import sys
# Download the pkg file of BlackHole
# https://github.com/ExistentialAudio/BlackHole/releases
# Install BlackHole
#
# Install sounddevice
# pip install sounddevice --user
@PRosenb
PRosenb / esp32_wdt.cpp
Last active April 6, 2019 04:34
When using ESP32 with the Arduino IDE, it does not support the native watchdog timer. The following gist does not use the official watchdog timer but employs a normal timer to reset the CPU if wdt_reset() is not called in time.
#include "esp32_wdt.h"
#include <esp32-hal-timer.h>
static hw_timer_t *timer = NULL;
/**
* iInterrupt service routine called when the timer expires.
*/
void IRAM_ATTR resetModule() {
ets_printf("watchdog reboot\n");