Skip to content

Instantly share code, notes, and snippets.

View thomasbrueggemann's full-sized avatar
👨‍💻

Thomas Brüggemann thomasbrueggemann

👨‍💻
View GitHub Profile
String.prototype.trunc = String.prototype.trunc || function(n){
return (this.length > n) ? this.substr(0, n-1) + '…' : this;
};
console.log("".trunc(50));
git tag -l | xargs -n 1 git push --delete origin
export default (genFunc) => {
let next = null;
do {
next = genFunc.next();
} while (!next.done);
return next.value;
};
@thomasbrueggemann
thomasbrueggemann / temp.ino
Created August 24, 2018 21:43
Wemos D1 mini Pro with SHT3x Temperature sensor to ThingSpeak
#include <WEMOS_SHT3X.h>
SHT3X sht30(0x45);
// Wifi and ThingSpeak settings
#include <ESP8266WiFi.h>
const char* ssid = "";
const char* password = "";
const char* server = "api.thingspeak.com";
#include <FastLED.h>
#define LED_PIN 5
#define NUM_LEDS 30
#define ANIMATION_FRAME_TIME 80
CRGB leds[NUM_LEDS];
int counter = 0;
void setup() {
#define NUM_LEDS 6
#define OFF 0
#define ON 1
int PINS[] = {5, 4, 0, 2, 14, 12};
void setup() {
Serial.begin(115200);
for(int i = 0; i < NUM_LEDS; i++) {
#include "Wire.h"
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
const int MPU_ADDR = 0x68; // I2C address of the MPU-6050
const int MOVING_DELTA_THRESHOLD = 1000;
const int ALARM_PENALTY_MILLIS = 60000;
const char* WIFI_SSID = "Rumblebuff"; // The SSID (name) of the Wi-Fi network you want to connect to
const char* WIFI_PASSWORD = "7696298557852265"; // The password of the Wi-Fi network