DEV: [PLUGIN] MPD_OLED for x86 based systems

Other news: I was messing about with the MCP2221 on Windows and I managed to get a poor 3 FPS refresh rate on the screen. This was using the USB to MCP2221 DLL supplied by Microchip and some driver code I cobbled together. :thinking::flushed::disappointed_relieved:


If it was your plan to draw some random lines, very well accomplished :slight_smile:

1 Like

Yeah, who needs a Raspberry Pi!

Those who want to have bars instead of lines :grinning:

I can also draw text to it, random dots and all sorts of other useful stuff! Just it’s too slow :frowning: Just seeing if it was possible that mpd_oled could work on Windows!

Call me a sell out but I do like developing stuff in Visual Studio :rofl::rofl::confounded::confounded:

Weird, according the specifications it should be fast.
Visual Studio, pffff old guy haha (still have a license for Vs2013)

Maybe you should add the frame_rate=80000 to the autoexec.bat

Yes, it’s USB2 to I2C so it should be easily quick enough for 1024 bytes of pixel data, especially if a Pi 3 can do it! Oh well :tired_face::yawning_face:

1 Like

Ordered simular converter, lets expiriment tomorrow:

2 Likes

Cool! DollaTek! :joy: It’s handy to plug shit in via USB, find the driver and just get coding with it. Good luck!

Maybe not what you were thinking, but the development version of mpd_oled includes an SDL driver, so you can probably use any small display that windows considers is a monitor.

This is mpd_oled running on an Ubuntu desktop

Screenshot from 2022-11-23 07-45-28

1 Like

I forgot to say, I added in the SDL driver so I could develop mpd_oled on the desktop without needing a Rapberry Pi and a screen hooked up. Also, the window size can be specified when mpd_oled is run so I could work on layouts for different screen sizes.

1 Like

Will not gonna be a fast check. Unable to compile drivers.

volumio@volumio-x86-s2:~/i2c-ch341-usb$ make
make -C /lib/modules/5.10.139-volumio/build M=/home/volumio/i2c-ch341-usb  modules
make[1]: Entering directory '/lib/modules/5.10.139-volumio/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/lib/modules/5.10.139-volumio/build'
make: *** [Makefile:20: i2c-ch341-usb.ko] Error 2

1 Like

I know nothing about SDL :persevere:. Tell you what though: with the shortage of pis still a a big issue, ultra slim form factor cheap PCs are probably the way to go now. The problem is it’s tricky to get little screens working on them.

SDL is a graphics library https://www.libsdl.org/ and the currently included SDL driver for U8g2 will open a window on the desktop and display in it. Maybe it can run full screen on a small screen running X.

Ooh, that does look like the way to go! Thanks!

It still looks like there’s no easy way to interface an I2C screen on a Windows environment :disappointed_relieved:

Possibly it could run in the Windows subsystem for Linux How to Install Linux Bash Shell on Windows 10 [Step by Step Guide] , if that makes the usual SPI and I2C device entries available when a USB adapter is plugged in.

On the other hand, having to buy a USB adapter makes using a small OLED screen cost around 20 euros, while small HDMI monitors can be bought for around 45 euros.

1 Like

It’s still impossible to get Rapsber Pis so the natural option would be to go with a cheap USFF PC to run things. However, they still are isn’t maker friendly and it’s hard to interface with them. With a Raspberry Pi you can pretty much plug in any screen you like (i2c or SDI, monochrome or colour) into the pin headers and be able to find a driver written for it (u8g2, adafruit, etc) and off you go! There are lots of examples of people interfacing with various displays on the Pi but hardly anything for PCs. You try and get a little 320x240 colour screen working with on a PC.

With my experiments with USB->I2C using a MCP2221 to drive a monochrome display. I was only able to get 3 FPS. I tried another library and that only gave me 6 FPS. When I’m writing code on the pi I can get much faster transfer rates! HDMI is great for large displays but what about smaller/cheaper displays :disappointed_relieved:

I am surprised at the frame rate for the USB adapter too. Maybe using the kernel driver for the adapter on linux would give I2C speeds similar to the Pi.

I saw this small HDMI monitor this morning for 43 euros (on offer): https://www.amazon.es/Pantalla-capacitiva-Raspberry-4-800x480-Compatible/dp/B07ZD4QGQJ/r

yeah, I think it’s to much efforts to get it going.
Got the driver installed, device is recognized, but now I need to learn C, won’t execute on it. Not looking to master a 7th program language.
It’s about 13-18 euro’s, for a single solution (read USB to I2C). It’s simply not worth the time.