#raspberry-pi-400 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #raspberry-pi-400, aggregated by home.social.
-
Something new on the bench - Raspberry Pi 400. This one had a broken micro SD card latch, so I had to replace the slot with a brand new one. Luckily I bought a few for a Jetson Nano back in a day and they are exactly the same ✅.
Then - as always - I ran a stress test and my god this thing has amazing cooling - that internal heatsink is the best mechanism I've ever seen on a Raspberry Pi - 40°C at max load. Wow 🤩.
#RaspberryPi #RaspberryPi400 #sbc #electronicsrepair #electronics #linux
-
Wieder etwas Neues gelernt: Batocera Linux als Retro-Gaming-Distribution.
Die Einrichtung auf dem alten Raspberry Pi 400 war ein Kinderspiel. Die vorinstallierten ROMs eher nicht. Und neue / andere ROMs zu finden: Joystick-Archäologie.
Danke für Tipp geht an @iomf42
#Batocera #RetroGaming #RaspberryPi400 #Linux #Emulation #C64 #DigitalNostalgia #GamingDad
-
Raspberry Pi 500 computer-in-a-keyboard is now available for $90
The Raspberry Pi 500 is a compact desktop computer that combines a 2.4 GHz Broadcom BC2712 quad-core ARM Cortex-A76 processor, 8GB of LPDDR4x-4267 memory, and support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet.
It’s also the second computer-in-a-keyboard device from Raspberry Pi. The first was the Raspberry Pi 400, which launched in 2020 with the guts of a Raspberry Pi 4 stuffed inside a keyboard shell. The new Raspberry Pi 500 features the same basic design, but this time it has the power of a Raspberry Pi 5. The new model is available now for $90.
The new model brings a significant performance boost, and also an updated design featuring an all-white chassis (rather than white and red), twice as much memory, and an updated port layout.
The Raspberry Pi 500 measures 286 x 122 x 23mm (11.26″ x 4.8″ x 0.91″) at its thickest point, features an aluminum heatsink inside the case for passive cooling, and has a set of ports along the back that include:
Ports on the Raspberry Pi 500 include:
- 2 x micro HDMI (4K/60)
- 2 x USB 3.0 Type-A (5 Gbps)
- 1 x USB 2.0 Type-A (480 Mbps)
- 1 x USB Type-C port (for power)
- 1 x Gigabit Ethernet
- 1 x SD card reader
- 40-pin GPIO connector
Raspberry Pi offers the computer as a standalone unit for $90. That model includes the keyboard and a 32GB SD card for storage, but nothing else. Or you can opt for a $120 Raspberry Pi 500 Desktop Kit that also includes a 27W USB Type-C power supply, a 2-meter (6.6 foot) HDMI cable, a Raspberry Pi mouse, and the Raspberry Pi Beginner’s Guide, 5th edition.
The company says it will keep the Raspberry Pi 500 in production for at least 9 years, with guaranteed production through January, 2034.
Meanwhile, the Raspberry Pi 400 is also still in production, but the company is giving it a price cut: the Raspberry Pi 400 standalone unit now sells for $60 (down from $70), while the Raspberry Pi 400 Personal Computer Kit sells for $80 (down from $100).
Raspberry Pi has also introduced a new Raspberry Pi monitor, which is a compact 15.6 inch FHD IPS LCD display with a pair of 1.2 watt stereo speakers, a built-in stand, and an 80 degree viewing angle. It draws power from USB Type-C port and should work with any USB Power supply that can deliver 5V/3A (15 watts). It can also be powered directly from a Raspberry Pi using a USB Type-A to Type-C cable.
via Raspberry Pi
#computerInAKeyboard #keyboardComputer #keyboardPc #raspberryPi400 #raspberryPi5 #raspberryPi500 #raspberryPiMonitor
-
Somehow I resisted the urge to buy a #RaspberryPi400 when it was released. But the temptation is here again with the new #RaspberryPi500 and the #RaspberryPiMonitor. So cool! https://www.raspberrypi.com/news/raspberry-pi-500-and-raspberry-pi-monitor-on-sale-now/
-
Very excited to see the Raspberry Pi 500 be announced. I have added myself to the notify lift. Currently I use a Raspberry Pi 400 for Home Assistant. How easy will it be to migrate my configuration over from the 400 to the 500? I use Sky Connect for my Zigbee network. That would have to come over to.
#HomeAssistant #RaspberryPi #RaspberryPi500 #RaspberryPi400
@[email protected] @[email protected] @[email protected] @[email protected]
-
Having a clear-out and found a Raspberry Pi 400 I bought on a whim but have never used. Options are:
1 - Ebay it
2 - Give it away
3 - Use it(1) speaks for itself, but I'd rather (2) or (3) - so, does anybody have any ideas about who would really benefit from (2), or what I could possibly do with (3)?
-
The Raspberry Pi 500 Hints At Its Existence - It’s fairly insignificant in the scheme of things, and there’s no hardware as yet ... - https://hackaday.com/2024/10/04/the-raspberry-pi-500-hints-at-its-existence/ #raspberrypi400 #raspberrypi500 #raspberrypi #all-in-one
-
The Raspberry Pi 500 Hints At Its Existence https://hackaday.com/2024/10/04/the-raspberry-pi-500-hints-at-its-existence/ #raspberrypi400 #raspberrypi500 #RaspberryPi #all-in-one
-
Bugger it, I'm installing #Ubuntu on the #RaspberryPi400. Let's see how peppy it is - or isn't..
https://ubuntu.com/raspberry-pi -
Wir fangen jetzt daheim an und lernen Programmieren. Mal schauen, wie der Große das hinbekommt. Hab ein Raspberry Pi 400 besorgt, war sogar an Buch für "Pi von Anfang an" dabei und ein Starter Kit mit Steckboard+Sensoren um Lampen hatte ich ja noch.
Wir fangen mal mit #Scratch3 an und steigern uns langsam in Richtung #PythonFreu mich!
#programming #programmierenlernen #raspberrypi #raspberrypi400
-
Apart from wanting a Framework laptop I’m also really curious to play with some ARM hardware to run #Linux on. Like a #Pinephone or #Pinebook or #RaspberryPi400 🤔
-
Here are the build notes for my RPi 400 MIDI and Audio PCB.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
In this case – inserting this pcb incorrectly (which unfortunately is possible with the RPi-400) could damage the RPi 400. See full post below for details.
If you are new to microcontrollers and single board computers, see the Getting Started pages.
Bill of Materials
- RPi 400 MIDI and Audio PCB (GitHub link below)
For the MIDI circuit
- 1x H11L1.
- 1x 74HCT14 (NB: Must be the HCT version, not the HC).
- 1x 1N914 or 1N4148 signal diode.
- 5x 220Ω resistors.
- 1x 470Ω resistor.
- 2x 100nF ceramic capacitors.
- Either: 3x 5-pin, 180 degree PCB-mount DIN sockets (see photos for footprint).
- Or: 3x stereo TRS PCB-mount sockets (see photos for footprint).
- Optional: 6-way DIP socket; 14-way DIP socket.
- 1x 2×20-way right-angle GPIO header socket.
For the additional DAC and MiniDexed sections:
- 1x GY-PCM5102 DAC module.
- 1x SSD1306 32×128 OLED display (pin order: GND-VCC-SCL-SDA).
- 5x 10nF ceramic capacitors.
- 2x 100nF ceramic capacitors.
- 1x switched rotary encoder (see photos for footprint).
- 2x slim toggle pcb-mount button switches (see photos for footprint).
- Optional: 4-way header socket for SSD1306 display.
For structural support when installed:
- 2x 2.5mm, 6mm nylon spacers
- 2x 2.5mm nylon nuts
Build Steps
Taking a typical “low to high” soldering approach, this is the suggested order of assembly:
- All resistors and diode.
- DIP sockets (if used) and TRS sockets (if used).
- Disc capacitors.
- GY-PCM5102 module (if used) – check that the solder jumpers on the back (see below).
- Buttons (if used).
- 4-way SSD1306 header socket (if used).
- GPIO headers.
- DIN sockets.
- Rotary encoder.
As mentioned in the design notes, it is possible to install the three main sections of the PCB independently depending on what is required:
- The MIDI circuits.
- The PCM5102 DAC.
- The MiniDexed IO components (display, encoder, buttons).
If a DIP socket is used for the 74HCT14 the to install the SSD1306 display will probably require a 4-way header socket in order to lift it high enough to avoid the installed 74HCT14 and to not negate any benefits of having the chip in a socket!
If the H11L1 and 74HCT14 are soldered directly to the board then a SSD1306 with extended pin headers should be adjustable enough to be soldered over the other components.
The capacitors that are labelled “10p” are actually 10nF capacitors. This is an error in the silkscreen.
Here are some build photos for a complete build with all sections complete.
At this point the MIDI sections are complete and it is possible to now install the TRS or DIN sockets and the GPIO header if a MIDI only board is required.
To continue building the DAC and IO sections see below.
Note check the PCM5102 jumper settings before fixing – more here. Also note how the capacitor for the PCM5102 is folded down underneath the board.
At this point the TRS or MIDI sockets can be installed.
Once complete, it is strongly advised to add a couple of 2.5M 6mm spacers to the middle of the PCB in order to support it when plugged into the RPi 400. This is particularly important if using a switched rotary encoder and the buttons.
As one of the holes for the spacers is under the corner of the PCM5102, it might need trimming down slightly to fit without pushing the PCM5102 upwards. In my case I had to cut the thread down slightly as shown in the photos below.
Here is the final board.
Testing
I recommend performing the general tests described here: PCBs.
Once the above tests were complete, I tried the board with a Raspberry Pi 3A+ on the basis that if something went wrong it would cost me a lot less to replace a 3A+ than my new RPi 400.
Care must be taken to orient the board correctly though when not using a RPi 400 – see photos below.
Once all seems to be functioning, I switched to my Raspberry Pi 400.
IMPORTANT: Additional care must also be taken when installing in a RPi 400 as it is quite possible to plug the board in “one pin out”. If this happens, then there is a distinct risk of connecting one of the 5V GPIO pins to GND which would damage the RPi 400.
With hindsight, the use of a keyed header socket (assuming they exist in right-angled, pcb-mounted format) would stop this happening.
If I rebuild this board, then I might leave pin 4 5V unconnected to prevent this happening. I don’t think any other power pins are adjacent to GND, although it still leaves the possibility of feeding a HIGH GPIO directly to GND in other places.
PCB Errata
There are the following issues with this PCB:
- As mentioned before, the capacitors labelled “10p” are really “10n”.
- The pcb slightly overlaps the uSD card slot on the RPi-400 which means it can’t be removed when the pcb is installed.
- Inserting incorrectly could connect GPIO 5V to GND and damage the RPi 400.
Sample Applications
MiniDexed Raspberry Pi 400
The board is essentially a mirror of my MiniDexed Raspberry Pi IO Board physically arranged to support the Raspberry Pi 400 form-factor.
Below are the key minidexed.ini configuration settings that allows the RPi 400 to act as a MiniDexed synth with this board.
The MIDIThru setting is not required for general operation but can be used to turn on software MIDI THRU between the IN and OUT ports.
Also, MIDIThru can be used to direct the RPi 400 keyboard to the MIDI OUT port, turning it into a MIDI controller. The internal keyboard is device “ukbd1” which needs linking to “ttyS1” for the MIDI interface.
SoundDevice=i2s
#MIDIThru=ttyS1,ttyS1
MIDIThru=ukbd1,ttyS1
LCDEnabled=1
SSD1306LCDI2CAddress=0x3C
SSD1306LCDWidth=128
SSD1306LCDHeight=32
SSD1306LCDRotate=0
SSD1306LCDMirror=0
LCDColumns=20
LCDRows=2
ButtonPinPrev=0
ButtonActionPrev=
ButtonPinNext=0
ButtonActionNext=
ButtonPinBack=5
ButtonActionBack=click
ButtonPinSelect=11
ButtonActionSelect=click
ButtonPinHome=6
ButtonActionHome=click
ButtonPinShortcut=11
EncoderEnabled=1
EncoderPinClock=10
EncoderPinData=9The built-in keyboard can be used as a simple 2-octave music keyboard to play the synth as follows:
Raspberry Pi 400 MIDI and Audio Interface
The board can be used as a MIDI and audio interface for the standard Raspberry Pi 400 OS too.
The basic idea is to use a I2S DAC overlay for the PCM5102 and to enable the serial port, but not the serial console, in the raspi-config and map MIDI onto it in some capacity.
Enabling the PCM5102 Sound
The full instructions are the same as described here: https://learn.pimoroni.com/article/raspberry-pi-phat-dac-install
But the short version (for 32-bit Raspberry Pi OS “bullseye”) is as follows.Edit /etc/config.txt and comment out or add the following:
# dtparam=audio=on
dtoverlay=hifiberry-dacThere are other settings in there related to I2S but these can be ignored as the overlay file will include everything it needs. Note: commenting out the audio=on line will disable the built-in audio via the bcm device in the Raspberry Pi.
Then create an /etc/asound.conf file with the following:
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}According to this document, this tells ALSA (the Linux sound system) to override its own default with hardware card 0, which is now the PCM5102. This can be confirmed using the command:
pi@raspberrypi:~ $ cat /proc/asound/cards
0 [sndrpihifiberry]: RPi-simple - snd_rpi_hifiberry_dac
snd_rpi_hifiberry_dac
1 [vc4hdmi0 ]: vc4-hdmi - vc4-hdmi-0
vc4-hdmi-0
2 [vc4hdmi1 ]: vc4-hdmi - vc4-hdmi-1
vc4-hdmi-1
pi@raspberrypi:~ $For it to work though I have to then select the “snd_rpi_hifiberry_dac” option in the “Device Profiles” by right-clicking on the Raspberry Pi OS Desktop “sound” icon in the tray (next to the clock).
Enabling Serial (UART) MIDI
Serial MIDI is linked up to the Raspberry Pi’s GPIO TX/RX ports on pins 14 and 15. But by default there are a couple of issues with just hooking these up to a MIDI interface:
- They are usually either expected to be used with a serial console or configured (apparently) for a faster Bluetooth link.
- The supported baud rates don’t include the standard MIDI 31250 baud.
- By default there is nothing that will connect a UART based serial port to ALSA to allow it to be used.
Details of how to solve this can sort of be found around the Internet, but I’ve not found a complete “just do this and everything works, and this is why” document. The official Raspberry Pi documentation for the UART can be found here: https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts (although to be honest, I didn’t quite follow most of it myself… primary UARTs? Hmm)
Other references:
- https://www.instructables.com/PiMiDi-A-Raspberry-Pi-Midi-Box-or-How-I-Learned-to/
- https://gist.github.com/CarloCattano/8c01a6dea6ecbb459acd0b6bcd752ea6
- https://www.samplerbox.org/article/midiinwithrpi
First enable the serial port and disable the console. This can be done by editing /boot/config.txt directly, but can also be done from the Raspberry Pi Configuration GUI tool.
Then in /boot/config.txt these additional updates are required:
enable_uart=1
dtoverlay=miniuart-bt
dtoverlay=midi-uart0The first is probably already there if the serial port was enabled using the GUI. The second one apparently switches the internal Bluetooth over from using TX/RX on pins 14/15 to using ttyS0 (it is also possible to disable it completely with “disable-bt”). This frees up ttyAMA0 (TX/RX) for our use, which is the first UART on the PL011 peripheral on the bcm chip. The last setting includes some magic to tweak the clocks and baud rates so that the standard rate of 38400 will actually come out at the MIDI rate of 31250.
Details of each of these overlays can be found in the Raspberry Pi documentation (the README) here: https://github.com/raspberrypi/firmware/tree/master/boot/overlays and details of how the UARTS are set up and used on the different Pi versions, and which options are available, can be found here: https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts
Note: there are variants of midi-uart for other UARTs (which apparently can be enabled on a RPi 4) and a special midi-uart0-pi5 version for the Raspberry Pi 5.
This should have enabled the primary UART on TX/RX (pins 14,15) to be available with a suitable MIDI baud rate. But to use it, that serial port needs linking up to the operating systems sound setup.
Apparently the most common way to do this appears to be to use the ttymidi tool, which I guess fulfils a similar function to hairless-midi on a Windows PC (although I note hairless says it supports Linux too, even though it too recommends ttymidi!).
Unfortunately there doesn’t seem to be a ready-made version just to install, so it has to be built. The instructions from here worked fine for me:
$ sudo apt-get install libasound2-dev
$ wget http://www.varal.org/ttymidi/ttymidi.tar.gz
$ tar -zxvf ttymidi.tar.gz
$ cd ttymidi/
$ make
$ sudo make installOnce installed this needs to be started to connect the serial port to ALSA:
$ ttymidi -s /dev/ttyAMA0 -b 38400 -v
This provides the serial port and baud rate (remember 38400 has been tweaked to really be 31250 “on the wire”). The “v” option means it will dump any messages to the console. An optional “n” option can be used to give the link a nice name that can be used later. Without it, it defaults to “ttymidi”.
Two additional, useful tools to install (using the Raspberry Pi Add/Remove Software tool) are pmidi and midisnoop. pmidi can be used to list MIDI devices.
pi@raspberrypi:~ $ pmidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
128:1 ttymidi MIDI in
pi@raspberrypi:~ $The ALSA tool aconnect can also list available ports:
pi@raspberrypi:~ $ aconnect -l
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 128: 'ttymidi' [type=user,pid=2619]
0 'MIDI out '
1 'MIDI in '
pi@raspberrypi:~ $MIDIsnoop can be configured to use these ALSA ports and then can be used to show everything working.
How to actually use the ports I’ll might come back to, but in essence that becomes a tutorial in how to use ALSA and sound on Linux and there are lots of tutorials about that out there already.
At some point I’d like the above to all happen automatically on startup so that ttymidi is running and available to ALSA. That should be possible to add to one of the startup scripts, but that is left as an exercise for the reader (i.e. I haven’t looked that up yet).
Closing Thoughts
The “off by one” possibility of error when plugging the board in is concerning. I’d not anticipated that! But by being careful that should be manageable.
I also wasn’t anticipating not being able to unplug the uSD card! Oh well.
Apart from that, I’m really pleased with how it works.
At some point I might return to this and detail how to drive the display from Raspberry Pi OS itself as that would be a nice way to finish things off.
Kevin
https://diyelectromusic.wordpress.com/2023/12/18/rpi-400-midi-and-audio-pcb-build-guide/
-
Now I’ve got my Raspberry Pi 400 up and running I’ve built a MIDI and I2S audio add-on board for use with the GPIO.
- Build guide here: RPi 400 MIDI and Audio PCB Build Guide.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to microcontrollers and singled board computers, see the Getting Started pages.
The Circuit
The key features of this design are:
- Raspberry Pi 40 pin GPIO header connection.
- Powered via the RPi GPIO.
- Includes 3V3 MIDI IN circuit using H11L1.
- Includes proper buffered MIDI OUT and THRU using 74HCT14.
- Includes I2S connection to a GY-PCM5102 module.
- Includes optional I2C SSD1306 OLED 32×128 display.
- Includes optional rotary encoder and buttons with debouncing capacitors.
The primary aim for this board is Raspberry Pi 400 MIDI and I2S audio DAC. But I thought it I was going that far then I would also include the options for a rotary encoder, buttons and display which would allow the board to be used as a MiniDexed user interface too.
PCB Design
The board will plug in behind the RPi 400, so the idea is to use a 90-degree angle GPIO connector. The board supports either TRS or DIN MIDI sockets.
To just be used as a MIDI interface, the following components are required – all shaded out components may be omitted.
The I2S Audio DAC section is highlighted in purple on the left hand side if that is wanted to be added to the MIDI or just used on its own. Note how the capacitor for the PCM5102 will be situated between the PCB and the PCM5102 itself. It will need folding down to be installed.
This is a now standard (for my blog) H11L1 MIDI IN circuit paired with a 74HCT14 (not the HC variant – it has to be the HCT version to support the level shifting required) based MIDI OUT section. There is also a hardware MIDI THRU port. As can be seen from the PCB the board will take either TRS or DIN MIDI sockets – footprints are included for both.
Note: This is designed to be used with a right-angle GPIO header for plugging into a Raspberry Pi 400. Should the board want to be used with a typical RPi, then the power pins are on the far right hand side of the board with 5V on the top row and 3V3 on the bottom row. The GPIO connector will “point upwards” so it really has limited use with a normal Pi as all the components would be on the underside of the board – i.e. between the PCB and the Pi… but electrically it would all work!
To use the board as a MiniDexed user interface then the buttons, rotary encoder and SSD1306 display, and associated capacitors, can be added. Note that the SSD1306 display will have to sit above the 74HCT14.
There is one error on the board. All the debouncing capacitors for the encoder and the switches are labelled “10p” when it should be “10n”. I’ve made that mistake before and it simply got copied over to this design too without me spotting it!
Closing Thoughts
I was tempted to try to make something a bit simpler that could be used with my Cyberdeck, but instead opted for this stand-along board.
Whilst I don’t see a lot of use for a RPi-400 based MiniDexed, I couldn’t really think of a reason not to include the additional components. Having to route the PCM5102 such that the jack was in a useful position meant I wasn’t able to make the board much smaller anyway.
Kevin
https://diyelectromusic.wordpress.com/2023/12/18/rpi-400-midi-and-audio-pcb-design/
-
I’ve finally gotten myself a Raspberry Pi 400 computer. I’ve wanted one for a while to use as a MIDI player for my Lo-Fi Orchestra. The idea is that eventually I might be able to run it without a large display, but instead use something like the Adafruit Cyberdeck and a PiTFT display (or similar) to give a nice, portable solution.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
These are the key Arduino tutorials for the main concepts used in this project:
- Raspberry Pi Getting Started
- Using your Raspberry Pi
- Cyberdeck Bonnet and HAT for Raspberry Pi 400
- Adafruit 2.8″ PiTFT – Capacitive Touch
If you are new to microcontrollers and single board computers, see the Getting Started pages.
Parts list
- Raspberry Pi 400 and power.
- Adafruit Cyberdeck for Raspberry Pi 400.
- Adafruit 2.8″ PiTFT Plus capacitive touch LCD display (for use with a Pi 2/B+ onwards, not the original PiTFT which was just for the Pi 1).
- Mouse, HDMI display, etc to set up the Raspberry Pi 400.
Raspberry Pi 400 Setup
I bought a kit so I had an SD card all ready to go with Raspberry Pi OS, so I booted that up and went through the “first run” configuration to get the basic computer up and running.
I used the command line raspi-config utility to set the hostname to something other than the default “raspberrypi”.
Then I used the add/remove software to install some interesting looking apps. There are a lot of sound and music apps including a range of soft-synths, digital audio workstations, sonic programming environments, sound and MIDI utilities, and a lot more.
For my initial purposes I wanted a command-line MIDI player, so I installed pmidi.
Then I used the Raspberry Pi configuration tool to set instruct the system to boot into the command line.
Then on reboot it will not start the desktop environment. If at any point the desktop environment is required, then simply using the command ‘startx’ will start it.
pi@raspberrypi:~ $ startx
Setting up the Cyberdeck PiTFT
I followed the instructions in the Adafruit learning guide for the 2.8″ PiTFT, which can be found here: https://learn.adafruit.com/adafruit-2-8-pitft-capacitive-touch/easy-install-2
I ignored the talk of a virtual environment, and went ahead and run the suggested commands, although I cloned the Adafruit repository into a newly created tmp directory:
cd ~
sudo apt-get update
sudo apt-get install -y git python3-pip
pip3 install --upgrade adafruit-python-shell click
mkdir tmp
cd tmp
git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git
cd Raspberry-Pi-Installer-ScriptsThen I ran the automatic installer for my 2.8″ PiTFT:
sudo -E env PATH=$PATH python3 adafruit-pitft.py --display=28c --rotation=270 --install-type=console
Some notes:
- The suggested command uses a rotation of 90 degrees, but when I first booted everything up the display was upside down on the Cyberdeck. I had to re-run with the value rotation=270.
- On first running, I was informed I was running a 64-bit kernel but a 32-bit userspace, so was asked to reboot to enable a 32-bit kernel. For what I’m planning on using this for, a 32-bit kernel should be fine so I let it reboot and run the command again.
- It takes a few minutes on boot for the display to become active. If a HDMI monitor is still connected then the progress of the startup can be seen there and you can see the point where the display flickers and it switches over to the PiTFT.
- Note: This just enables a text console on the PiTFT. There are separate commands to be used to enable the graphical framebuffer which will allow the desktop environment to run on the PiTFT. Full details are available in the Adafruit learning guide.
- I’m also not doing anything with the touchscreen at the moment.
One nice thing about having the PiTFT in console mode is that using the ‘startx’ command will start up the desktop on any attached HDMI monitor. This gives a “best of both worlds” option, at least for me.
PiTFT GPIO Usage
The PiTFT display and touch screen use both the I2C and SPI buses, plus two additional GPIO pins. The four buttons are connected to a GPIO pin each.
According to the product page and schematic, the following are used.
GPIO 2I2C SDAGPIO 3I2C SCLGPIO 8CE0GPIO 9MISOGPIO 10MOSIGPIO 11SCLKGPIO 24Additional Display/Touch usageGPIO 25Additional Display/Touch usageGPIO 17ButtonGPIO 22ButtonGPIO 23ButtonGPIO 27ButtonThe most interesting point for me here being that both RX/TX are free, so could be used for MIDI, and GPIO 18,19,20,21 are free so an I2S audio device could be added too.
Additional RPi Configuration
I’ve also enabled SSH access and the serial port using the RPi configuration tool. I’ve disabled the serial console however. As mentioned above, eventually I’d like to be able to use the serial port for a MIDI interface.
Getting Files to the Pi
I’ve created a directory on the Pi that can be shared out. To do this requires the Samba client so using the add/remove software I’ve installed the following:
- samba-2.4.13.13+… SMB/CIFS file, print and login server for Unix.
- samba-common-2.4.13.13+… Common files used by both the Samba server and client.
- samba-common-bin-2.4.13.13+… Samba common files used by both the Samba server and the client.
The standard install includes many CIFS utilities for mounting Windows shares already.
To configure an area for dropping files, I’ve created a directory in my home area and shared it out using samba.
pi@raspberrypi:~ $ mkdir midiTo configure samba, edit (via sudo) the /etc/samba/smb.conf file:
# Add the following at the end
[Midi]
path=/home/(user)/midi
browseable=no
writeable=yes
read only=no
create mask=0777
directory mask=0777
public=no
guest ok=no
write list=(user)Samba also needs to be told about the user too:
pi@raspberrypi:~ $ sudo smbpasswd -a (user)Note: I’ve disabled the sharing of the home directories by default by commenting out the [homes] line and all following commands in that section.
At this point, browsing to the share \\raspberrypi will not show any visible shares (as browseable and public are set to “no”), but browsing to \\raspberrypi\midi should connect to the directory on the Pi 400.
Now I can drop over MIDI files and they will be available on the Pi.
Playing MIDI files
The first thing is to find the “port number” of the MIDI interface being used.
I’ve plugged in my Roland UM-ONE and use the command “pmidi -l” to list the playable output ports as shown below.
Then pmidi can be given that port number and a MIDI file to plau and it will just get on with it.
pi@raspberrypi:~/midi $ pmidi -l
Port Client name Port name
14:0 Midi Through Midi Through Port-0
20:0 UM-ONE UM-ONE MIDI 1
pi@raspberrypi:~/midi $ pmidi -p 20:0 LoFi\ Orchestra\ -\ Carol\ of\ the\ Bells.midHere is the output of dmesg showing the UM-ONE detected displayed on the cyberdeck.
Closing Thoughts
This is a great start with many of the building blocks in place. There are some issues though – sometimes it seems to “forget” to use the cyberdeck and I have to re-run the install script with a monitor attached. I don’t know what is causing that so naturally that isn’t any good for a proper solution.
But as can be seen in the video at the start of this post, in general, this seems to work!
Next steps:
- Fix the issue naturally!
- It would be nice to find a way to automatically select any plugged in MIDI interface when it comes to playing a file.
- It would be nice to have some kind of application running to list files and play them.
- I’d like to have a RPI400 MIDI interface that I can use directly too. Perhaps some variant of my Raspberry Pi Zero MIDI PCB.
So still plenty to do!
Kevin
https://diyelectromusic.wordpress.com/2023/12/12/raspberry-pi-400-cyberdeck-midi-player/
-
XDEV's interns always get a #RaspberryPi Starter Kit to unleash their creativity in programming, hardware, and electronics. Lars transformed his Raspberry Pi into a #DNS server using "Pi-hole" to block ads and protect his network against harmful sites.🚫
#Pihole #raspberrypi400 #raspberrypistarterkit #raspberrypikit #raspberrypiprojects #XDEVsoftware
-
A 4-Player Arcade Hidden Inside a Coffee Table - [Ed] from 50% Awesome on YouTube wanted to build a retro gaming system with a dece... - https://hackaday.com/2023/05/11/a-4-player-arcade-hidden-inside-a-coffee-table/ #raspberrypi400 #classichacks #arcadebutton #coffeetable #retrogaming #batocera #joystick #rgbled #games #happ #diy
-
PineBookPro is to Raspberry Pi 400
As
Friendica is to Mastodon.
| #PineBookPro #RaspberryPi400 #Friendica #Mastodon #Pine64 #RaspberryPi
-
I miei #3FattiDiOggi 27/12
1. Una mattinata strana, ho fatto fatica a carburare senza una dose doppia di caffè 😴
2. Aggiornato il #raspberrypi400, adesso tocca la parte server 🤔
3. Iniziata una carta interattiva per il cliente top 😇 -
OK, I'll have fun with the Raspberry Pi 400 over the weekend 😁
#raspberrypi #raspberrypi400 -
Looking for suggestions... I won this #RaspberryPi400 in a drawing on a ham net quite a while back now, and it’s just been sitting on a shelf in its box until I could find the time to think about how to best use it for #AmateurRadio. Seems like it might be useful to do something new and interesting. #KE0FFT #HamRadio #RaspberryPi