Skip to content

Instantly share code, notes, and snippets.

View tablatronix's full-sized avatar

Shawn A tablatronix

View GitHub Profile
@trlafleur
trlafleur / README.md
Last active January 20, 2024 17:01
NowCast AQI for PM2.5

This will calculates proper AQI and Nowcast-AQI from PM2.5 sensors readings.

Expect a feed of PM2.5 sensor readings, that are stored in a queue, each hour, we take the average of these values and store in an hour array.

We then compute AQI and NowCast-AQI for 24, 12, 6, and 3 hours, and send them out as MQTT data and in JSON format.

References:

@ArcaneNibble
ArcaneNibble / pcbnew
Created July 8, 2020 10:21
KiCad fairyfloss theme
canvas_type=2
Color4DPCBLayer_F.Cu=rgb(255, 133, 127)
Color4DPCBLayer_In1.Cu=rgb(255, 243, 82)
Color4DPCBLayer_In2.Cu=rgb(197, 163, 255)
Color4DPCBLayer_In3.Cu=rgb(194, 0, 0)
Color4DPCBLayer_In4.Cu=rgb(0, 132, 132)
Color4DPCBLayer_In5.Cu=rgb(0, 132, 0)
Color4DPCBLayer_In6.Cu=rgb(0, 0, 132)
Color4DPCBLayer_In7.Cu=rgb(132, 132, 132)
Color4DPCBLayer_In8.Cu=rgb(132, 0, 132)
@remy
remy / _README.md
Last active July 25, 2018 16:27
User style sheet to put the README in the right place.

README first for github

Using a user style sheet extension, this CSS should give you enough targetting to put the README above the files, putting the important information in the right place.

I use uptight, by the late Chloe Weil, you can use what you want.

example

@sabas1080
sabas1080 / ESP32_HID.ino
Last active January 28, 2024 10:34
Example of HID Keyboard BLE with ESP32
/*
Copyright (c) 2014-2020 Electronic Cats SAPI de CV. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@natcl
natcl / docker-compose.yaml
Created January 2, 2018 15:33
Docker Compose Syslog Example
version: '2'
services:
nodered:
image: nodered/node-red-docker:0.17.5
restart: always
environment:
- TZ=America/Montreal
logging:
driver: syslog
options:
@BBBSnowball
BBBSnowball / espminiterm.py
Last active June 10, 2021 11:21
serial monitor for ESP8266, run "pio run -t upload" on ctrl-t ctrl-u, decode stacktraces, paths are hardcoded for platformio with nodemcuv2 board
import serial
from serial.tools import miniterm
import subprocess, sys, re, os
class ESPMiniterm(miniterm.Miniterm):
def handle_menu_key(self, c):
if c == '\x15': # ctrl-u
self.upload_file()
else:
super(ESPMiniterm, self).handle_menu_key(c)
@kuc-arc-f
kuc-arc-f / esp32_getChipVersion.ino
Last active March 30, 2018 23:36
esp32 ,chip Revision check
/*
esp32 ,chip Revision check
thanks:
https://www.esp32.com/viewtopic.php?t=1358
*/
#include "soc/efuse_reg.h"
//
@spacehuhn
spacehuhn / arduino_flash_esp8266.md
Last active January 16, 2024 18:14
Flash ESP8266 over an Arduino

How to flash your ESP8266 without a USB-Serial adapter but with an Arduino.

First be sure everything is connected correcly:

Arduino ESP82666
TX RX
RX TX
GND GND
GND GPIO-15
@sticilface
sticilface / PROGMEM.md
Last active July 23, 2023 11:38
PROGMEM

Guide to PROGMEM on ESP8266 and Arduino IDE

Intro

On low memory devices like the arduino and esp8266 you do not want strings to be stored in RAM. This occurs by default on these systems. Declare a string const char * xyz = "this is a string" and it will use up RAM.

The solution on these devices is to allow strings to be stored in read only memory, in Arduino this is the PROGMEM macro. Most of my experience is with the ESP8266 which is a 32bit micros controller. This device stores PROGMEM data in flash. The macro PROGMEM on ESP8266 is simply

#define PROGMEM   ICACHE_RODATA_ATTR
@LarsBergqvist
LarsBergqvist / subscriber_influxdb.py
Last active October 27, 2020 02:14
A service that subscribes to MQTT topics and stores the received data in an InfluxDB database
#!/usr/bin/env python3
import paho.mqtt.client as mqtt
import datetime
import time
from influxdb import InfluxDBClient
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
client.subscribe("Home/#")