- RPI4 - https://amzn.to/3LR1lFh
- (OR) odroid xu4 - https://amzn.to/3P5GoIo
- Alfa AC1900 WiFi Adapter - 1900 Mbps 802.11ac Long-Range Dual Band USB - https://amzn.to/3LU43to
- (optional) USB Ethernet Adapter - https://amzn.to/3vPjyNC
- (optional) Generic network switch - https://amzn.to/37sInpq
This file contains hidden or 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 GPS = require("gps"); | |
const { SerialPort, ReadlineParser } = require('serialport') | |
const gps = new GPS; | |
// Use a `\r\n` as a line terminator | |
const parser = new ReadlineParser({ | |
delimiter: '\n', | |
}) | |
const port = new SerialPort({ |
This file contains hidden or 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
setInterval(function() { | |
// Define the parameters | |
var vpv = 18; // The solar panel's output voltage | |
var ipv = 2; // The solar panel's output current | |
var vbat = 14.8; // The battery's voltage (4-series lithium polymer battery) | |
var ibat = 0; // The battery's current | |
var vmax = 20; // The maximum power voltage of the solar panel | |
var imax = 2.5; // The maximum power current of the solar panel | |
var max_vbat = 16.8; // Maximum voltage of the 4-series lithium polymer battery | |
var min_vbat = 12.0; // Minimum voltage of the 4-series lithium polymer battery |
This file contains hidden or 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
// I've used a lot of libs including the popular ones for dotnet such as NAudio but all seem to be overly complicated or not cross platform. | |
// 1. install ffplay on your platform. for Windows `choco install ffplay`. Debian `apt install ffmpeg`. | |
// 2. install nuget pkg `CliWrap` | |
// 3. send your audio stream to the method. | |
public static async Task PlayAsync(Stream stream, CancellationToken cancellationToken) | |
{ | |
var result = await Cli.Wrap("ffplay") | |
.WithStandardInputPipe(PipeSource.FromStream(stream)) | |
.WithArguments($"-autoexit -nodisp -hide_banner -loglevel error -fs -") |
This file contains hidden or 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
Rule1 on power1#state=1 do backlog RuleTimer2 30; counter1 +1 endon on Rules#Timer=2 do power1 off endon | |
Rule1 on | |
Timer1 {"Enable":1,"Time":"4:00","Window":15,"Days":"SMTWTFS","Repeat":1,"Output":1,"Action":1} | |
Timers on | |
Timezone -8 | |
PowerOnState 0 |
https://tasmota.github.io/docs/DS18x20/
Arp request every 60 secs.
SetOption41 60
Check every 60
TelePeriod 60
This file contains hidden or 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 <WS2812FX.h> | |
#define LED_COUNT 50 | |
#define LED_PIN D5 | |
WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); | |
void setup() { | |
ws2812fx.init(); | |
ws2812fx.setBrightness(70); |
This file contains hidden or 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 AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
const https = require("https"); | |
const querystring = require('querystring'); | |
const badRequest = 'There was an issue with the form submission. Please call us or try again later.'; | |
/** | |
* Entrypoint of Lambda function | |
*/ | |
exports.handler = async (event) => { |
NewerOlder