Skip to content

Instantly share code, notes, and snippets.

@probonopd
probonopd / Send infrared commands from the Arduino to the iRobot Roomba
Created March 17, 2013 10:42
Send infrared commands from the Arduino to the iRobot Roomba. Use a transistor to drive the IR LED from pin D3 for maximal range.
#include <IRremote.h>
/*
Send infrared commands from the Arduino to the iRobot Roomba
by probono
2013-03-17 Initial release
@probonopd
probonopd / 0x3070 patch
Last active December 18, 2015 00:08
Binary patch to treat the 0x3070 RF module like a 0x5370
sudo find /lib/modules/*/kernel/drivers/net/wireless/rt2x00/ -type f -exec sed -i -e 's|\x1\x4\x8\xf\x5\x3\x7\x0|\x1\x4\x8\xf\x3\x0\x7\x0|g' {} \;
@probonopd
probonopd / Raspberry Pi aufs root
Last active November 3, 2021 15:25
Trying to use the kernel and modules from BerryBoot to turn my ArchLinux on the Raspberry Pi into a read-only boot disk using aufs
On my Ubuntu desktop machine, I do:
===
sudo su
wget http://downloads.sourceforge.net/project/berryboot/berryboot-20130528.zip
unzip berryboot-*.zip
kpartx -av berryboot.img --> Now I can mount/access it in Nautilus, it mounts to /media/ubuntu-gnome/BA27-9913/ in my case
@probonopd
probonopd / sendandreceive.ino
Last active September 20, 2021 19:53
Send Pronto Hex via an IR LED connected to Arduino Pin D9. Make sure you do not send a blank (" ") as the last character. Applied fix for Leonardo from https://github.com/probonopd/arduino-infrared-pronto/pull/1 to sendandreceive.ino -- TODO: Fix sendRaw to specify length as "sizeof(signal)/sizeof(int)" as in http://forum.arduino.cc/index.php?PH…
#include <IRremote.h>
// http://www.pjrc.com/teensy/td_libs_IRremote.html
// If one keypress results in multiple codes being output, then
// change in IRremoteInt.h:
// #define _GAP 50000
int RECV_PIN = 8;
IRrecv irrecv(RECV_PIN);
decode_results results;
@probonopd
probonopd / decodeir.ino
Last active December 18, 2015 19:08
Decode IR codes using Arduino and irdb.tk
// If one keypress results in multiple codes being output, then
// change in IRremoteInt.h:
// #define _GAP 50000
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
@probonopd
probonopd / inject js zapper
Last active December 19, 2015 01:48
To be done: Rewrite parser for Xoro HRS 8530 station lists in Python; translate common.java by Matthias Müller (dvb.matt)
http://mobile.rtv.de/
# if the image src contains zdf, then change the link of the parent
$('img[src*="ard"]').parent().attr('href','javascript:zap(1)');
$('img[src*="zdf"]').parent().attr('href','javascript:zap(2)');
$('img[src*="rtl"]').parent().attr('href','javascript:zap(3)');
http://mobile.rtv.de/
@probonopd
probonopd / kernel_module.sh
Last active November 4, 2017 22:34
Trying to compile kernel module for Ralink 3070 chipset
#
# Trying to compile kernel module for Ralink 3070 chipset
# with patch described on
# http://www.geekamole.com/2013/rt2800usb-fix-for-ralinkmediatek-3070-gentoo-linux/
#
apt-get install linux-headers-3.7-trunk-686-pae # This is on Kali Linux; 3 MB
apt-get install linux-source-3.7 # http://ftp.halifax.rwth-aachen.de/kali/pool/main/l/linux-kali/linux-source-3.7_3.7.2-0+kali8_all.deb # 82 MB
tar xfj /usr/src/linux-source-3.7.tar.bz2
cd linux-*
@probonopd
probonopd / live-boot persistence
Last active December 19, 2015 10:29
Debugging live-boot persistence when persistence file is located on same ext4 partition as live ISO (which is booted with GRUB2)
# I boot from an ISO that is loop-mounted with GRUB2 like this:
root@debian:/home/user# cat /lib/live/mount/findiso/boot/grub/grub.cfg
# (...)
menuentry "binary.hybrid.iso" {
insmod ext2
iso_path="/boot/binary.hybrid.iso"
export iso_path
args="findiso=${iso_path} live-config.keyboard-layouts=de live-config.locales=de_DE.UTF-8 live-config.timezone=Europe/Berlin boot=live config quiet splash"
export args
loopback loop ${iso_path}
@probonopd
probonopd / 1st_wr703n-image-create.sh
Last active October 14, 2023 14:32
Working way to create a simple Ethernet/WLAN web radio player using a cheap tiny WR703N router and a cheap USB C-Media soundcard. Switch radio stations with the reset switch. -- THE ACTUAL CODE ON THIS PAGE IS ***OUTDATED***, use https://github.com/probonopd/minikrebs instead!
# http://www.aliexpress.com/item/New-Mini-Portable-Wireless-3G-Router-TP-LINK-TL-WR703N-150M-150Mbps-WR703N-Pocket-size-Wifi/948558329.html
# Someone should convince TP-Link to build this with more Flash, serial headers, bare board, *duino style...
# This is the starting point for a webradio appliance in the works
# TODO: Preconfigure everything, hook up Arduino for IR control sending and receiving
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
tar xfj OpenWrt-ImageBuilder*
cd "$HOME/Downloads/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486"
@probonopd
probonopd / ShairPort for squeezelite (LMS)
Last active August 29, 2015 13:56
Running ShairPort/ShairTunes/AirTunes on squeezeplug distro (Raspbian wheezy based) to serve to squeezelite clients on WR703n
# Running ShairPort/ShairTunes/AirTunes on squeezeplug distro (Raspbian wheezy based)
# to serve to squeezelite clients on WR703n
# Install in Logitech Media Server: Click on Settings, then select
# the Plugins tab, at the bottom of the page add the repo:
# http://raw2.github.com/StuartUSA/shairport_plugin/master/public.xml
# Copy precompiled helper binary in place
sudo cp /var/lib/squeezeboxserver/cache/InstalledPlugins/\
Plugins/ShairTunes/shairport_helper/pre-compiled/\