Skip to content

Instantly share code, notes, and snippets.

@jadonk
jadonk / Makefile
Last active April 10, 2025 00:50
Broken AM62x PRU code with dmesg log
# This Makefile tries to provide some defaults for building single-file programs on Beagle
# platforms in part by adding an additional suffix ahead of the source file extension. The
# original purpose was to provide ability to run these programs in the Cloud9 IDE environment.
#
# Optional definitions
#
# TARGET - executable to create (currently supports single .c, .cpp or .asm source)
# should have .<proc>(<n>) extension (lower case, check below for valid options)
# without TARGET, as of now, we don't have any build targets
# TODO: work with a list of targets, rather than a single file
import time
import datetime
import gpiod
gpio2 = gpiod.find_line('GPIO2')
gpio2.request(consumer='five_min_toggle', type=gpiod.LINE_REQ_DIR_OUT, default_val=0)
prev_rem = -1
while True:
now = datetime.datetime.now()
Running with gitlab-runner 17.0.0 (44feccdf)
 on debian-docker-docker -8zNEeXF4, system ID: s_c027f9ed499e
section_start:1718207134:prepare_executor
Preparing the "shell" executor
Using Shell (bash) executor...
section_end:1718207134:prepare_executor
section_start:1718207134:prepare_script
Preparing environment
Running on debian-docker-docker...
section_end:1718207134:prepare_script
#!/usr/bin/perl
#############################################################################
# PixelOverlay-Countdown.pl - Scroll a Christmas Countdown across a matrix
#############################################################################
# Set our library path to find the FPP Perl modules use lib "/opt/fpp/lib/perl/";
use lib "/opt/fpp/lib/perl/";
print "#1\n";
# Use the FPP Memory Map module to talk to the daemon
@jadonk
jadonk / rapid-clone.sh
Created August 26, 2022 01:34 — forked from StaticRocket/rapid-clone.sh
Quickly backup and deploy bootable SD cards with variable size ext4 root partitions
#!/bin/sh
set -e
[ -z "$PART_PREFIX" ] && PART_PREFIX=''
DD_ARGS='bs=4K status=progress conv=fsync'
backup() {
src="$1"
dst="$2"
# /etc/systemd/system/barrier.service
[Unit]
Description=Barrier Client daemon
After=display-manager.service network.target
[Service]
Environment="XAUTHORITY=/home/debian/.Xauthority"
User=debian
Group=debian
ExecStart=barrierc --name AI64 --disable-crypto --debug INFO -f 192.168.0.22
# Copyright (C) 2021 Texas Instruments Incorporated - http://www.ti.com/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright
@jadonk
jadonk / mikroBUS-Greybus-BeagleConnect-Freedom-Demo.md
Last active November 8, 2021 03:25 — forked from vaishnavachath/mikroBUS-Greybus-BeagleConnect-Freedom-Demo.md
mikroBUS over Greybus BeagleConnect Freedom Demo

Seeed BeagleBone® Green Gateway host

When it comes to hardware setup, there is a fair bit of handwaving below. It is assumed for now you can figure out how to connect the antennas to the BeagleConnect Freedom boards and other similar hardware configuration steps.

OS Image for BeagleBone/PocketBeagle from SD card

  1. Download the special mikroBUS/Greybus BeagleBoard.org Debian image from here.
  2. Load this image to a microSD card using a tool like Etcher.
  3. Insert the microSD card into the Green Gateway.
  4. Power the Green Gateway via the 12V barrel jack.
  5. Use Ethernet via a cable or WiFi via connmanctl for an Internet connection.
@jadonk
jadonk / README.md
Last active November 10, 2021 04:01
$ ./decode-adc.js 
[
   0.5,    1,  1.5,    2, 2.5,    3,  3.5,
     4,  4.5,    5,  5.5,   6,  6.5,    7,
   7.5,    8,  8.5,    9, 9.5,   10, 10.5,
    11, 11.5,   12, 12.5,  13, 13.5,   14,
  14.5,   15, 15.5,   16
]
#!/usr/bin/perl
#############################################################################
# PixelOverlay-Countdown.pl - Scroll a Christmas Countdown across a matrix
#############################################################################
# Set our library path to find the FPP Perl modules use lib "/opt/fpp/lib/perl/";
use lib "/opt/fpp/lib/perl/";
print "#1\n";
# Use the FPP Memory Map module to talk to the daemon