square lcd screen raspberry pi free sample
We sourced this vibrant LCD display to use on Pico Explorer Base and we"ve become rather fond of it. We"ve given it the full Breakout Garden treatment and now it"s super-easy to incorporate into other Raspberry Pi or Raspberry Pi Pico projects. The screen is around 40% bigger (by area) than the one on our 1.3" square breakout, giving you plenty of room to fill with detailed graphs or lots of data from sensors. Its 1:1 aspect ratio means it would also be good for displaying square images (like album art or Instagram photos), or perhaps even for using as the screen on a mini handheld games console?
Like our other LCD breakouts, it"s an IPS display so has great viewing angles and it"s super-crisp and bright. It"s driven by SPI and you should be able to run it at up to ~50FPS, although we"ve found that anywhere from 10FPS looks good for most uses.
You can use this breakout completely solder-free (which is very handy for prototyping) by combining it with any of our Breakout Gardens with SPI - check out the extras tab for some options! We"ve also included a strip of male header in case you want to hook it up to your SBC or microcontroller with wires, all traditional-like.
This breakout uses the same ST7789 library as our square and round LCDs. The library makes it straightforward to display images, text or graphics, and even display animated GIFs!
Our Python library is set up to use SPI 0 by default on the Pi (BCM 7 for CS, BCM 11 for SCK, and BCM 10 for MOSI), BCM 9 for DC, and BCM 19 for the backlight.
The easiest way to use our SPI breakouts with a Raspberry Pi Pico is by plugging them into a Pico Breakout Garden Base or a Pico Breakout Garden Pack.
I am looking for some pointers/help trying to get this working with OctoPi/OctoPrint/OctoDash on a Pi4 4GB (think headless), with a HyperPixel 4 Rectangular.
I have tried the following with a fresh install of OctoPi (0.18.0, 2022-05-24), and also after a full update/reboot (apt). No other software or configuration has been performed at this point, just the basic OS configured for my WiFi and my locale. I can SSH into the box, and I can hit the OctoPrint server with a browser, but I have not gone through the OctoPrint setup wizard.
After installing the "legacy" drivers per the top of this thread (because the current install stops and points me to this thread), I can reboot my Pi and the display is working in portrait mode. It"s just a terminal interface, so I"m not sure if touch is working.
If I modify pretty much anything in config.txt, per the comments above, my HyperPixel stops working. The backlighting is on, but no graphics or text. SSH and browser (OctoPrint) access remains, so I know the box is still somewhat running.
If I change the original config.txt so that everything from the original remains, but I change dtoverlay=hyperpixel4 to dtoverlay=vc4-kms-dpi-hyperpixel4, the display does not work.
I"ve been looking around for a small HDMI LCD screen to use as a seconday screen with Windows and it took a few months of research on and off before deciding on the Elecrow 5" HDMI monitor. For the most part, it took me a while because a lot of reviews here and on other sites were primarily about use and config with Raspberry Pi.
Thanks to reviewer Alan who gave a good review with plenty of photos that convinced me to go for it. Not sure if it"s just how Amazon stores user review videos but the video review was a bit pixelated so it was hard to appreciate the clarity of the screen but it seemed to be what I was looking for.
Having used it for a few months now I still can"t believe how clear and sharp the screen is! There are sadly no controls for brightness, colour, saturation or contrast but everything displayed looks very nice and accurate.
Usually when you see the resolution 800x480 you think how bad that looks when your PC doesn"t have the right drivers installed and it looks blocky. I know it"s all relative and about DPI but once I had it all connected and tested it was sharp and clear, almost HD. I wish I had bought one sooner as it is exactly what I was looking for having tried a Lilliput monitor.
As I"m using this with Windows, I"ve not needed to look through the included driver utility disc and not tried the resistive touchscreen so I can"t comment on those. Windows just detects it as a second display and lets me extend my desktop. No drivers needed. The box contains the LCD screen, a HDMI bridge connector that neatly connects the HDMI socket on the top of the screen to the HDMI socket on the Raspberry Pi when mounted together. Standoffs for mounting are also supplied plus a plastic stylus.
+ It shows the video feed straightaway without any fancy splash screens or slow initialisation pauses. This was one of the annoyances with Lilliput monitor was a slow bright blue screen on power on before it would think about showing the feed. I know it"s only a few seconds but I specifically wanted instant feed on power on for future uses.
+ I was hoping for an on/off switch but no it only has a backlight switch which I wasn"t sure about to begin with but I"ve since found it very useful and better. I was thinking about buying a micro USB cable designed for Raspberry Pi with an inline power switch built in but for now the brightness switch is fine. As a blessing in disguise, it prevents Windows/DirectShow from blinking all screens when it realises a monitor has been disconnected, that blink would often cause the video on my TV app to freeze. Turning off backlight doesn"t cause DirectShow to have a fit.
+ Small and light enough that I have it attached to a gooseneck arm so can position it how I need. I was going to buy one of those mobile phone gooseneck arms but I kept reading reviews of some not even being able to cope with weight of a smartphone without drooping so I"ve used a photographic gooseneck clamp which is a bit overkill but no droop!
- The only negative I can think of is the availability or lack of screen cases with cutouts to suit the position of the HDMI and USB sockets on this. The Elecrow has its HDMI and USB socket at the top edge of screen and nearly all cases I have looked at are designed for screens with HDMI and USB on the right edge. I"ve had to import one from China that had the cutouts for this screen. Took about 2 weeks to arrive. Wish I"d have ordered two cases at the same time to avoid the wait as I"m impressed with the clarity of Elecrow I hope to buy another one in near future.
! Just one more thing Columbo! I had originally wanted to buy Revision B of this screen with capacitive touch screen because it has OSD menu buttons. I can"t find any manuals but I"m hoping that OSD buttons allows settings for brightness as that was my other preferred criteria. Having said that, I think it would be even more impossible to find suitable case due to the positions of sockets and extra menu buttons on Revision B screen. Maybe Elecrow could provide some insight on available cases?
In this latest project I"ve combined that concept with an absolutely beautiful mini display from Pimoroni: theHyperPixel 4.0 Square. This thing is 4 inches square, just a couple of millimetres thick and can be powered from a £25 Raspberry Pi, but make no mistake, it"s an absolute belter of a display: 720 pixels square with a pixel density equal to a modern smartphone, 262, 144 colours and a 60 fps refresh rate. It"s stunning.
(Note: I am using thenontouch version of the HyperPixel 4.0, which is cheaper and does everything we need. Also note that this tutorial only works with the HyperPixel 4.0Square, not the rectangular one)
This last command generate something which looks a bit like:sudo env PATH=$PATH:/usr/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
Copy what your Pi generates(not the exact text above - yours may be different)and enter it into the command line. This instructs the system to run PM2 on boot every time, which we can then use to start the programs we want to run all the time.
I"ve laid out the key steps below on how to set up the HyperPixel display. If any of this doesn"t make sense then there isa full tutorial here from Pimoroni(makers of the HyperPixel).
Now killing this screen is not entirely straightforward. It"s full screen as you can see, and VNC doesn"t accept key presses to terminate it. As such, to get back to our desktop we need to either:
First of all, let"s create a copy of the sonos_settings.py file which we can actually edit using:cp music-screen-api/sonos_settings.py.example music-screen-api/sonos_settings.py
This tells our screen not to turn off (because we don"t want it to power save just because we"re not moving the curstor and typing) and to boot our script at startup.
The Pi will reboot. When it starts up you should see the Raspbian desktop for a moment before it loads up a black screen. This will stay like this for up to 30 seconds while things get running, and then you should see the album art (assuming you have music playing in the room you chose).
Open up a command prompt on the Pi (either via SSH or by quitting the desktop app using one of the techniques above). We will install a script called unclutter and tell it to run on startup:sudo apt update
One thing to note about removing the cursor is that while it looks nice for displaying our album art, it"s a pita if you actually want to do anything (like change settings or actually use the user interface). Remember where this file is so you can delete the line via SSH if you want to use it in the future.
If you"re so minded then you can edit thego_sonos_highres.pyfile to change a few things about how the screen operates. Everything you"ll want to mess with is in theset user variablessection at the top.
show_detailsis set to False by default. If you change this to True then it will shrink the album art a bit and show some details about the music at the bottom. I personally don"t like this feature, but it"s your Raspberry Pi so do what you want.
HyperPixel 4.0 Square has all the great features of our standard HyperPixel 4.0 – a crisp, brilliant IPS display with touchscreen, and high-speed DPI interface – it"s just more square!
This square version of HyperPixel 4.0 is great for custom interfaces and control panels, and works really well for Pico-8 games. Everything is pre-soldered and ready to go, just pop it onto your RPi, run our installer, and away you go!
HyperPixel 4.0 Square uses a high-speed DPI interface, allowing it to shift 5x more pixel data than the usual SPI interface that these small RPi displays normally use. It has a 60 FPS frame rate and a resolution of approximately 254 pixels per inch (720x720px) on its 4.0" display. The display can show 18-bits of colour (262,144 colors).
Please note: when installing HyperPixel 4.0 Square onto your RPi make sure not to press down on the screen surface! Hold the board by its edges and wiggle it to mate with the extended header (or GPIO header). Also take care not to pull on the edges of the glass display when removing your HyperPixel.
It"ll work with any 40-pin version of the RPi, including RPi Zero and RPi Zero W. If you"re using it with a larger RPi then use the extra 40-pin header that"s included to boost it up to the required height. If you"re using a Zero or Zero W then just pop it straight onto the GPIO.
The included standoff kit allows you to mount your HyperPixel 4.0 Square safely and securely to your RPi. Just screw them into the posts on the underside of the HyperPixel 4.0 Square PCB and then secure with screws through the mounting holes on your RPi.
A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. A 40-pin GPIO header is found on all current Raspberry Pi boards (unpopulated on Raspberry Pi Zero, Raspberry Pi Zero W and Raspberry Pi Zero 2 W). Prior to the Raspberry Pi 1 Model B+ (2014), boards comprised a shorter 26-pin header. The GPIO header on all boards (including the Raspberry Pi 400) have a 0.1" (2.54mm) pin pitch.
The numbering of the GPIO pins is not in numerical order; GPIO pins 0 and 1 are present on the board (physical pins 27 and 28) but are reserved for advanced use (see below).
Two 5V pins and two 3.3V pins are present on the board, as well as a number of ground pins (0V), which are unconfigurable. The remaining pins are all general purpose 3.3V pins, meaning outputs are set to 3.3V and inputs are 3.3V-tolerant.
A GPIO pin designated as an input pin can be read as high (3.3V) or low (0V). This is made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 and GPIO3 have fixed pull-up resistors, but for other pins this can be configured in software.
As well as simple input and output devices, the GPIO pins can be used with a variety of alternative functions, some are available on all pins, others on specific pins.
A handy reference can be accessed on the Raspberry Pi by opening a terminal window and running the command pinout. This tool is provided by the GPIO Zero Python library, which is installed by default on the Raspberry Pi OS desktop image, but not on Raspberry Pi OS Lite.
While connecting up simple components to the GPIO pins is perfectly safe, it’s important to be careful how you wire things up. LEDs should have resistors to limit the current passing through them. Do not use 5V for 3.3V components. Do not connect motors directly to the GPIO pins, instead use an H-bridge circuit or a motor controller board.
In order to use the GPIO ports your user must be a member of the gpio group. The pi user is a member by default, other users need to be added manually.
Using the GPIO Zero library makes it easy to get started with controlling GPIO devices with Python. The library is comprehensively documented at gpiozero.readthedocs.io.
Both Raspberry Pi Zero and Raspberry Pi Zero W is ok. WiFi version can make subsequent setup easier but in contrast it may draining more power continuously, i.e. shorter battery life.
Waveshare released 2 LCD HAT for RPi Zero, both have a tiny square LCD. The newer version have a 240 x 240 1.3" IPS LCD. It is 261 PPI and within the apple defined retina display range (218 - 458 PPI). This resolution is capable to emulate many retro game console in the CRT TV age, e.g. NES at 256 x 240 resolution, we can cut 8 pixels from both left and right overscan area and make it become 240 x 240.
To closely fit for the Waveshare 1.3" LCD HAT, it require a 8 mm tall 2 x 20 pins header. But I cannot buy one with 8 mm tall, so I will modify from a 12 mm tall pin header.
The interior size between RPi and LCD HAT can fit for a 5 mm x 23 mm x 45 mm battery, any LiPo battery with protection circuit that within this dimension should be ok.
According to the RPi Zero reduced schematics, there are only 2 pins direct connected to 5 V, it is USB plug and PAM2306 regulator. All other parts powered by regulated 3.3 V and 1.8 V.
RPi Zero average draw around 100 - 200 mA and the LiPo is around mAh, the discharge rate is around 0.5 C. It can still utilise 90% of LiPo capacity before drop below 3.5 V.
Waveshare LCD HAT use low profile female pin header, it can make the product more slim. But we need a corresponding low profile male pin header at RPi Zero to make it. The male pin header should be 8 mm tall, but I cannot find on the web. So patch it from a 12 mm male pin header.
The steps to flash RetroPie image to the micro SD card is as same as flashing Raspbian image. If you are not familiar the flashing steps, please follow the steps provided by Raspberry.org:
We need further config after RetroPie boot, before that, we need to enable DWC2 USB controller to make network connection between computer and Pi Zero.
Edit the codlin.txt in micro SD, insert "modules-load=dwc2,g_ether" after "rootwait" keyword. The result should be something like that:dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=14a75fe9-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether quiet loglevel=3 consoleblank=0 plymouth.enable=0 quiet init=/usr/lib/raspi-config/init_resize.sh
Find the "static const int mk_arcade_gpio_maps[]" row and update to HAT button mapping:static const int mk_arcade_gpio_maps[] = {6,19,5,26,13,21,16,20,0,0,0,0};
Fine tune for 1.3" LCD: C Configuration / Tools -> 805 configedit -> 1 -> 0 -> 2 Render Resolution -> O Video output resolution -> OK -> Cancel -> Cancel -> Cancel
The LCD HAT have 3 buttons and 1 extra push button in the cross button, it can map to the retro game console that only have 4 buttons (select, start, A and B). The highest resolution for this type of game console should be NES, it have 256 x 240 resolution. It can just fit for the 240 x 240 LCD display if simply crop the horizontal overscan area.
sorry for all the questions but could you please tell me what pins on the waveshare board i should solder because i dont know how you numbered the pins and what their functions are
for some reason my screen stays blank and it seems to output to hdmi (my tv cant handle the resolution though. i don"t see anything but get a low res warning)
i could fix it. according to https://www.waveshare.com/w/upload/6/6b/1.3inch_lcd_hat_user_manual_en.pdf i did edit the /etc/modprobe.d/fbtft.conf with speed=40000000 instead of 125000000 looking good now0
Nice work. I followed your instructions but for example the game 1942 I cannot see to complete screen, there are black bars at the sides. If I put "rotate=1" in "config.txt" I get image complete (like your video) but it is rotated 90º. How can do it to get a complete image wihtout "rotate=1"?
A few weeks ago, I wrote this article about using a text variable as an array, either an array of strings or an array of numbers, using the covx conversion function in addition for the latter, to extract single elements with the help of the spstr function. It"s a convenient and almost a "one fits all" solution for most use cases and many of the demo projects or the sample code attached to the Nextion Sunday Blog articles made use of it, sometimes even without mentioning it explicitly since it"s almost self-explaining. Then, I got a message from a reader, writing: "... Why then didn"t you use it for the combined sine / cosine lookup table in the flicker free turbo gauge project?"105 editions of the Nextion Sunday blog in a little over two years - time to look back and forth at the same time. Was all the stuff I wrote about interesting for my readers? Is it possible at all to satisfy everybody - hobbyists, makers, and professionals - at the same time? Are people (re-)using the many many HMI demo projects and code snippets? Is anybody interested in the explanation of all the underlying basics like the algorithms for calculating square roots and trigonometric functions with Nextion"s purely integer based language? Are optimized code snippets which allow to save a few milliseconds here and there helpful to other developers?Looking through the different Nextion user groups on social networks, the Nextion user forum and a few not so official but Nextion related forums can be surprising. Sometimes, Nextion newbies ask questions or have issues although the required function is well (in a condensed manner for the experienced developer, I admit) documented on the Nextion Instruction Set page, accessible through the menu of this website. On top of that, there is for sure one of my more than 100 Sunday blog articles which deals not only with that function, but goes often even beyond the usual usage of it. Apparently, I should sometimes move away from always trying to push the limits and listen to the "back to the roots!" calls by my potential readers...Do you remember the (almost) full screen sized flicker free and ultra rapid gauge we designed in June? And this without using the built-in Gauge component? If not, it"s time to read this article first, to understand today"s improvements. The June 2022 version does its job perfectly, the needle movement is quick and smooth, and other components can be added close to the outer circle without flickering since there is no background which needs constantly to be redrawn. But there was a minor and only esthetic weak point: The needle was a 1px thin line, sometimes difficult to see. Thus, already a short time after publishing, some readers contacted me and asked if there were a way to make the needle thicker, at least 2 pixels.Recently, when playing with a ESP32 based NodeMCU 32S and especially with its WiFi configuration, I did as (I guess) everybody does: I loaded an example sketch to learn more about the Wifi library. When you set up the ESP32 as an access point, creating its own wireless network, everything is pretty straightforward. You can easily hard code the Wifi name (SSID) and the password. But what about the client mode ? Perhaps one needs to use it in different environments. And then, a hard coded network name and password are definitively not the best solution. Thus, I thought, why not use a Nextion HMI for a dynamic WiFi setup functionality?Although the Nextion MIDI I/O interface has been primarily designed as an add-on for Nextion HMI screens to transform these in fully autonomous MIDI devices as shown in previous blog posts here, it is also of great use for any Arduino based electronic music project! Many MIDI projects for Arduino suffer from a lack good hardware support. There are sophisticated code, excellent libraries and an infinity of use cases, but afterwards, things tend not to work in a rather rough environment in the studio or on stage. That"s because two resistors and a few Dupont wires on a breadboard besides the Arduino are not really an interface which could drive your Synth, Sequencer, or Drum machine over a 5m long MIDI cable.