I was afraid to start this myself, SMD is on another level for me. But my good friend Marco said … No problem!
So I ordered components online, which was not easy. Selecting the correct parts, sizes and options.
Finding orientations of the componentsThe master at work, he has always been our soldering master (see GPC)Using a microscopeFluxWickI have to do one myself
These things are really really small
1.6mm x 0.8mm40 connections / 20mm !
Using tweezers to place the components was even difficult. The slippery tiny bastard got catapulted everywhere. (Or got stuck on fingers, soldering iron and alike) Many small components got lost into the 7th dimension. Never to be found again.
Awesome to work on this together, but Marco said that I have to try it myself. Welllll, I got 3/4 of the ATmega328PB-A perfectly soldered, then I notished that it was crooked. Desoldering was a mess, and I heated the PCB TOO much with the heatgun.
My messed-up PCB, and f*cked-up IC. Leave it to the professionals.
Next step for me is soldering the 75 mini buttons!
Got a Trinitron display from him, I was looking for this for a long time.
Below is a test with different methods. I like reading the booklets, so a CD i cool, and I don’t need a CD player. (The RFID tag is in the case) The little cards are for bought audio files I don’t have a physical CD for.
Wooden case with RFID reader being powered by external powerbank
What am I gonna do? Cube as I had? Wooden playlist selectors as in above movies? The cards I’ve printed? Maybe a small record player with an RFID reader inside?
3D printed like this? https://makerworld.com/en/models/66671
UPDATE: 20240327 – Little Record I 3D printed with little groves.
Home Assistant code for Playlist and Album automations (B.t.w. The method is still using an Arduino and MQTT topics, as mentioned before)
# ALBUM PLAYER
alias: SpotifyAlbum
description: ""
trigger:
- platform: mqtt
topic: spotify/rfid/id
condition:
- condition: template
value_template: "{{ trigger.payload in playlistkeys.keys() }}"
action:
- service: media_player.play_media
target:
entity_id: media_player.spotify_fashice
data:
media_content_type: album
media_content_id: spotify:album:{{ playlistkeys.get(trigger.payload) }}
mode: single
variables:
playlistkeys:
"71719674": 20TANs4iXVeLp387zjgmec
"71260666": 5325ECcBhnIysoqyENGCYi
"71457530": 7wyOeD9HcUuMFMO8pTflap
In the past, Aloha and I made a simple solution like this using barcodes in < 2000s. Due to the many obscure recordings I have, I am thinking about creating something like this for Picore player and my local Squeezebox server.
I used MCE to control some Windows VMs and programs running in it in the past. (Below link and a web interface engine which on the backend converted BWW/BMW (bagpipe music files) to PDF automated comes to mind)
Controlling a Windows VM using MQTT, very nice! (Use HA mqtt or mosquitto_pub in bash)
Question: anyone got a better solution to control programs within a VM? Let me know.
Next:
I’m creating a new case for my Wemos, LCD16x2, button, Led, Buzzer project (see other post)
I’m redesigning my previous case in blender.
But I really miss something like a generator function for different cases, like the one I made using Openscad. Question: Anyone know a tool/add-on to generate cases? I used a model of a wemos to get the usb connector/screw holes in place.
In the past, I’ve controlled some blender lights using python and MQTT. But now I’m trying to control it using DMX.
Example of lighting in our living using mock-up couch and tables.
I found a cool add-on called Blender-DMX. (B.t.w. wled can also use DMX)
Looks cool but, can I make a floorplan with this?
Blender add-on configuration
In Home Assistant I used a HACS add-on called : Art-net LED Lighting for DMX
Configuration can be done in configuration.yaml
light:
- platform: artnet_led
host: BLENDERHOSTIP # IP of Art-Net Node
max_fps: 25
refresh_every: 0 # Resend values if no fades are running every x seconds, 0 disables automatic refresh
node_type: artnet-direct # Which protocol to use
universes: # Support for multiple universes
1: # .Nr of Universe (see configuration of your Art-Net Node)
send_partial_universe: True # Only send the universe which contains data
devices:
- channel: 1 # first channel of dmx dimmer
name: dmx_dimmer_rgbw # name
type: rgbw # type
transition: 1 # default duration of fades in sec.
channel_size: 8bit # width of the channel sent to DMX device, default "8bit", "16bit", "24bit" and "32bit"
channel_setup: Wrgb # This is the magic to get colors correct
It works, but I’m not happy, anyone got a better solution?
And I have to check out GDTF profiles for fixtures.
At a later stage I’m going to 3d print a white floorplan about 1cm high, with LEDs and buttons. A floorplan you can hang on your wall.
Using the Libraries from Fabrizio Di Vittorio, named FabGL, you can transform this device into a dumb terminal, game device, VIC-20, a 8086 pc and more. There are even some projects to turn this into a C64.
Some generic testing using sound and DOS
But the main thing I want to do: A simple terminal. (I probably revisit the other options again at a later stage)
Soldered some pinheaders on the device for serialSome terminal testing.
My Wozmon bios has bare minimum support for serial communication, so i have to do some bitbanging. (6502 is using a 6551 ACIA)
Step one, change your main DNS resolver to that one from your provider or 1.1.1.1 (cloudflare)
Goto https://www.hawking.org.uk/ in your browser
Check youtube, facebook and more.
Set you DNS to 8.8.8.8 (google)
Do the same (even in a incognito browser).
I haven’t seen a Hawking recommendation on YT for ages, I just checked a website with information on another machine. And my YT stream showed …. Stephen Hawking!
Below is a solution when you want to stream IP camera’s in Kodi/Libreelec .
You can push these commands using Nodered, Bash script or whatever.
First make some camera scripts in your profile directory.
Examples:
# Kodi on Linux/Raspberry
# Place a file cam1.m3u in .kodi/userdata/profiles/(kodiprofile)/playlists/video/
rtsp://admin:secretpass@192.168.1.123:88/videoMain
#and another one in cam2.m3u (another example mjpeg example)
http://192.168.1.124:8000/stream.mjpg
#For windows it is in
C:\Users\(Username)\AppData\Roaming\Kodi\userdata\profiles\(kodiprofile)\playlists\video
Enable http access in Kodi and run the playlist using curl
curl -i -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Player.Open","params":{"options":{"shuffled":false,"repeat":"off"},"item":{"file":"special://profile/playlists/video/cam2.m3u"}},"id":"1"}' http://KODISERVERIP:8080/jsonrpc
A bash loop script
while true; do
curl -i -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Player.Open","params":{"options":{"shuffled":false,"repeat":"off"},"item":{"file":"special://profile/playlists/video/cam1.m3u"}},"id":"1"}' http://KODISERVERIP:8080/jsonrpc
sleep 10
curl -i -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Player.Open","params":{"options":{"shuffled":false,"repeat":"off"},"item":{"file":"special://profile/playlists/video/cam2.m3u"}},"id":"1"}' http://KODISERVERIP:8080/jsonrpc
sleep 5
done
At the back the 8 pin single channel lm368 amplifier. At the front the 3 channel setup. I still have to tweak the resistors, and potmeters. Then I can make a permanent PCB, and figure out the connections to the 6502.
At the moment, the Arduino Nano is playing some real sound samples by using the registers of the sound chip. The music is being played by sending the register dumps directly to the chip.
Much like i’ve been using SID register dumps to play songs in another project.
This is version 0.1 .. do not use. If its wrong, or can do better please mail me. Oh it needs a 1k resistor from the 20K’s to ground I think.
Use a little spoon NOT a knifeGet your fingers underneath the membranePreparing the ribs, getting the membrane off.
This time I used a rub with the following ingredients: Seasalt, garlic, brown sugar, mustard seeds, paprica, cilantroseeds, black pepper, red pepper, oregano, thyme and cumin.
Doing a simple 3-2-1 smoke session, so .. what to do in dose 6 hours?
Lets make something using a Sense hat and Python. Same HAT I used for my xmas ornament thingy in our tree.
Generate a large maze (80×80 for now)
Paint the maze using colors on the SenseHat
Read joystick movement and scroll the maze accordingly, keeping the player in the middle
Now I have to paint my ribs with BBQ sauce, and leave it in the smoker for yet another hour. (Nice glazing)
Next steps for the maze:
Use a better way to generate (reverse backtracking as I made for my other maze thing)
The old way of flashing using Arduino IDE (for digispark)
Install Boards using : preferences, add board URL http://digistump.com/package_digistump_index.json
Change Board and programmer, YOU won’t have to select a USB device!
Note: There being no regular USB device, you need to add some udev rules. cat /etc/udev/rules.d/digispark.rules SUBSYSTEM==”usb”, ATTR{idVendor}==”16d0″, ATTR{idProduct}==”0753″, MODE=”0660″, GROUP=”dialout”
When compiling and uploading the program, you get a message to plug in the device. See below screenshot.
Now the 2024 change. Reason to change:
Want to have USB-C
Python to get a more flexible setup
I want to use more pins, so I can add LEDs and more buttons.
I wanted to play with my Waveshare RP2040 Zero.
This is the first setup, with same functionality as before.
Now I can add more stuff!
Putting the code on the RP2040-zero
Press boot button and insert into your pc. Download uf2 file from here and save in RP2 drive. https://circuitpython.org/board/waveshare_rp2040_zero/ Open Thonny, and configure interpreter to:
Download the zip file from https://github.com/adafruit/Adafruit_CircuitPython_HID And copy only the subdirectory adafruit_hid to the drive in subdir lib
Open the file code.py from the device, and remove example hello world code. Paste in the following code.
import rotaryio
import board
import time
import board
import digitalio
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.keycode import Keycode
from adafruit_hid.consumer_control import ConsumerControl
from adafruit_hid.consumer_control_code import ConsumerControlCode
but = digitalio.DigitalInOut(board.GP4)
but.direction = digitalio.Direction.INPUT
but.pull = digitalio.Pull.UP
cc = ConsumerControl( usb_hid.devices )
encoder = rotaryio.IncrementalEncoder(board.GP5, board.GP6)
last_position = 0
while True:
position = encoder.position
if int(last_position) < int(position):
#print(position)
command = ConsumerControlCode.VOLUME_DECREMENT
cc.send(command)
#last_position = position
if int(last_position) > int(position):
#print(position)
command = ConsumerControlCode.VOLUME_INCREMENT
cc.send(command)
last_position = position
if not but.value:
command = ConsumerControlCode.MUTE
cc.send(command)
time.sleep(0.5)
Above code is the bare minimum, I’ll add more functionality soon. (LEDs and more buttons) Next and Previous Track and mode change. From Audio to Navigation for example.
"If something is worth doing, it's worth overdoing."