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
import time | |
import btdht | |
import binascii | |
import random | |
dht = btdht.DHT() | |
dht.start() | |
time.sleep(15) |
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
USB=ACM0; FILE=$(mktemp -u -t $USB_XXXXXXXXXX); mkfifo $FILE; stty -F /dev/tty$USB cs8 115200; tail -f $FILE > /dev/tty$USB & |
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
#!/bin/bash | |
while true; do | |
read -n 1 key | |
case "$key" in | |
w) | |
echo 'F' > /dev/ttyACM0 | |
;; | |
# s) | |
# echo 'B' > /dev/ttyACM0 |
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
int motorspeedA; | |
int motorspeedB; | |
// connections to DRV8833 | |
int AIN1pin = 9; | |
int AIN2pin = 10; | |
int BIN1pin = 14; | |
int BIN2pin = 15; |
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 to DRV8833 | |
int AIN1pin = 9; | |
int AIN2pin = 10; | |
int BIN1pin = 14; | |
int BIN2pin = 15; | |
#define motorA 1 | |
#define motorB 2 |
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
// esp8266 pixelflut server with a SSD1306 oled 128x64 screen | |
// only ascii PX x y RRGGBB\n supported for now, no SIZE or RRGGBBAA or binary protocol | |
#include <Wire.h> | |
#include "SSD1306Wire.h" | |
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#define MAXBUF 4096 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/bin/sh | |
now=$(date +%s) | |
dayago=$(( $now - 86400 )) | |
prevstate="banana"; | |
totaldischargetime=0; | |
while read -r line; do |
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
// Pixelflut on a ESP8266 with a HD44780 on a PCF8574 'i2c lcd backpack' | |
// yeah pretty silly :) | |
// 2019-09-18 buZz NURDspace.nl | |
#include <LiquidCrystal_PCF8574.h> | |
#include <Wire.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
#define MAXBUF 4096 |
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/perl -w | |
use IO::Socket::INET; | |
use Time::HiRes qw( gettimeofday tv_interval usleep ); | |
my $sock = new IO::Socket::INET(PeerAddr => '10.208.42.159', | |
PeerPort => 5003, | |
Proto => 'udp', Timeout => 1) or die('Error opening socket.'); | |
my $x; |