sudo apt update
sudo apt install apache2
#!/usr/bin/python3 | |
from pynput.keyboard import Key, Controller | |
from time import sleep | |
if __name__ == "__main__": | |
keyboard = Controller() |
/** | |
* Casovy spinac pro cerpadlo na skluzavku do bazenu. Cerpadlo se zapne na 15s po stisku tlacitka. Kontrolka sviti. Poslednich 5s blika. | |
* Pokud je malo vody (plovakovy spinac), cerpadlo se nezapne a kontrolka blika rychle. | |
*/ | |
#define CAS_ZAPNUTI 15000 //ms | |
#define CAS_BLIKANI 5000 //ms | |
#define CAS_CHYBY 1000 //ms | |
#define BLIKANI_POMALE 500 //ms |
/** | |
* Slowly changing color light strip using arduino and neopixels. Suitable for mood lights. | |
* recent usage: sauna pool downlight, advent candlestick .. | |
*/ | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif |
/** | |
* Program reads servo signal on "input", changes its aplitude by 25% and sends it to "output". | |
* It is used for limiting RC car power - for kids. | |
*/ | |
// input and output pin | |
const int input = 2; | |
const int output = 3; | |
const int led = LED_BUILTIN; |
#!/usr/bin/env python3 | |
# http://www.eastrongroup.com/data/uploads/Eastron_SDM120-Modbus_user_manual_2016_V2_6.pdf | |
# http://www.eastroneurope.com/media/_system/tech_specs/3914/SDM120%20PROTOCOL.pdf | |
from serial import * | |
from time import sleep | |
PORT_NAME = "/dev/ttyUSB0" |
#!/bin/bash | |
# | |
# This script should do: | |
# | |
# 1) test if nfs folder is mounted and exit 0 if yes | |
# 2) try to mount it and exit 0 if success | |
# 3) try to wake the server if not possible to mount | |
# 4) wait while its not woked (pinging) | |
# 5) try againt 2-4 several times |