Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marcmerlin
marcmerlin / gist:8b42499b3000cff0aab1
Created December 30, 2014 15:48
Voice command, on with off on timer
Call the voice command defined below like so:
run_voice_cmd "Open lvr blind" if ($lvr_blind_x10r->state_now eq ON);
# noloop=start
my $lvr_blind_off_timer = new Timer();
$lvr_blind->set("off");
# noloop=stop
$lvr_blind->set("off") if ($lvr_blind_off_timer->expired);
@marcmerlin
marcmerlin / gist:11fdf0c9e049b8ce6430
Created January 14, 2015 18:07
Marc's mybot2.js: LEDs show distance from obstacle and bot turns, reverses or stops depending on obstacle distance
// =======================
// Derived from the work done by @makenai on the
// SumoBot Jr
// =======================
var five = require("johnny-five");
var keypress = require('keypress');
var pixel = require("../../lib/pixel.js");
var RSTOPVAL = 93;

Keybase proof

I hereby claim:

  • I am marcmerlin on github.
  • I am marcmerlin (https://keybase.io/marcmerlin) on keybase.
  • I have a public key whose fingerprint is 0224 1E8B CD69 2675 CF95 29E5 8DF2 785D E1B5 1FF3

To claim this, I am signing this object:

//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 Ken Shirriff
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
//
// Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
// Modified by Mitra Ardron <mitra@mitra.biz>
// Added Sanyo and Mitsubishi controllers
// Modified Sony to spot the repeat codes that some Sony's send
#define FASTLED_ESP32_I2S
#include <FastLED.h>
#define NUM_LEDS_PER_STRIP 256
#define LINES 16
#define PIXELS (NUM_LEDS_PER_STRIP * LINES)
#define BRIGHTNESS 128
CRGB leds[NUM_LEDS_PER_STRIP*16];
#!/bin/bash
test -e /tmp/leds || mkfifo -m666 /tmp/leds
sudo /home/pi/env/bin/python /home/pi/leds.py
Apr 11 17:07:57 gargamel zmpkg[16870]: INF [Sanity checking States table...]
Apr 11 17:07:57 gargamel zmpkg[16870]: INF [Command: start]
Apr 11 17:07:57 gargamel zmdc[16886]: INF [Server starting at 20/04/11 17:07:57]
Apr 11 17:07:58 gargamel zmdc[16886]: INF [Socket should be open at /tmp/zm/zmdc.sock]
Apr 11 17:07:58 gargamel zmpkg[16870]: INF [Single server configuration detected. Starting up services.]
Apr 11 17:07:58 gargamel zmdc[16921]: INF ['zmc -m 1' started at 20/04/11 17:07:58]
Apr 11 17:07:58 gargamel zmdc[16886]: INF ['zmc -m 1' starting at 20/04/11 17:07:58, pid = 16921]
Apr 11 17:07:59 gargamel zmdc[16925]: INF ['zma -m 1' started at 20/04/11 17:07:58]
Apr 11 17:07:59 gargamel zmdc[16886]: INF ['zma -m 1' starting at 20/04/11 17:07:58, pid = 16925]
Apr 11 17:07:59 gargamel zma_m1[16925]: ERR [zma_m1] [Shared data not initialised by capture daemon for monitor cam-patio]