Skip to content

Instantly share code, notes, and snippets.

import socket
# Communication
ip = "192.168.50.2"
port= 12345
#inverters = ("01", "02", "03")
inverters = ("01")
# Parameter Set (Code, Measurement, Unit, Factor)
#!/usr/bin/python3.8
import requests
import urllib.parse
key= "xxxxx" # <-- Insert your own OpenWeatherMap API Key (https://openweathermap.org/api)
lat = "47.4212"
lon = "10.9863"
json = requests.get("http://api.openweathermap.org/data/2.5/weather?lat={}&lon={}&appid={}".format(lat, lon, key)).json()
@vschlegel
vschlegel / main.ino
Created May 31, 2020 13:54
Mattibueb's Blinkimaster
// #include <Arduino.h>
int R_pin = 11;
int G_pin = 10;
int B_pin = 9;
int time = 257;
int intensity = 105;
int input = 0;
function script_description()
return "Controlls tally light when recording and streaming."
end
o = obslua
function script_load()
o.obs_frontend_add_event_callback(obs_frontend_callback)
end
@vschlegel
vschlegel / Code_sender.ino
Created October 2, 2019 07:26
De Matze isch en dubel
#include "LowPower.h"
#include "HX711.h"
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
// Configuration
int sleeptime = 2; //seconds
const byte address[6] = "00001"; //tx-address
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int enablePin = 10;
int decrementTime = 2; //minus
int startStop = 3; // start
int incrementTime = 4; //plus
@vschlegel
vschlegel / LED
Last active August 30, 2020 08:55
For controling the TW-1264 LED Display, available on HAM RADIO 2016, using an Arduino Nano
//CC BY NC SA 2016 github.com/ioeides
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int numbers[10] = {0, 48, 91, 121, 116, 109, 111, 56, 127, 125};
/*
* ###8###
* # #
@vschlegel
vschlegel / LED_Matrix.ino
Created March 26, 2016 10:01
Steuert eine LED Matrix an, die direkt mit einem Arduino Nano verbunden ist.
//LED_Matrix.ino
//v.schlegel.grunholz@Gmail.com
int zeile[8] = {2,10,18,8,13,15,16,17}; //Zeilen, Active HIGH
int spalte[8] = {3,19,14,4,7,5,9,6}; //Spalten, Active LOW
//Eine Led wird aktiviert, wenn ihre Zeile auf HIGH und ihre Spalte auf LOW gesetzt wird.
//Hardwarebedingt muss die Matrix so angesteuert werden, dass nacheinander Zeilen ausgegeben werden.
void setup() {
@vschlegel
vschlegel / .vimrc
Last active April 9, 2016 09:38
vim config
"VIM Konfiguration
"Pfeiltasten
set nocompatible
"Zeilennummern
set nu
"Syntax-Highlighting