New Raspberry PI 5

Raspberry PI specific forum
User avatar
mk-soft
Always Here
Always Here
Posts: 6202
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

New Raspberry PI 5

Post by mk-soft »

I needed something new to play with again.

So I treated myself to the new Raspberry PI 5. (As a bundle with raspi case with fan and heat sink, power supply, etc)
I use an external usb SSD as a drive. (EMTEC SSD X210 128GB)

The PI 5 is really much faster than the PI 4, compiling from the PureBasic IDE is more than 3 times faster.
The new fan control is better than described.

Small Fan Speed Viewer :wink:

Update
- Bugfix path to fan1_input

Code: Select all

;- TOP by mk-soft, v1.01.2, 16.02.2024

; Raspberry PI 5 Fan Speed
; Folder "/sys/devices/platform/cooling_fan/hwmon/*/fan1_input"

Enumeration Window
  #Main
EndEnumeration

Enumeration Gadgets
  #Label
  #Speed
EndEnumeration

Global file, fan1.s, speed.s

Procedure InitProgram()
  Protected path.s, path2.s
  path.s = "/sys/devices/platform/cooling_fan/hwmon/"
  If ExamineDirectory(0, path, "hwmon*")
    While NextDirectoryEntry(0)
      If DirectoryEntryType(0) = #PB_DirectoryEntry_Directory
        path2 = DirectoryEntryName(0)
        Break
      EndIf
    Wend
    FinishDirectory(0)
  EndIf
  If path2
    fan1.s = path + path2 + "/fan1_input"
    file = ReadFile(#PB_Any, fan1)
    If file
      speed = ReadString(file)
    EndIf
  EndIf
  ProcedureReturn file
EndProcedure

Procedure ReleaseProgram()
  If file
    CloseFile(file)
  EndIf
EndProcedure

Procedure UpdateSpeed()
  FileSeek(file, 0)
  speed = ReadString(file)
  SetGadgetText(#Speed, speed + " rpm")
EndProcedure

Procedure Main()
  
  If Not InitProgram()
    MessageRequester("Error", "Fan Speed Inut Not Found!")
    End -1
  EndIf
  
  If OpenWindow(#Main, #PB_Ignore, #PB_Ignore, 240, 80, "Fan Speed", #PB_Window_SystemMenu)
    TextGadget(#Label, 10, 10, 100, 25, "Fan-Speed")
    StringGadget(#Speed, 120, 5, 100, 25, speed + " rpm", #PB_String_ReadOnly)
    
    BindEvent(#PB_Event_Timer, @UpdateSpeed())
    AddWindowTimer(#Main, 1, 1000)
    
    Repeat
      Select WaitWindowEvent()
        Case #PB_Event_CloseWindow
          UnbindEvent(#PB_Event_Timer, @UpdateSpeed())
          Break
      EndSelect
    ForEver
  EndIf
  
  ReleaseProgram()
  
EndProcedure : Main()
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 6202
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: New Raspberry PI 5

Post by mk-soft »

Update
- Bugfix path to fan1_input
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
idle
Always Here
Always Here
Posts: 5835
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: New Raspberry PI 5

Post by idle »

The PI 5 speed will be almost on par with desktops now.
User avatar
mk-soft
Always Here
Always Here
Posts: 6202
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: New Raspberry PI 5

Post by mk-soft »

That's right. ;)
The programs also start very quickly (with SSD) and run smoothly.
Unfortunately, there are no running screensavers for Wayland for the Raspberry yet.
That's why I first switched to X11 with raspi-config and installed the xscreensaver.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
macros
User
User
Posts: 88
Joined: Wed Mar 15, 2006 1:47 pm
Location: Munich

Re: New Raspberry PI 5

Post by macros »

There are some workarounds to get xscreensaver working under wayland:
https://www.linux.org/threads/xscreensa ... and.43543/
and also
https://sr.ht/~mstoeckl/wscreensaver/

But as long as you are happy with X11, no need to switch just for the sake of novelty :)
RSrole
User
User
Posts: 71
Joined: Fri Apr 29, 2022 8:27 pm

Re: New Raspberry PI 5

Post by RSrole »

I had some time in the last few days to mess with this and it seems that the RPi people changed chips that control the gpio from pi4 to pi5. I bought the Pi5. Most of the libraries recommended don't work on the new hardware. Since Pi5 is it's own beast, it would seem that the RPi people should have provided a gpiSomething.so that's compatible with whatever version you buy. It's a very odd thing to sell a computer with gpio pins, but no clean way to get to them :( . Searching the web has you go down many rabbit holes and still no good solution. A shame.

I've written a few sketches for arduino and getting to the pins is a breeze, so it can be done if the manufacturer chooses to.
User avatar
CDXbow
User
User
Posts: 97
Joined: Mon Aug 12, 2019 5:32 am
Location: Oz

Re: New Raspberry PI 5

Post by CDXbow »

mk-soft wrote: Sun Feb 18, 2024 3:31 pm That's right. ;)
The programs also start very quickly (with SSD) and run smoothly.
Unfortunately, there are no running screensavers for Wayland for the Raspberry yet.
That's why I first switched to X11 with raspi-config and installed the xscreensaver.
I did exactly the same thing wrt Wayland. There doesn't seem to be many pluses to it, just a whole heap of things stop working. I have not yet added an SSD, I've wasted a bit of time building it into an old NBN modem box with an 15w per side amplifier.
Post Reply