This file contains 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/python | |
# set nonstandard baudrate. | |
# based on http://unix.stackexchange.com/a/327366/119298 | |
# this version takes the device file and baudrate as arguments | |
# and prints an error message if the device file could not be opened. | |
import sys,os,array,fcntl,argparse | |
parser = argparse.ArgumentParser() |
This file contains 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
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define DCSBIOS_IRQ_SERIAL | |
#include <DcsBios.h> | |
#include <Servo.h> |
This file contains 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
#define DCSBIOS_IRQ_SERIAL | |
#include <AccelStepper.h> | |
#include "DcsBios.h" | |
struct StepperConfig { | |
unsigned int maxSteps; | |
unsigned int acceleration; | |
unsigned int maxSpeed; | |
}; |
This file contains 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
#define DCSBIOS_IRQ_SERIAL | |
#include "DcsBios.h" | |
#include "LedControl.h" | |
LedControl lc=LedControl(2,3,4,1); | |
void onUv26DisplayChange(char* newValue) { | |
/* set digit 4 to first character (newValue[0]) */ |
This file contains 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
#include "LedControl.h" | |
// modified LCDemo7Segment example from the LedControl library | |
/* | |
pin 2 = DataIn | |
pin 3 = CLK | |
pin 4 = LOAD | |
1 = Anzahl hintereinandergeschalteter MAX7219-Chips | |
*/ |
This file contains 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
local witchcraft = {} | |
witchcraft.host = "localhost" | |
witchcraft.port = 3401 | |
local require = require | |
local loadfile = loadfile | |
package.path = package.path..";.\\LuaSocket\\?.lua" | |
package.cpath = package.cpath..";.\\LuaSocket\\?.dll" | |
local JSON = loadfile("Scripts\\JSON.lua")() |
This file contains 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 | |
""" | |
Python3 script to manage an external Lenovo LT1423p monitor | |
Requirements: xrandr, wmctrl, displaylink service | |
""" | |
LAPTOP_WACOM_DEVICES=[ | |
"Wacom Serial Penabled 1FG Touchscreen stylus", | |
"Wacom Serial Penabled 1FG Touchscreen eraser" | |
] |
This file contains 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
--[[ | |
Setup of on_process() function taken from the excellent example set by SLMod | |
]] -- | |
log("Loading Witchcraft into the server environment...") | |
witchcraft = witchcraft or {} | |
witchcraft.oldfunc = {} | |
witchcraft.oldfunc.on_process = server.on_process() |
This file contains 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
/* | |
Connections: | |
CLOCK: Pin 2 (interrupt 0) | |
LOAD: Pin 3 (interrupt 1) | |
DATA IN: Pin 4 | |
This sketch emulates the SPI interface of the | |
MAX7219 chip and constantly prints the values | |
of the internal 16 registers to the serial |
This file contains 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
/* PS2Keyboard library example | |
Adapted to control (parts of) the A-10C CDU keyboard | |
through DCS-BIOS. | |
PS2Keyboard now requries both pins specified for begin() | |
keyboard.begin(data_pin, irq_pin); | |
Valid irq pins: |
NewerOlder