Tag Archives: programming

Arduino IDE

Adding boards:

File > Preferences > Additional Boards
Add url (comma separated)
Press OK

ESP32 :

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

ATTINY85:

https://arduino.esp8266.com/stable/package_esp8266com_index.json,https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

After that go to the Board manager.
Tools > Board: ..... > Board Manager
Search board, click and install.
NOTE: Some sketches require a specific version!

Select your board, and write/open you sketch.

First thing to do is test compiling your sketch

Press the little button on the left

Libraries:

When you get a compile error like below, you are missing those libraries

Goto tools > Manage libraries

Search for your needed library, sometimes there are multiple which look alike. This is a trial and error approach.
Sometimes it doesn’t exists and you need to upload a zip containing the library. (Sketch > Include Library > Add .zip library

Downloading a zip containing the library
Adding the library zip file

When looking at the first lines of you sketch, there are include statements like:

#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>

But sometimes there are statements without the < > characters.
Then it will be a included file just for your sketch.

Note the second tab MPU6050x.h which contains specific code only for this sketch.

Redo a test recompile using the tic icon again.

Everything okay? .. Select the correct port in Tools > Port
And press the Arrowright icon to upload/flash.
Note: sometimes you have to hold a button or press a little flash button on your device to flash.

esptool.py v3.3
Serial port COM8
Connecting.....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:c9:a3:f9:02:d0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000c7fff...
Flash params set to 0x022f
Compressed 18880 bytes to 12992...
Writing at 0x00001000... (100 %)
Wrote 18880 bytes (12992 compressed) at 0x00001000 in 0.3 seconds (effective 482.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 627.7 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 1087.9 kbit/s)...
Hash of data verified.
Compressed 750976 bytes to 477779...
Writing at 0x00010000... (3 %)
...
...
...
Writing at 0x000bb633... (93 %)
Writing at 0x000c0acd... (96 %)
Writing at 0x000c6649... (100 %)
Wrote 750976 bytes (477779 compressed) at 0x00010000 in 6.3 seconds (effective 947.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Most of the boards you can connect via micro-usb.
Sometimes you need adaptors like:

TIPS ‘n tricks:

Open same file in another editor, so you can compare for example the top (declarations) and futher down the code.
Else you could be ending up scolling up/down all day long. And probably forgetting how a variablename was exacly spelled.

Use serial monitor!
When debugging this is a valuable tool.
Enter statements into you code, which prints debugging info to a serial monitoring window when your device is still hookedup to your PC.

Example printing connected IP and values registered
You even can use serial plotting!!

How to print?

void setup(){
  Serial.begin(115200);
  ... code 
  Serial.println("Connecting...");
  ... code
  Serial.println(WiFi.localIP());

  or 

  Serial.println(measuredvalue);

Other obvious tips:
Add comment lines (documentation)
Use variable names which make sense!
( Hard to find what aaaa() does, or what tmp-a is, but
LastTempValue says a lot more)

MCH 2022

Back from the hackers event “May Contain Hackers”

MCH2022 is a nonprofit outdoor hacker camp taking place in Zeewolde, the Netherlands, July 22 to 26 2022. The event is organized for and by volunteers from the worldwide hacker community.

Knowledge sharing, technological advancement, experimentation, connecting with your hacker peers and hacking are some of the core values of this event.

MCH2022 is the successor of a string of similar events happening every four years since 1989.
These are GHPHEUHIPHALWTHHAROHM and SHA.

I’ve bin to several of these big events. Besides these big events are many different smaller events (wannull, ne2000 etc).

First one i’ve been was HIP97. I went with Bigred at that time.
I had to get the tickets at that time, he didn’t had a handle at that time. It was Monique who came up with his new nick.

After HIP97 there was HAL2001 WTH2005 and OHM2013 which i was present.
HAL2001 the whole ICEcrew was present, WTH a part of them, OHM a few and i was with a few PRUTS friends.

Now i was with my girlfriend, AND with Bigred again!
Loads of fun and memories. Had not seen Bigred since a inbetween hacker party at my place.
So ’97 and now ’22 .. jeez 25 years!

So MCH, it was great again.
Loads of stuff to do and to see.
Weather was … okay. Two days where really hot, one day some light rain but a load of wind. Our neighbours tent collapsed, beer tents where reenforced.
First campsite with a supermarket!
Music stage was awesome, lasers and fire!

I went to a lot of talks, even my girlfriend found some she was interested in.

This was the last time i’ve brought my “Windows free zone tape”
This big roll of tape was used on many occasions.
I got this roll somewhere < 2000, I did a search but couldn’t find anything mentioning it on the web. Maybe some archive.org entry?

  • Starting a Home Computer Museum (which i almost did in the past)
  • streaming 360 video (going to try this with my Vuze XR Camera)
  • Non-Euclidean Doom: what happens to a game when pi is not 3.14159…
    (Really enjoyed this one)
  • Hacking the genome: how does it work, and should we?
  • And more

Besides the talks i’ve done some workshops:

  • Micropython on the badge (see my other post)
  • Kicad – PCB designing

Meanwhile we where looking at all the villages and hackerspaces. Loads of interesting people to meet. Like our neighbour two tents futher, he was also a home-brewer, and he brought a minifridge with beer taps connected to it.

When back at our tent or Bigreds Campervan, we talked about differences now and then. New technology, what we’ve been upto in the last years and tinkering, loads of tinkering.

I’ve brough a big plastic container with .. ehh “things to do ….”

  • My 6502, bigred helped me debugging the 16*2 display.
    (Luckily his campervan was packed with electronics!)
    We cannibalized one of his projects for a display, and re-flashed his eeprom programming arduino to test my display. ( The arduino i had to reflash later to program a rom he had given me for my 6502. )
    Other toys he gave me: Print for the programmer, and a C64 Cartridge print for Exrom and Game.
  • Mini C64 with a little screen and raspberry zero.
  • 5050 ledstrip (didn’t had time to reprogram this for our mood-light)
  • Handheld gamehat: Bigred found some old games he played when he was young
  • Mikrotik router, because i wanted to make a dmz for my girlfriends laptop. (MS)
  • Playing around with my Vuze XR camera
  • Huskycam, which i’m planning to use on a racetrack
  • DVB-T DAB FM Stick, got some hints and tips from Bigred.
    (Note to myself … fix the antenna!)
  • My Arduino touch bagpipe player with i2c
  • The wifi deauther, which has a display which i wanted to use to make a programmable clock for my 6502. Using a rotary encoder and the display to control the speed in Hz.
  • I spend many hours playing with the Badge and Kicad

Wrote some 6502 assembly, arduino sketches, php, bash and micropython.

While playing around with the badge i got some things working easily.
Spinning logo and blinky leds.
Next goal to achieve was, to get the gyroscope to control the angle of spinning.
Most of the code worked, but the gyro values stayed zero!
(After many hours …. you have to start/enable the chip/measurements on the bno055 first! .. duh! )

I didn’t had my dev directory from my main battlestation synced in my nextcloud, so changing things for the 6502 was a b*tch.
Used vasm and acme to generate a bin file to use to fill the rom.
Didn’t like the eeprom programmer program, because i could not easily check the rom contents.
Have to look into that later on.

While learning to use Kicad, which i only had been using to draw schematics (besides fritzing) , i learned to create a pcb.
Which gave me the idea to make a print for the power-on-reset for the 6502. Which is going to be the first PCB by ordering, instead of the old skool messing around with DIY print making. (see next post)

….. Oh, why my display was not working?
I even connected my 8bit logic analyzer to the pins of the display.

Everything was correct.
But i didn’t use a variable resistor for the contrast. Just a simple resistor i could find. Luckily … bigreds stash.
All those hours debugging, all for one resistor!
(I have to mention, we had a suspicion halfway. But it was too hot and we where too lazy to go to Bigred’s campervan, to get a potentiometer. )

Goodies from Bigred

DIY 6502 – VIC (Versatile Interface Adapter)

65c22 connected, new data, and address-bus ribboncables!

First led on Register B blinking!

Notes:
Temporary display wil be 2×16 Chars.
Ram in place, but not connected (is emulated by the Arduino Mega at the moment)
Rom is somewhere halfway the atlantic ocean .. still waiting on that one.
Ben Eatons clock module is disconnected, i’m using the Arduino as programmable clock right now.
(There wil be a little display and a rotary encoder to set clock speed.)

lda #$ff ; all bits
sta $6002 ; set direction (out) for B register
lda #$80 ; set 1 bit
sta $6000 ; set register B
lda #$00 ; reset bit
sta $6000 ; set register B
jmp $8005 ; jmp to bit set part

MCH2022 Badge

Almost … friday will be the day i’ll attend May Contain Hackers.
Besides the awesome villages and talks.

UPDATE: 20220727
UPDATE: 20220812

You get a hackable badge, this one is more amazing as previous versions.

I can’t wait to have a go at this cool gadget. I personally could do without the pcb fancy design.

  • Espressif ESP32 Wrover-E with 16MB of flash storage and paired with 8MB of PSRAM, for front-end badge computing and compatibility with the badge.team ecosystem back to the 2017 SHA badge.
  • Lattice ICE40UP5K FPGA for hardware-accelerated graphics and user FPGA hardware designs.
  • Raspberry Pi RP2040 for advanced USB communication and board management.
  • 2Ah LiPo battery to give you a full day of fun on a charge.
  • 16-bit DAC with stereo output to headphone socket, onboard mono speaker.
  • ILI9341 2.2 inch TFT display with a 240 by 320 pixel resolution.
  • Bosch BNO055 orientation sensor.
  • Bosch BME680 environmental sensor.
  • The usual array of addressable LEDs.
  • SAO and Qwiic expansion connectors, FPGA PMOD expansion, plus onboard prototyping area.

Downloadable apps, micro python, Arduino ide programming.
All kinds of GPIO pins, leds buttons, sound.
Check out https://hatchery.badge.team/

You can play with this virtually here!
https://wokwi.com/projects/335445228923126356

So much potential! Great start for a DIY project.

I won’t post about the workings, thats all well documented online.
I shall post about the hacks/findings i personally did.

UPDATE: 20220727
Made a micropython program to keep your NameTag level to the ground (Better version)

UPDATE: 20220812

Someone made a 8bit logic analyser using the pmod connector !

C64/6502 and Assembly

I’ve used a basic program on C64 in the past and a Cartridge machinecode monitor in the past.
I’ve really forgotten how, what i’ve used and what i’ve done with it.
Not nearly as much as my friends at that time.
I started with a Vic-20 and played around with machinecode on a 6502.
I didn’t have a C64 for many years.

I’ve recently started to build a 6502 computer again, and programming on 65xx again (Generic 6502 and C64). (2022)

Below is my setup on linux, to write assembly code, compiling and running the code in a emulator.

I have installed the Acme compiler and Vice as a emulator.
Both can compile/run machinecode for multiple computer emulations. So maybe i can run my old Vic-20 machine code or the few C64 programs i’ve written.

I’ve only made the bash script, the included asm files i copied from someone on the internet. ( Credit lookup )

makeprg bash file:

#!/bin/bash
set -x
f=""
if [ "$2" == "f" ] ; then f="-fullscreen" ; fi 
if [ ! -f $1.asm ] ; then
cp template.asm $1.asm
fi
vi $1.asm
acme --cpu 6510 --format cbm --outfile $1.prg $1.asm
if [ ! $? -eq 0 ] ; then exit 1 ; fi 
c1541 -format foo,id d64 $1.d64 -write $1.prg
if [ ! $? -eq 0 ] ; then exit 1 ; fi 
x64 $f $1.prg 

template.asm

!source "basic-boot.asm"

+start_at $0900

; Set background and border to black
ldx #$00
stx bgcol
stx bocol

; Flicker border and background
.loop
  inc bgcol
  inc bocol
  jmp .loop

basic-boot.asm

; A BASIC booter, encodes `10 SYS <address>`.
; Macroified from http://www.pouet.net/topic.php?which=6541

!source "constants.asm"

!macro start_at .address {
  * = basic
  !byte $0c,$08,$00,$00,$9e
  !if .address >= 10000 { !byte 48 + ((.address / 10000) % 10) }
  !if .address >=  1000 { !byte 48 + ((.address /  1000) % 10) }
  !if .address >=   100 { !byte 48 + ((.address /   100) % 10) }
  !if .address >=    10 { !byte 48 + ((.address /    10) % 10) }
  !byte $30 + (.address % 10), $00, $00, $00
  * = .address
}

; A cooler example is to write
;
;   10 SYS <address>: REM <backspaces>Your comment
;
; When the user types LIST, he will just see
;
;   10 Your comment
;
; but still be able to run it.
; For this, see http://codebase64.org/doku.php?id=base:acme-macro-tu

When running above bash script. it will open the file if it exists, else it will take a template file.
After opening it with vi, and editing it, it starts a the compiler and creates a C64 d64 disk.
This is going to be autorun/started with the VIce emulator.
Appending -f to the bash script will start it in fullscreen mode.
./makeprg myawesomedemo.asm -f

Below it is running without the fullscreen option. but is shows how to start the interactive monitor in vice.

  • n – step x instructions
    n 100
  • m monitor
(C:$103e) m
>C:103e  cd 12 d0 d0  fb a2 00 bd  5c 10 bc 79  10 88 d0 fd   ........\..y....
>C:104e  8d 20 d0 8d  21 d0 e8 e0  1d d0 ec 4c  81 ea 06 00   . ..!......L....
>C:105e  0e 06 0e 0e  03 0e 03 03  01 03 01 01  01 01 03 01   ................
>C:106e  03 03 0e 03  0e 0e 06 0e  00 06 00 07  09 09 09 09   ................
>C:107e  09 09 09 07  09 09 09 09  09 09 09 07  09 09 09 09   ................
>C:108e  09 09 09 07  09 09 09 09  00 00 00 00  ff ff ff ff   ................
>C:109e  00 00 00 00  ff ff ff ff  00 00 00 00  ff ff ff ff   ................
>C:10ae  00 00 00 00  ff ff ff ff  00 00 00 00  ff ff ff ff   ................
>C:10be  00 00 00 00  ff ff ff ff  00 00 00 00  ff ff ff ff   ................
(C:$10ce) 
  • d -assemble
(C:$1041) d 1000
.C:1000  78          SEI
.C:1001  A5 00       LDA $00
.C:1003  8A          TXA
.C:1004  98          TYA
.C:1005  8D 20 D0    STA $D020
.C:1008  8D 21 D0    STA $D021
.C:100b  A0 7F       LDY #$7F
.C:100d  8C 0D DC    STY $DC0D
.C:1010  8C 0D DD    STY $DD0D
.C:1013  AD 0D DC    LDA $DC0D
.C:1016  AD 0D DD    LDA $DD0D
.C:1019  A9 01       LDA #$01
.C:101b  8D 1A D0    STA $D01A
.C:101e  A9 39       LDA #$39
.C:1020  A2 10       LDX #$10
.C:1022  8D 14 03    STA $0314
.C:1025  8E 15 03    STX $0315

Etc .. see https://vice-emu.sourceforge.io/vice_12.html

Photo manager addition using ML!

A few years ago i wrote a photo manager .. again .. ( see post about my first previous photo manager )
It is a web gui to find photos in my huge photo archive.
I manually added 190k tags to 120k photos in 20+ years.

I thought wouldn’t it be nice if i can generate additional metadata using Machine Learning. A few years ago i did some testing and followed a podcast and free course about machine learning.

So today i started to implement a addition to my gui. Machine recognition tags!

It already kinda works.

Things to do :

  • Make it a background job, my fileserver doesn’t run Tensorflow on a GPU, so it is slooow
  • Embed in existing GUI and stats
  • Design a editor to remove wrong tags

Below a part of ML images

Command to get a thumbnail sheet with only directory names:

montage -verbose -units PixelsPerInch -density 300 -tile 7x6 -label "%d" -font Arial -pointsize 6 -background "#FFFFFF" -fill "black" -define jpeg:size=253x154 -geometry 253x154+2+2 -auto-orient */*.JPG -title "ML Thumbs" thumbsheet.jpg

Maybe, i can use debug output like below.

['lakeside, lakeshore (score = 0.47934)', 'seashore, coast, seacoast, sea-coast (score = 0.11385)', 'sandbar, sand bar (score = 0.08822)', 'breakwater, groin, groyne, mole, bulwark, seawall, jetty (score = 0.06281)', 'valley, vale (score = 0.01790)', '']

Scraping podcast which uses a javascript to obfuscate mp3 links

wget-ting the page only gave me flat html, but no readable links.

We need the rendered version, phantomjs wil help

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

printsource.js

var system = require('system');
var page   = require('webpage').create();
var url    = system.args[1];
page.open(url, function () {
  console.log(page.content);
  phantom.exit();
});

Run phantomjs

phantomjs-2.1.1-linux-x86_64/bin/phantomjs printsource.js  https://xxxxxxxx/show/xxxx > out

So now i got the rendered page, get mp3’s and titles, for this example

cat out | sed 'N;s/\n/,/' | cut -f2,7 -d\" | while read line ; do
mp3=$( echo $line | cut -f1 -d\")
title=$( echo $line | cut -f3 -d\&gt; | tr -d '/&lt;&gt;[]]\!,;' | tr -d "'" | sed s/CDATA//g | sed s#title##g | sed s/:/-/g )
echo "$mp3 $title"
wget $mp3 -O "$title.mp3"
done

bash downloadscript
done

Mqtt Bash Nodered Notify

When running scripts which take a long time, i don’t want to wait for things to finish before i can start the next one.

For example, using my dedup script or compiling stuff. I wanna know when it is finished.

So i made some scripts

Maybe you can hear the spoken text in the background playing downstairs

I’ve put a function in .bashrc, so i can use a command like
notify “Compiling is ready”
A command like this i can put at the end of a command or in a script file at the end.
make && make install && notify “compile ready”

What does it do when executed?

  • Send a mqtt message to the broker
  • Node-red will read this message and:
    • Send a message to my display on my desk – Sound and message notification. (See another post how i made this )
    • Send a message to a script on my Domoticz instance downstairs.
      • This will use a script to get a speech file from google, and play this on some small speakers in my livingroom
    • Send a pushover message to my phone
    • Display a message on my TV ( not in code below )

How?

At the end of your .bashrc

function notify() {
    if [ -z "$1" ]; then
        echo "Usage: $0 \"message\"";
        exit 1;
    fi
    mosquitto_pub -h 10.1.0.17 -t notify/bashscript -m "$1"
}

Scripts on my Domoticz instance

Python script

#!/usr/bin/python
import paho.mqtt.client as mqttClient
import time
import os
import subprocess
import shlex
Connected = False

def on_connect(client, userdata, flags, rc):
    if rc == 0:
        print("Connected to broker")
        global Connected
        Connected =True
    else:
        print("Connection failed")

def on_message(client, userdata, message):
    print "Message received: " + message.topic + " : " + message.payload
    fileName = "/home/pi/domoticz/scripts/speech" + " \"" + message.payload + "\""
    print fileName
    args = shlex.split(fileName)
    time.sleep(1)
    p = subprocess.Popen(args)


broker_address = "10.1.0.17"
port = 1883
#user = "user"
#password = "password"
client = mqttClient.Client("speechcmd")
#client.username_pw_set(user, password=password)
client.on_connect = on_connect
client.on_message = on_message

client.connect(broker_address, port=port)
client.loop_start()

while Connected != True:
    time.sleep(0.1)

client.subscribe('speech/cmd')

try:
    while True:
        time.sleep(1)

except KeyboardInterrupt:
    print "exiting"
    client.disconnect()
    client.loop_stop()

Caching speech script

This script will look for a cached audiofile with requested text, and uses that. Else it wil request a audio file from google, caches it and plays it though the speakers.

#!/bin/bash
INPUT=$*
input2=$(echo $INPUT | base64)
echo "$input2 = $INPUT" >> /home/pi/cache/files-text-relation
if [ -f /home/pi/cache/$input2.mp3 ] ; then
mpg123 -q /home/pi/cache/$input2.mp3 1>/dev/null 2>/dev/null
else
echo not cached
STRINGNUM=0

ary=($INPUT)
for key in "${!ary[@]}"
  do
    SHORTTMP[$STRINGNUM]="${SHORTTMP[$STRINGNUM]} ${ary[$key]}"
    LENGTH=$(echo ${#SHORTTMP[$STRINGNUM]})
    #echo "word:$key, ${ary[$key]}"
    #echo "adding to: $STRINGNUM"
    if [[ "$LENGTH" -lt "100" ]]; then
      #echo starting new line
      SHORT[$STRINGNUM]=${SHORTTMP[$STRINGNUM]}
    else
      STRINGNUM=$(($STRINGNUM+1))
      SHORTTMP[$STRINGNUM]="${ary[$key]}"
      SHORT[$STRINGNUM]="${ary[$key]}"
    fi
done

for key in "${!SHORT[@]}"
  do
    echo "Playing line: $(($key+1)) of $(($STRINGNUM+1))"
    NEXTURL=$(echo ${SHORT[$key]} | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g')
echo $NEXTURL
    mpg123 -w $input2 -q "http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=$NEXTURL&tl=En-us"
    ffmpeg -i $input2 -codec:a libmp3lame -qscale:a 2 /home/pi/cache/$input2.mp3
mpg123 /home/pi/cache/$input2.mp3
done
fi

Node-red flow

function notify() {
    if [ -z "$1" ]; then
        echo "Usage: $0 \"message\"";
        exit 1;
    fi
    mosquitto_pub -h 10.1.0.17 -t notify/bashscript -m [
    {
        "id": "1442fca698589679",
        "type": "mqtt in",
        "z": "cb6f001b.721c3",
        "name": "",
        "topic": "notify/bashscript",
        "qos": "2",
        "datatype": "auto",
        "broker": "8c74c5f6.9a7a48",
        "nl": false,
        "rap": false,
        "inputs": 0,
        "x": 180,
        "y": 580,
        "wires": [
            [
                "ddf5744bb5b73d4d",
                "faa5c794652d7a57",
                "b4e0107399248fea",
                "443f960b5d1cf40e"
            ]
        ]
    },
    {
        "id": "ddf5744bb5b73d4d",
        "type": "mqtt out",
        "z": "cb6f001b.721c3",
        "name": "",
        "topic": "speech/cmd",
        "qos": "",
        "retain": "",
        "broker": "8c74c5f6.9a7a48",
        "x": 590,
        "y": 560,
        "wires": []
    },
    {
        "id": "e95e828451d83158",
        "type": "comment",
        "z": "cb6f001b.721c3",
        "name": "bash notify",
        "info": "",
        "x": 170,
        "y": 540,
        "wires": []
    },
    {
        "id": "faa5c794652d7a57",
        "type": "mqtt out",
        "z": "cb6f001b.721c3",
        "name": "",
        "topic": "mqttlcd/message",
        "qos": "",
        "retain": "",
        "broker": "8c74c5f6.9a7a48",
        "x": 570,
        "y": 720,
        "wires": []
    },
    {
        "id": "b4e0107399248fea",
        "type": "delay",
        "z": "cb6f001b.721c3",
        "name": "",
        "pauseType": "delay",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "outputs": 1,
        "x": 480,
        "y": 640,
        "wires": [
            [
                "ac4faf30b8adbe3f"
            ]
        ]
    },
    {
        "id": "ac4faf30b8adbe3f",
        "type": "function",
        "z": "cb6f001b.721c3",
        "name": "Empty payload",
        "func": "msg.payload = \"\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 640,
        "y": 640,
        "wires": [
            [
                "faa5c794652d7a57"
            ]
        ]
    },
    {
        "id": "dfbe26c12fc5e742",
        "type": "pushover",
        "z": "cb6f001b.721c3",
        "name": "Alleen Henri",
        "device": "rmx1931",
        "title": "Node-Red-Pushover",
        "priority": "1",
        "sound": "pushover",
        "url": "",
        "url_title": "",
        "html": false,
        "x": 850,
        "y": 500,
        "wires": []
    },
    {
        "id": "443f960b5d1cf40e",
        "type": "function",
        "z": "cb6f001b.721c3",
        "name": "Set pushover payload",
        "func": "\nmsg.topic = \"Bash Notify\";\nmsg.priority = 1;\nmsg.sound = \"cosmic\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 660,
        "y": 500,
        "wires": [
            [
                "dfbe26c12fc5e742"
            ]
        ]
    },
    {
        "id": "8c74c5f6.9a7a48",
        "type": "mqtt-broker",
        "name": "10.1.0.17",
        "broker": "10.1.0.17",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "15",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    }
]


MPF-1B – Z80 Training kit

One from my collection: A training kit for learning to write machine language.

Update: 20220514 – Save and Load a program
Update: 20220829 – Mad-1 computer runaway movie

A little example, life programming a little machine code.

ORG 1800
0E 80              ; LD C,0
21 C0 00           ; LD HL,00C0
CD E4 05           ; CALL 0X05E4
0E 01              ; LD C,0
21 00 01           ; LD HL,0100
CD E4 05           ; CALL 0X05E4
C3 00 18           ; JMP 0X1800

Found this cameo in the movie “Runaway”

Using a tape and COMX-35 cassette player, i can store and retreive programs

Old Skool saving a program
And loading a program

Above i mentioned a Runaway Cameo .. well there is a MAD-1 system cameo also. (Which also i in my collection)