Skip to content

Instantly share code, notes, and snippets.

View taqpan's full-sized avatar

SHIMADA Takuji taqpan

View GitHub Profile
@taqpan
taqpan / IR-sender.ino
Created July 12, 2014 17:31
IR-signal sender for Arduino
#define PIN_IR_OUT 4
#define PIN_LED_OUT 2
#define SIGNAL_LEN 7
// AEHA format
#define SIGNAL_LEADER_HIGH_TIME 3200
#define SIGNAL_LEADER_LOW_TIME 1600
#define SIGNAL_ON_HIGH_TIME 400
#define SIGNAL_ON_LOW_TIME 1200
#define SIGNAL_OFF_HIGH_TIME 400
@taqpan
taqpan / Raw-IR-Receiver.ino
Created August 19, 2012 10:11
Raw IR-signal receiver for Arduino with PL-IRM-2161-C438
#define PIN_IR_IN 8
#define SIGNAL_TIMEOUT 8000
#define DATA_LEN 512
short buf[DATA_LEN];
void clearBuf(int range)
{
for (int i = 0; i < range; i++)
buf[i] = 0;
@taqpan
taqpan / IR-Receiver.ino
Created August 19, 2012 10:43
IR-signal receiver for Arduino with PL-IRM-2161-C438
#define PIN_LED_OUT 7
#define PIN_IR_IN 8
// NEC format
/*
#define SIGNAL_LEADER_HIGH_TIME 16
#define SIGNAL_LEADER_LOW_TIME 8
#define SIGNAL_TIMEOUT 8000
//*/
#
# Update all m3u files
# Arguments: working directories
#
$extensions = @(".mp3", ".m4a", ".flac")
$Args | % {
ls -r $_ | ? { $_.Extension -eq ".m3u" } | % {
$listfile = $_
pushd $listfile.Directory
"#EXTM3U" | Out-File $listfile -Encoding utf8