Skip to content

Instantly share code, notes, and snippets.

#include <NewPing.h>
#define TRIGGER_PIN 3
#define ECHO_PIN 4
#define MAX_DISTANCE 200
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
void setup() {
Serial.begin(115200);
@jonchen727
jonchen727 / chemejonHX711MQTTExample.ino
Last active October 22, 2020 12:45
HX711+ESP8266+MQTT
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include "HX711.h"
const char* ssid = "Your SSID";
const char* password = "Your Password";
const char* mqtt_server = "Your MQTT Server Ip";
WiFiClient espClient;
PubSubClient client(espClient);
#define DOUT 14
import pandas as pd
import glob
import datetime
import sys
import os
import os.path
from os import listdir
from os.path import isfile, join
import re
import numpy as np
import pandas as pd
import glob
import datetime
import sys
import os
import os.path
from os import listdir
from os.path import isfile, join
import glob
@jonchen727
jonchen727 / mqttscaleOTA.ino
Created December 18, 2019 00:06
ESP MQTT Scale with OTA Update Code
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>
#include <Update.h>
#include <HX711_ADC.h>
#include <PubSubClient.h>
char msg_buff[50];
const char* host = "esp32";
@jonchen727
jonchen727 / NodeRedPLC.json
Created December 18, 2019 00:16
Multiple Node Red Flows for Raspberry Pi PLC Project
[
{
"id": "a67b02db.65d08",
"type": "tab",
"label": "Define Inputs",
"disabled": false,
"info": ""
},
{
"id": "bca3b7d8.ee3178",
@jonchen727
jonchen727 / readme.md
Last active July 1, 2020 15:08
ESXi Console Commands

Converting uncompatable .vmdk to ESXi compatable .vmdk

vmktools -i <path to .vmdk> <path to new .vmdk>

Converting to other disk formats

vmktools -i <path to .vmdk> <path to new .vmdk> -d [disktype]

[disktype]

@jonchen727
jonchen727 / update_all_metadata.py
Created July 7, 2020 14:56 — forked from JonnyWong16/update_all_metadata.py
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@jonchen727
jonchen727 / update_all_metadata.py
Created July 7, 2020 14:56 — forked from JonnyWong16/update_all_metadata.py
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@jonchen727
jonchen727 / update_all_metadata.py
Created July 7, 2020 14:56 — forked from JonnyWong16/update_all_metadata.py
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests