This is a instruction to patch the usb infrared toy driver into lirc sources. Most of the work is done by Peter Kooiman
- Debian based OS (only tested on rapbian)
- root privileges
- USB Infrared Toy
| // | |
| // Arduino serial-interface for controlling the ws2812 leds. The serial interface is based on the | |
| // Adalight protocol. The protocol is as follows: | |
| // [prefix][led count][checksum][red, green, blue]* | |
| // prefix := 'Ada' | |
| // led count := number of leds - 1 (uint16_t big endian) | |
| // checksum := led count high bit XOR led count low bit XOR 0x55 (uint8_t) | |
| // red, green, blue := channel intensity [0-255] (uint8_t) | |
| // | |
| // Slightly modified Adalight protocol implementation that uses FastLED | |
| // library (http://fastled.io) for driving WS2811/WS2812 led stripe | |
| // Was tested only with Prismatik software from Lightpack project | |
| #include "FastLED.h" | |
| #define NUM_LEDS 114 // Max LED count | |
| #define LED_PIN 6 // arduino output pin | |
| #define GROUND_PIN 10 | |
| #define BRIGHTNESS 255 // maximum brightness |
| # http://stackoverflow.com/questions/20211990/sending-data-curl-json-in-python | |
| import requests #pip install requests | |
| import simplejson as json #pip install simplejson | |
| url = "http://<ip-address>:3030" | |
| widget = "welcome" | |
| data = { "auth_token": "YOUR_AUTH_TOKEN", "text": "Python Greetings!!" } | |
| fullUrl = "%s/widgets/%s" % (url, widget) |
| #!/usr/bin/python | |
| import rtmidi, time | |
| buttons = { | |
| 58: 'track_left', | |
| 59: 'track_right', | |
| 46: 'cycle', | |
| 60: 'marker_set', | |
| 61: 'marker_left', |
This is a instruction to patch the usb infrared toy driver into lirc sources. Most of the work is done by Peter Kooiman
Dashing job to subscribe to MQTT messages.
MQTT is a lightweight publish/subscribe messaging transport. This job allows Dashing to subscribe to these messages and send them as events. There is no associated widget as the data can take any form - commonly numbers, but not necessarily. The script as laid out below sends events with value, current (the same contents) and last values so can be plugged directly into the Numbers or Meter widgets using the data-id in the dashboard file. The send_event could easily be modified if required.
Add to Gemfile:
| #!/usr/bin/env python | |
| import curses | |
| import curses.textpad | |
| import time | |
| stdscr = curses.initscr() | |
| #curses.noecho() | |
| #curses.echo() |
user:live/mnt. Arch Linux has a good guide to this: https://wiki.archlinux.org/index.php/Partitioningsudo apt-get install debootstrapsudo debootstrap RELEASE /mnt http://ftp.debian.org/debiansudo apt-get install ubuntu-archive-keyringsudo debootstrap RELEASE /mnt http://archive.ubuntu.com/ubuntu