Skip to content

Instantly share code, notes, and snippets.

Stefan Wendler wendlers

Block or report user

Report or block wendlers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wendlers
wendlers / spi_slave.c
Last active Dec 3, 2015
MSP430 SPI slave
View spi_slave.c
#include "msp430g2553.h"
#include <legacymsp430.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
@wendlers
wendlers / Makefile
Created Nov 12, 2014
Toggle GPIO with IOCTL and Micropython
View Makefile
obj-m += pyb_gpio.o
ksrc = "$(LINUX_DIR)"
sysr = "$(PWD)/../deploy"
mdir = "extra"
all:
make -C $(ksrc) M=$(PWD) modules
modules_install:
View nio.py
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Stefan Wendler
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@wendlers
wendlers / 01_http_post.sh
Last active Aug 29, 2015
EDIMAX Smart Plug XML for programming scheduling
View 01_http_post.sh
#!/bin/bash
FILE=$1
# REPLACE WITH YOUR PASSWORD/PLUG-IP
URL=http://admin:1234@172.16.100.75:10000/smartplug.cgi
curl -X POST -d @${FILE} ${URL}
@wendlers
wendlers / smartplug.py
Last active Jan 5, 2018
Simple library/command-line-utility to control a EDIMAX Smart Plug Switch (SP-1101W) from Python
View smartplug.py
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Stefan Wendler
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@wendlers
wendlers / camrec.sh
Created Nov 19, 2012
Simple gstreamer pipeline to record a video captured from a webcam to OGG while showing the video also on the screen.
View camrec.sh
#!/bin/sh
##
# Simple gstreamer pipeline to record a video captured from a webcam (through v4l) to OGG file while
# showing the video also on the screen.
#
# Sample usage:
#
# Record to webcam.ogg:
#
You can’t perform that action at this time.