Category Archives: Tech

Music Cover Art Display using ILI9431

Little Sunday afternoon project.

Two PHP scripts.

Install on your webserver (see previous post)

Resizes images and removes the onkyo header.
(See previous posts)

<?php
// onkyo.php
// write jpeg header
header('Content-type: image/jpg');

$lines = file_get_contents('http://IP-ONKYO-AMPLIFIER/album_art.cgi', false);
$lines = explode("\n", $lines);
// remove weird Onkyo header (3 lines)
$content = implode("\n", array_slice($lines, 3));
print $content;
?>

CoverArt from a squeezeboxserver

<?php    
// squeezebox.php
// leave playerid as is, for the default.
// change to MAC address of player to get coverart specific player
$img = file_get_contents('http://IP-LOGITECH_MEDIA_SERVER:9000/music/current/cover.jpg?player=<playerid>');
$im = imagecreatefromstring($img);
$width = imagesx($im);
$height = imagesy($im);
$newwidth = '240';
$newheight = '240';
$thumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($thumb, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
//imagejpeg($thumb,'small.jpg'); //save image as jpg
header('Content-Type: image/jpeg');
imagejpeg($thumb);
imagedestroy($thumb); 
imagedestroy($im);
?>

Arduino install:

Start IDE
Install TJpg_Decoder library
Open examples>Tjpeg_decoder>SPIFFS>SPIFFS_web_spiffs
change wifi credentials
and the url to your php script.
  bool loaded_ok = getFile("https://myserver/onkyo.php", "/M81.jpg"); // Note name preceded with "/"

replace bottom part with

 // while(1) yield();
 delay(5000);
     SPIFFS.remove("/M81.jpg");

Arduino Tiny Machine Learning Kit

A while ago I bought a little machine learning kit.

I’ve been reading at listening to ML podcasts and websites.

One on Spotify I liked was:

Also, the following Coursera was interesting
https://www.coursera.org/learn/machine-learning

I’ve been testing using Python on my Laptop.
(see other posts)

And a camera with esp32 using face detection.

See here multiple posts about these experiments.

https://www.henriaanstoot.nl/tag/machinelearning/

Today the first experiments using this kit.

  • Arduino Nano 33 BLE Sense board
  • OV7675 Camera
  • Arduino Tiny Machine Learning Shield
  • USB A to Micro USB Cable
  • 9 axis inertial sensor: what makes this board ideal for wearable devices
  • humidity, and temperature sensor: to get highly accurate measurements of the environmental conditions
  • barometric sensor: you could make a simple weather station
  • microphone: to capture and analyse sound in real time
  • gesture, proximity, light color and light intensity sensor : estimate the room’s luminosity, but also whether someone is moving close to the board
  • Microcontroller nRF52840
  • Operating Voltage 3.3V
  • Input Voltage (limit) 21V
  • DC Current per I/O Pin 15 mA
  • Clock Speed 64MHz
  • CPU Flash Memory 1MB (nRF52840)
  • SRAM 256KB (nRF52840)
  • EEPROM none
  • Digital Input / Output Pins 14
  • PWM Pins all digital pins
  • UART 1
  • SPI 1
  • I2C 1
  • Analog Input Pins 8 (ADC 12 bit 200 ksamples)
  • Analog Output Pins Only through PWM (no DAC)
  • External Interrupts all digital pins
  • LED_BUILTIN 13
  • USB Native in the nRF52840 Processor
  • IMU LSM9DS1 (datasheet)
Gesture test ( yes on a windows surface tablet, but Vincent and I installed linux on it!)

I just started and will update this page, with other experiments.

Note: displaying Arduino output without installing the IDE

stty -F /dev/ttyACM0 raw 9600
cat /dev/ttyACM0
................................
................................
................................
................................
................................
................................
................................
................................
................................
................####............
...............##..#............
..............##...##...........
..............#.....#...........
..............###...#...........
..............##.....#..........
..............##.....#..........
...............#....##..........
...............######...........
................................
................................
................................
................................

LCD matrix idea’s

In previous post I was talking about an esp32 with display for demo’s.
But my friend Erik mentioned a cheap LCD matrix from Ali.

What about creating something cool with that!

My Maze project would look amazing on this!
I can draw walls now!

Or I could make a cool audio visualiser, like the posted WLED version

Ehh .. not posted (well I can’t post everything)

What about a game of life display?
Using a web interface for inputting the start situation of the cells

Conway’s Game of Life is a cellular automaton. It consists of a grid of cells, each of which can be alive or dead. The state of each cell evolves based on simple rules: any live cell with fewer than two live neighbours dies (underpopulation), any live cell with two or three live neighbours survives, and any live cell with more than three live neighbours dies (overpopulation). Additionally, any dead cell with exactly three live neighbours becomes alive (reproduction). This simple set of rules can lead to complex patterns and behaviours.

But back to the demo …

What about a 6502 with 64×64 pixel display!

What would be needed?

  • 6502, with rom and ram
  • Some IO chip, don’t know which one yet
  • The 64×64 pixel matrix
  • A sound solution (simple chip tune player)
  • 3D printed enclosure

Using some libraries and a framework setup, maybe there is a way to make a cool and cheap demo machine

Do you have any suggestions ideas?
Comment or email me!

Webos Developer Mode and Homebrew

Besides sending notifications and controlling my tv using bash, Nodered and HomeAssistant, i wanted to look at developing and homebrew for WebOS.

Goto the WebOS Dev website and register.

Install Developer App on your TV.

Login and write down your access information.

Remain session can be extended using the button, or using a script.

Below how to access you tv using ssh

wget http://IP_FROM_YOUR_TV:9991/webos_rsa
mv webos_rsa .ssh/
chmod 600 .ssh/webos_rsa
ssh -i .ssh/webos_rsa prisoner@10.1.0.14 -p9922 -T
       Enter passphrase for key '.ssh/webos_rsa':
Enter the key mentioned on the Developer App Screen on your TV

Note the -T .. this disables pseudo terminals,
You won't see a prompt, but commands work

You can remove passphrases on ssh keys using below
ssh-keygen -p -f .ssh/webos_rsa
Enter old passphrase:
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.


Download WebOS manager from here:

https://github.com/webosbrew/dev-manager-desktop/releases/tag/v1.11.18

Install and use same ip/access key info to install homebrew

After that you can install homebrew apps using the App on your TV or via above dev-manager.
Also nice .. A ad-free version of Youtube!

By the way, I tried rootmy.tv .. but that didn’t work for me.
My TV was already patched for that exploit

Raspberry PI and Arduino black hole

This is NOT a post about the pi-hole project. Of which I apparantly never posted my setup.

I needed an extra PI for a project, and I always try to keep one spare.
But they are always gone, in use, missing .. whatever.

So I can´t work on this project right now, so lets rant about disappearing stuff

Like they are being sucked up in another dimension .. gone. WHERE ARE THEY?!?

How to keep track of them?

Any suggestions?


I used to have a sheet, but I often forget to keep track.
Do I use a MAC address scan on my switches?
First 3 parts of the Mac address are vendor specific.

So far i’ve found : Octopi, Beerbrew computer, Retro Arcade, Picore, Nodered, Domoticz 433toMqtt, Ledserver, Lasercutter-etch-a-sketch, mobile LMS music server, Pressure Lab AP, Escape Game AP (3 of them), one unused Raspberry zero (without Wifi), One at my old work, one broke, Kodi+Netflix,Ansible project, found another one .. Jumanji/Dashticz/NoderedDashboard demo (with screen)
WHERE THE F are the rest of them?
(Sdcards with temporary projects on them 29, I need to combine project on those cards. I’ve got a 64Gb card holding a Rpi OS and only a 1K python script!)

And Arduino’s are even worse … they are all over the place.
Those are probably 100+
(ESP32, 8266, Nano’s, Mega, M5Stack and alikes)

I know i have many temporary projects, but I keep most things organized in my projects containers.

One of the rows with Ikea containers, a few for bigger projects and now i’m using the plastic boxes you get when you order chinese or thai.

Checking faulty chips/hardware

When I fix old hardware I often use a flir camera.

My brother gave me his CAT S60 mobile phone. Which has a flir camera, he used it when he was a voluntary fireman.

Forward-looking infrared (FLIR) cameras, typically used on military and civilian aircraft, use a thermographic camera that senses infrared radiation

Soo .. when testing hardware. I do the following.

  • Clean the motherboard
  • Check chip pins
  • Press all chips/ic’s in their sockets
  • Test the power supply disconnected. ( Most will give a higher voltage when nothing is connected )
  • Measure the resistance of the board (sometimes)
  • Check if the machine can be started.

Now it gets interesting. Sometimes nothing happens. Sometimes the machine runs like it suppose to do.

But old hardware can be faulty or connections are bad. IC’s run hot and they stop working. ( Untill they are cooled enough or they stop forever 🙁 )

So I start monitoring the temperature when I boot the machine. Sometimes components heat up very fast. I use my finger and the flir camera.

These are pictures from my 8088. Nothing runs hot

Got some new sensors (HLK-LD2410B)

Sometimes you forget you ordered something from Ali Express, it takes too long to arrive.

Today i’ve got this in my mailbox

These are HLK-LD2401B motion/presence detectors € 2,91 a piece.

While PIR sensors are slow and doing only motion sensing, these nice small and cheap devices are fast and have more outputs.

  • Bluetooth (can be used using home assistant integration)
  • Motion and presence
  • 60 degrees detection angle
  • Measurements to moving/static objects (while the datasheet mentions till 5 meter, i’ve got measurements well above that.
  • Fast updates, and i mean really fast
  • Only 7mm x 35mm
  • mmWave – 24GHz
  • GPIO Uart

According to the bad translation it can also measure if you ‘devour’ something. Dutch ‘vreten’ means wild fast eating something.
Setting the language to English gives me the word ‘fretting’

Right screenshot shows Coline sitting at a distance of 5.5 meters

Above, the update speed in HA

To try: connect Uart to remote ESP
and tweaking the device
https://www.youtube.com/watch?v=dAzHXpP3FcI
and distance gates

Maybe i can use some Triangulation go find the precise location of a person.

Mikrotik and Zerotier

Today i’ve upgraded one of my Mikrotiks to 7.8.

And installed the zerotier extra package!
I’m not going to explain what zerotier is .. read it here:
https://www.zerotier.com/

I already did some tests using my phone and a linux server.

  1. Upgrade to the latest stable version (at this time : 7.8)
  2. Install from the extra packages zerotier-7.8.arm.npk
    upload to the files folder and reboot your MT

Add zerotier network

Allow connection in the Zerotier Gui

Mikrotik changes from ACCESS_DENIED to OK

Ping test from MT to my Phone !

Maybe we could setup a adhoc zerotier network with some of my friends to do some remote assisting when needed!