# run the same Debian which's running on your RasPi
docker run --rm -it debian:bullseye
# add architecture
dpkg --add-architecture armhf
apt update
# add build tools
apt install curl build-essential gcc-arm-linux-gnueabihf pkg-config
This file contains hidden or 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
| { pkgs | |
| , lib | |
| , flakeInputs | |
| , ... | |
| }: | |
| let | |
| netIface = "enp0s20f0u4u1"; | |
| netPrefix = "192.168.42"; | |
| instances = [ | |
| { port = 8084; probe = "303a:1001:CC:BA:97:F0:E2:F8"; } |
This file contains hidden or 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
| // npm install modbus-serial | |
| // node prog-sdm120.mjs [serial-dev] [current-id] [new-id (optiomal)] | |
| import assert from 'node:assert'; | |
| import ModbusRTU from 'modbus-serial'; | |
| const port = process.argv[2]; | |
| assert(port, 'Paramter port missing'); | |
| const curId = parseInt(process.argv[3] || '1'); |
This file contains hidden or 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
| # name of your application | |
| APPLICATION = netif-bridge | |
| # If no BOARD is found in the environment, use this default: | |
| BOARD ?= homie-pihat | |
| # This has to be the absolute path to the RIOT base directory: | |
| RIOTBASE ?= $(CURDIR)/../.. | |
| # Comment this out to disable code in RIOT that does safety checking |
This file contains hidden or 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
| cd /opt | |
| wget https://nodejs.org/dist/latest-v8.x/node-v8.16.0-linux-armv6l.tar.gz | |
| tar xf node-* | |
| rm node-*.tar.gz | |
| cd node-*/bin | |
| update-alternatives --install /usr/bin/node node $(pwd)/node 1 | |
| update-alternatives --install /usr/bin/npm npm $(pwd)/npm 1 | |
| node --version |
This file contains hidden or 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
| <?php | |
| // CONFIG: | |
| // - Repository the webhook listens for | |
| $REPO = "user/repository"; | |
| // - Branch to observe | |
| $BRANCH = "master"; | |
| // - Action to be excuted | |
| $ACTION = "/bin/date > /tmp/watchdir/lastrun"; | |
| // - Secret |
This file contains hidden or 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
| [Unit] | |
| Description=Listen for touched file | |
| [Path] | |
| PathChanged=/tmp/watchdir | |
| [Install] | |
| WantedBy=multi-user.target |
Install dependencies
apt install build-essential linux-headers-$(uname -r) fxload pkg-config
wget "https://sourceforge.net/projects/linux-gpib/files/..."
tar xf linux-gpib-4.0.3.tar.gz
wget "http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz"
tar xf gpib_firmware-2008-08-10.tar.gz
Compile linux-gpib
This file contains hidden or 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
| "use strict"; | |
| let app = require( 'express' )(); | |
| let spawn = require( 'child_process' ).spawn; | |
| let busy = false; | |
| app.get( '/:freq', ( req, res ) => { | |
| try { |
NewerOlder