More cheap LED bulbs from AliExpress
Endpoint 0x2d
4 hex bytes: bbggrrww
White will largely overpower the RGB - 0000ff44 = red tinted white
#!/bin/sh | |
# | |
# This script loops doing the following: | |
# - wait for DFU device | |
# - flash DFU device | |
# - wait for DFU to exit | |
# - wait for serial port to appear | |
# - run a terminal | |
SERIAL=/dev/ttyACM1 |
import octoprint.plugin | |
class MqttLightsPlugin(octoprint.plugin.StartupPlugin, octoprint.plugin.EventHandlerPlugin): | |
def __init__(self): | |
self.mqtt_publish = lambda *args, **kwargs: None | |
def on_after_startup(self): | |
helpers = self._plugin_manager.get_helpers("mqtt", "mqtt_publish") | |
if helpers: |
#!./venv2/bin/python | |
from gattlib import GATTRequester | |
class bulb: | |
_red = 255 | |
_green = 255 | |
_blue = 255 | |
def __init__(self, address): |
More cheap LED bulbs from AliExpress
Endpoint 0x2d
4 hex bytes: bbggrrww
White will largely overpower the RGB - 0000ff44 = red tinted white
Controller for an RGBW LED strip purchased from AliExpress
It only appears to fire up the RGB strip or the white strip, never both at once.
Endpoint = 0xb = 0000ffe9-0000-1000-8000-00805f9b34fb
cc2333 - fade on, to whichever output / colour was used last. Will re-fade if reissued.
cc2433 - fade off
56xxxxxxyyf0aa - change to RGB output - xxxxxx = colour code in hex. yy = anything hexy
#!/usr/bin/env python | |
# This file is part of the OpenMV project. | |
# Copyright (c) 2013/2014 Ibrahim Abdelkader <[email protected]> | |
# This work is licensed under the MIT license, see the file LICENSE for | |
# details. | |
# | |
# Adapted by the EMF Badge team as a simple one-script updater | |
"""This module implements enough functionality to program the STM32F4xx over | |
DFU, without requiringdfu-util. |
// width of the material you are cutting the measurer from | |
stock_width = 3; | |
// total kerf of an inside and outside cut. basically the width of your laser beam | |
kerf = 0.1; | |
// depth of the material the measurer is for. | |
material_depth = 5; | |
module top() |
wifi.setmode(wifi.STATION) | |
wifi.sta.config("SSID","PASSWORD") | |
wifi.sta.connect() | |
tmr.alarm(1, 100, 1, function() | |
if wifi.sta.getip() ~= nil then | |
tmr.stop(1) | |
m = mqtt.Client( "ESP8266-" .. node.chipid(), 120) | |
m:connect( "192.168.1.13" , 1883, 0, function(conn) | |
m:publish("button/1/pressed", "", 0, 0, function(conn) | |
node.dsleep(0) |
difference() | |
{ | |
square([400, 120], center=true); | |
translate ([0,63/2,0]) | |
{ | |
circle(r=30/2); | |
for(x=[-150, -100, 100, 150]) | |
translate([x,0]) circle(r=8/2); | |
} | |
for(x=[-192, 192]) |
[ ! -x "`which xset 2>/dev/null`" ] || xset s off & | |
[ ! -x "`which xset 2>/dev/null`" ] || xset -dpms & | |
[ ! -x "`which xset 2>/dev/null`" ] || xset s noblank & | |
[ ! -x "`which unclutter 2>/dev/null`" ] || unclutter -idle 10 -noevents & | |
sleep 5 | |
/usr/bin/chromium-browser --incognito --kiosk http://your.url |