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
// SerialTestControl.h | |
#ifndef SERIAL_TEST_MODULE_H | |
#define SERIAL_TEST_MODULE_H | |
#include "SpindleControl.h" | |
class BufferedSoftSerial; | |
// This module implements closed loop PID control for spindle RPM. |
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
#ifndef F_CPU | |
#define F_CPU 16000000UL | |
#endif | |
#include <avr/io.h> | |
#include <util/delay.h> | |
#include <stdlib.h> | |
#define TEMPERATUR PF0 | |
#define BUTTON PF1 |
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
import serial, fcntl, struct | |
#inspired by http://inspire.logicsupply.com/2014/09/beaglebone-rs-485-communication.html | |
#enable ttyO4 by editing /boot/uEnv.txt: | |
#cape_enable=capemgr.enable_partno=BB-UART4 | |
# RX and TX Jumpers on the Waveshare Cape are set to UART4 | |
# A jumper wire is connected from P9_15 to RSE (middle pin of the three) |
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
" ~/.config/nvim/init.vim | |
" | |
" After add / remove Plugins, run :PlugInstall / :PlugClean | |
if has('nvim') | |
let $VIMHOME = '~/.config/nvim' | |
else | |
let $VIMHOME = '~/.vim' | |
endif |
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
# don't turn off display | |
xset dpms 0 0 0 | |
xset -dpms | |
xset s noblank | |
xset s off | |
# simple fullscreen wm | |
matchbox-window-manager -use_cursor no -use_titlebar no & | |
# start VNC client |
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
[Unit] | |
After=systemd-user-sessions.service | |
[Service] | |
ExecStart=/bin/su pi -l -c /usr/bin/xinit -- VT08 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
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
#!/bin/sh | |
# Turn TV on using CEC | |
echo "on 0" | cec-client -s -d 1 |
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
#!/bin/sh | |
# Turn TV off (standby) using CEC | |
echo "standby 0" | cec-client -s -d 1 |
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
/ip firewall filter add | |
chain=input | |
action=drop | |
comment="deny DNS resolution containing 'samsung' from SmartTV" | |
protocol=udp dst-port=53 | |
content="samsung" | |
src-mac-address=<smartv-mac-addr> | |
/ip firewall filter add | |
chain=forward | |
action=drop |
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 os | |
import socket | |
import requests | |
import json | |
from datetime import datetime as dt | |
class ConnectAPI: |