Skip to content

Instantly share code, notes, and snippets.

View eni23's full-sized avatar
👾
"working"

Cyrill v.W. eni23

👾
"working"
View GitHub Profile
#!/usr/bin/env python3
import asyncio
import bleak
import igsparser
import influxdb_client
VALID_SENSORS={
"80:6F:B0:C5:4B:35": {
#!/usr/bin/env python3
import sys
import math
import shutil
from PIL import Image
def doublepixel(c1, c2):
@eni23
eni23 / midi.py
Created March 4, 2020 19:09
pygame-midi
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import pygame
import pygame.midi
MIDI_DEVICE_NAME_MATCH = "nanoPAD"
# set up pygame
00, val, 104, 0
01, val, 97, 1
02, val, 110, 2
03, val, 115, 3
04, val, 32, 4
05, val, 112, 5
06, val, 108, 6
07, val, 122, 7
08, load, 0
09, prt
#include "Arduino.h"
#include "config.h"
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1331.h>
#include <SPI.h>
#define sclk 13
#define mosi 11
#define cs 10
import time
from pyA20.gpio import gpio
from pyA20.gpio import port
#import RPi
class DHT22Result:
'DHT22 sensor result returned by DHT22.read() method'
ERR_NO_ERROR = 0
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test bc</title>
<!--
Get it from: https://github.com/metafloor/bwip-js
!-->
<script type="text/javascript" src="./freetype.js"></script>
<script type="text/javascript" src="./bwipp.js"></script>
@eni23
eni23 / main.cpp
Last active October 1, 2021 07:16
struct_serial
#include "Arduino.h"
#include "config.h"
struct TTEST {
char id[3];
bool test_bool;
uint8_t ipadress[4];
uint8_t volume;
#include <Arduino.h>
int current_pos = 7;
int motor_speed = 20;
int motor_pins[4] = { 9, 6, 7, 8 };
bool positions[8][4] = {
{ 1, 0, 0, 0 },
{ 1, 1, 0, 0 },
{ 0, 1, 0, 0 },
{ 0, 1, 1, 0 },
@eni23
eni23 / phantomjs-revealjs-slide-capture.js
Last active November 17, 2016 15:59 — forked from tongpu/phantomjs-revealjs-slide-capture.js
PhantomJS script to capture/render screenshots of the slides of a Reveal.js powered slideshow.
/**
* PhantomJS script to capture/render screenshots of the slides of a Reveal.js powered slideshow.
*/
var page = require('webpage').create();
var args = require('system').args;
// Get url to render from command line.
var url;
if (args.length < 2) {