Skip to content

Instantly share code, notes, and snippets.

if (!e131.isEmpty()) {
e131_packet_t packet;
e131.pull(&packet); // Pull packet from ring buffer
if (htons(packet.universe) == UNIVERSE) {
for (int i = 0; i < NUM_PIXELS; i++) {
int j = i * 3 + 1;
pixels.setPixelColor(i, packet.property_values[j], packet.property_values[j+1], packet.property_values[j+2]);
}
pixels.show();
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the Serial Monitor
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/DigitalReadSerial
*/
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the Serial Monitor
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/DigitalReadSerial
*/
/* FreqMeasureMulti - Example with serial output
* http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
*
* This example code is in the public domain.
*
* I connected PIN 4 to PIN 6, PIN 4 to PIN 10 and PIN 3 to PIN 9
* Results for Serial Output "n, 1463.99, 50.0000000000, 341520.84"
*
* Uncomment line 95 to see last value change
*
/* FreqMeasureMulti - Example with serial output
* http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
*
* This example code is in the public domain.
*
* I connected PIN 4 to PIN 6, PIN 4 to PIN 10 and PIN 3 to PIN 9
* Results for Serial Output "n, 1463.99, 50.0000000000, 341520.84"
*
* Uncomment line 95 to see last value change
*
/* FreqMeasureMulti - Example with serial output
* http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
*
* This example code is in the public domain.
*
* I connected PIN 4 to PIN 6, PIN 4 to PIN 10 and PIN 3 to PIN 9
* Results for Serial Output "n, 1463.99, 50.0000000000, 341520.84"
*
* Uncomment line 95 to see last value change
*
/* FreqMeasureMulti - Example with serial output
* http://www.pjrc.com/teensy/td_libs_FreqMeasure.html
*
* This example code is in the public domain.
*
* I connected PIN 4 to PIN 6, PIN 4 to PIN 10 and PIN 3 to PIN 9
* Results for Serial Output "n, 1463.99, 50.0000000000, 341520.84"
*
* Uncomment line 95 to see last value change
*
#!/bin/bash
# chkconfig: 2345 90 90
# description: inetmon
### BEGIN INIT INFO
# Provides: inetmon
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start the program
#!/usr/bin/python
import json
import requests
# Note: Change localhost to the correct IP if needed.
r = requests.get('http://10.22.22.154/admin/api.php')
rstats = json.loads(r.text)
stats = {}
for x in rstats:
[
{
"id": "e6314782.bec858",
"type": "mqtt in",
"z": "2b42b2a.11da84e",
"name": "Tautulli",
"topic": "tautulli",
"qos": "2",
"broker": "37dc943f.c419dc",
"x": 160,