This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
reactiveTrigger <- function() { | |
counter <- reactiveVal(0L) | |
list( | |
listen = function() { | |
counter() | |
invisible() | |
}, | |
trigger = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
## Usage | |
- publish to MQTT topic "ledfloorupdates" to change the color(s) of the LED floor | |
- send a string of the shape "x y r g b" to change the color of an individual pixel x,y to RGB(r,g,b) | |
- send a string of the shape "r g b" to change the color of all pixes to RGB(r,g,b) | |
## Starting the Server | |
- start the Raspberry Pi | |
- ssh pi@10.90.154.80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Problem: ggplots's geom_area() does not allow to make stepwise curves (a la geom_step) easily. | |
# Intead, it always connects the dots directly. | |
# Solution: We will add additional rows to the data frame to match the steps. | |
library(ggplot2) | |
library(dplyr) | |
# some random data | |
df <- data.frame(x = seq(10), y = sample(10)) |