Blog 2022/8/7
<- previous | index | next ->
Here is an Arduino sketch which reads values
# All my gist code is licensed under the terms of the MIT license. | |
# Video demo: https://www.youtube.com/shorts/0zx4uSBUt_k | |
# Add this somewhere in your ~/.bashrc | |
# Use bash-preexec.sh (https://github.com/rcaloras/bash-preexec) to: | |
# - disable the Ctrl-Z keybinding before printing the prompt | |
# - enable the Ctrl-Z keybinding before executing a command | |
# |
Blog 2022/8/7
<- previous | index | next ->
Here is an Arduino sketch which reads values
import serial | |
import io | |
import struct | |
from adafruit_debouncer import Debouncer | |
PORT = "COM7" # update me to match your setup! | |
BUTTON_0_MASK = 0b000000000010000 | |
BUTTON_1_MASK = 0b000000100000000 | |
BUTTON_2_MASK = 0b000001000000000 |
I find the ability to get my android devices' battery info on my desktop computers via cli to be extremely convenient. I used to be able to this with KDE Connect easily, but things have just changed. Since I can't find any documentation on how to do this, and since I just stumbled on the answer myself, I though I might share what I know here. Please note that in the examples below, I will be using {device-id}
as a placeholder for the string that KDE Connect uses to identify to my devices.
That said, I used to be able to get my various devices' battery status through gdbus through the following:
gdbus call --session --dest org.kde.kdeconnect --object-path /modules/kdeconnect/devices/{device-id} --method org.kde.kdeconnect.device.battery.charge
However on Arch, I now get the following error: Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownInterface: No such interface 'org.kde.kdeconnect.device.battery' at object path '/modules/kdeconnect/devices/b04294f19e8767f5'
. I don't get this message on
#! /usr/bin/env python3 | |
""" | |
List all Firefox tabs with title and URL | |
Supported input: json or jsonlz4 recovery files | |
Default output: title (URL) | |
Output format can be specified as argument | |
""" |
Warning: this document has to be updated by pointing to https://github.com/SpenceKonde/ATTinyCore
This note describes the configuration of an ATtiny85 based microcontroller development board named Digispark and similar to the Arduino line. It is available in many online marketplaces for roughly 1 dollar (e.g., Ebay, Amazon, AliExpress) and is shipped fully assembled, including a V-USB interface (a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers). Coding is similar to Arduino: it uses the familiar Arduino IDE and is already provided with a ready-to-use bootloader (
I initially had some problems installing on my laptop, so decided to boot Ubuntu 12.04.5 LTS, 3.13.0-32-generic from USB and work from there.
For an automated installation script, see gpib_install.sh (and gpib.conf) below. The rest of this document describes the actions of the installation script step-by-step.
First, get the packages that are necessary to support Python bindings: