RGB5050 LEDs are programmed by sending a stream of 24-bit GRB packets, MSB first.
The logical 1s and 0s in the packets are encoded on a single line which is sent high or low with these timings:
- 0 -> 0.3µs high ± 0.15µs, 0.9us low ± 0.15µs
# /etc/raspotify/conf -- Arguments/configuration for librespot | |
# A non-exhaustive list of librespot options and flags. | |
# Please see https://github.com/dtcooper/raspotify/wiki & | |
# https://github.com/librespot-org/librespot/wiki/Options | |
# for configuration details and a full list of options and flags. | |
# You can also find a full list with `librespot -h`. |
I recently started using the excellent adm wrapper for the android debug bridge.
I quickly noticed that my app was hanging on startup on an aarch_64
(Apple M1) machine.
Fortunately, vert.x, a dependency of adm, gave the following warning:
[vertx-blocked-thread-checker] WARN io.vertx.core.impl.BlockedThreadChecker - Thread Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 4985 ms, time limit is 2000 ms
#define ETAPE A0 | |
// Set crucial level as appropriate for your needs. | |
// For me, 687 indicates three inches of water. | |
#define CRUCIAL_LEVEL 687 | |
#define LED_RED 13 | |
#define LED_GREEN 12 | |
float resistance; |
#define ETAPE A0 | |
// Set crucial level as appropriate for your needs. | |
// For me, 687 indicates three inches of water. | |
#define CRUCIAL_LEVEL 687 | |
#define LED_RED 13 | |
float resistance; | |
void setup(void) { |
#define ETAPE A0 | |
float resistance; | |
void setup(void) { | |
Serial.begin(9600); | |
} | |
void loop(void) { | |
resistance = analogRead(ETAPE); |
if version < 704 | |
" if we are somehow running a version lower than 7.4, | |
" something's wrong, so just stop processing this file. | |
finish | |
endif | |
" auto reload vimrc after edit | |
autocmd! bufwritepost .vimrc source % | |
" vi? is it even possible to run original vi anymore? |
# Answer to a ruby koan: | |
# http://koans.heroku.com/en/about_proxy_object_project | |
# Project: Create a Proxy Class | |
# | |
# In this assignment, create a proxy class (one is started for you | |
# below). You should be able to initialize the proxy object with any | |
# object. Any messages sent to the proxy object should be forwarded | |
# to the target object. As each message is sent, the proxy should | |
# record the name of the method send. |
# http://koans.heroku.com/en/about_triangle_project_2 | |
# | |
# XXX why does the second TriangleError.new cause a syntax error | |
# in the heroku web app, but not in my irb repl!? | |
class TriangleError < Exception | |
end | |
def triangle(a, b, c) | |
sides = [a, b, c] |
. $topsrcdir/browser/config/mozconfig | |
# Define where build files should go. This places them in the directory | |
# "obj-ff-dbg" under the current source directory | |
mk_add_options MOZ_OBJDIR=../build_mc | |
# -s makes builds quieter by default | |
# -j4 allows 4 tasks to run in parallel. Set the number to be the amount of | |
# cores in your machine. 4 is a good number. | |
mk_add_options MOZ_MAKE_FLAGS="-s -j6" |