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
#!/usr/bin/env python3 | |
# build a square signal from sum of sin | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy import signal | |
# number of samples | |
Ns = 2000 |
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
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
import time | |
import os, sys | |
import signal | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(31, GPIO.OUT) |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import dateutil.parser | |
import requests | |
import pandas as pd | |
import datetime | |
# some consts | |
NAN = float('nan') |
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
#!/usr/bin/env python3 | |
# RN2483 point to point test | |
# open serial link, init and display rx frames | |
import argparse | |
import serial | |
# some functions | |
def send_cmd(cmd): |
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
/* | |
1000 pulses generator (100ms width/5 Hz) | |
Send pulseCount to MOSFET transitor connect to D2 pin. | |
Push FLASH button (link to D3) to start generator. | |
Push RST button to stop generator and clear counter. | |
Test with ESP-12 on nodemcu. | |
This example code is in the public domain. |
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
/* | |
ESP8266 periodic upload an integer to thingspeak, set ESP to deep sleep between sends | |
and use RTC memory for variable persistence. Use http and mqtt update. | |
For leave deep sleep mode we need a jumper between RST and D0 (GPIO16/WAKE) so don't uses LED_BUILTIN here. | |
Test on nodemcu v2. | |
This example code is in the public domain. | |
*/ |
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
#!/usr/bin/env python3 | |
# auto-build modbus flow map graph on a tk canvas | |
import threading | |
import tkinter as tk | |
from scapy.all import * | |
import networkx as nx | |
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
#!/usr/bin/env python3 | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
class GasGraph(nx.Graph): | |
def update(self): | |
for node in self: | |
# Valve |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import dateutil.parser | |
import requests | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import time | |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# KML converter for "google address" | |
import argparse | |
# from here https://github.com/martinblech/xmltodict | |
import xmltodict | |
# parse args |