
Add PowerDevices and Buttons to your
Raspberry Pi 1 – 5
GPi Case Case 2 Kit ជាមួយនឹង Base Plus Internal Module
The Raspberry Pi 5 uses new GPIO code; the details below do not apply to these boards, except for Argon One V3 at the bottom of the page.
ដើម្បីរក្សាតម្លៃធ្លាក់ចុះ បន្ទះ Raspberry Pi មិនដឹកជញ្ជូនដោយប៊ូតុងថាមពលទេ ប៉ុន្តែវាងាយស្រួលក្នុងការបន្ថែមរបស់អ្នកផ្ទាល់! ការណែនាំនេះនឹងបង្ហាញអ្នកពីរបៀបបន្ថែមប៊ូតុងថាមពលទៅ Raspberry Pi របស់អ្នកដែលអាចបើក/បិទប្រព័ន្ធ BATOCERA របស់អ្នក។
If you don’t want to build your own, several popular commercial options are available. They will add a power switch to your Raspberry Pi, sometimes provide a temperature-controller fan… and add a stylish look to your board.
- កុងតាក់ថាមពលពាណិជ្ជកម្ម
- Provide real power cuts
- ការចំណាយគឺប្រហែល 10-25 ដុល្លារ
- ជាធម្មតាត្រូវការកន្លែងខ្លះដើម្បីសាងសង់វានៅក្នុង
- ប៊ូតុងសាមញ្ញ ឬឧបករណ៍បិទបើក
- ការដំឡើងសាមញ្ញណាស់។
- ការចំណាយទាប
- No power cut possible
You should never “yank” the power cord out of your Pi as this can lead to severe data corruption (and in some cases, physically damage your SD card). Even if Batocera is best prepared against file corruption, it is recommended to safely shut down your Pi via Batocera’s Shutdown Menu or, even better, use a power button or switch.
នៅពេលដែល Batocera "បិទ" Pi ដោយប្រើប៊ូតុង/បិទបើកធម្មតា វានឹងបញ្ជូនវាទៅក្នុងស្ថានភាពបញ្ឈប់ ដែលនៅតែប្រើប្រាស់ថាមពលតិចតួចបំផុត។ នេះគឺស្រដៀងគ្នាទៅនឹងរបៀបដែលកុំព្យូទ័រទំនើបទាំងអស់ដំណើរការ។ នៅក្នុងការណែនាំនេះ យើងនឹងចូលទៅក្នុងស្ថានភាពបញ្ឈប់ ដើម្បីឱ្យយើងនៅតែអាចបញ្ចូលថាមពលម្តងទៀតនៅពេលក្រោយដោយមិនចាំបាច់ដោតប្រភពថាមពលឡើងវិញ។ អ្នកអាចផ្តាច់ការផ្គត់ផ្គង់ថាមពលដោយសុវត្ថិភាព (ប្រសិនបើអ្នកចង់បាន) ដោយមិនចាំបាច់ព្រួយបារម្ភអំពីការខូចខាតទិន្នន័យ ខណៈពេលដែលស្ថិតក្នុងស្ថានភាពបញ្ឈប់។
This method gives the best user experience if you use the GPi-case from Retroflag, for example. This nice housing only has one button switch to simply turn on/off the Raspberry. Since Batocera 5.25, the OS is best prepared for all kinds of power devices connected to the Raspberry Pi. But you will lose your game SRM save (your in-game save file) if you just trigger the power button inside a game session.
រក្សាទុកការការពារទិន្នន័យ
- ទាញយកស្គ្រីបដែលបានផ្តល់ខាងក្រោម
- រក្សាទុកវាទៅ /userdata/system
- កំណត់ប៊ីតដែលអាចប្រតិបត្តិបានជាមួយ chmod +x /userdata/system/custom.sh
- Set up your power device according to further below
custom.sh
#!/bin/bash
# custom.sh – place to /userdata/system
# by cyperghost 23/11/19
#
ប្រសិនបើ [[$1 == ឈប់]]; បន្ទាប់មក
batocera-es-swissknife -emukill
fi
ករណីពាណិជ្ជកម្ម និងកុងតាក់ថាមពល
Here are some commercial power switches/commercial cases with power switches that are currently supported. These offer a real power cut, which means the Raspberry is really switched off. Usually, these small power devices are plugged on top of the Raspberry Pi using its 40 Pin header. For further installation instructions, use the links provided.
Here are the values you can put as system power.switch=<value_below> in batocera.conf:
| ឧបករណ៍ ឈ្មោះ | system.power.switch | កន្លែងណា to buy and additional manufacturer information | Notes related ទៅ បាតូសេរ៉ា |
| ករណី Retroflag ជាមួយប៊ូតុង | RETROFLAG_ADV | http://www.retroflag.com | ដូចគ្នានឹងប៊ូតុងមុនដែរ លើកលែងតែប៊ូតុងអាចបង្កសកម្មភាព ដូចជាការបញ្ឈប់កម្មវិធីត្រាប់តាម |
| ករណី Retroflag GPIO | RETROFLAG_GPI | https://www.retroflag.com/GPi-CASE.html | ទទួលបានច្រើនទៀត ព័ត៌មានលម្អិត នៅទីនេះ |
| ករណី Kintaro Super Kuma/Roshambo Retro Gaming | គីនតារ៉ូ | https://www.amazon.com/dp/ B079T7RDLX/?tag=electromake-20 https://www.electromaker.io/blog/ article/roshambo-retro-gaming-case-review |
|
| ស្រោម Pironman Raspberry Pi 4 | PIRONMAN | https://www.sunfounder.com/ products/raspberry-pi-4-case |
ដំណើរការ pironman ពីស្ថានីយដើម្បីកំណត់រចនាសម្ព័ន្ធ OLED, RGB & Fan |
| ស្រោម Pironman Raspberry Pi 5 | PIRONMAN ៥ | https://www.sunfounder.com/collections/cases/ products/pironman-5-nvme-m-2-ssd-pcie-mini- pc-case-for-raspberry-pi-5 |
Run pironman5 from the terminal to configure the OLED, RGB & Fan |
វាអាចទៅរួចក្នុងការបន្ថែមប៊ូតុងដើម្បីបើក និងបើកកុងសូល Batocera របស់អ្នកឱ្យបានត្រឹមត្រូវ! ប៉ុន្តែដោយរបៀបណា?
តើខ្ញុំគួរប្រើ GPIO PIN មួយណា?
អ្នកអាចបន្ថែមប៊ូតុងថាមពល ដើម្បីបើក/បិទ Batocera។ ប៊ូតុងអាចជាប៊ូតុងរុញ (ប៊ូតុងមួយភ្លែត) ឬប៊ូតុងប្តូរ (ប៊ូតុងបិទបើក) ។ ចំណាំនៅលើប៊ូតុងរុញ៖ GPIO មួយចំនួនមានរេស៊ីស្តង់ទាញឡើងក្នុង (resistors ភ្ជាប់ទៅ + 3.3V) ដូច្នេះវាជាការប្រសើរក្នុងការប្រើកុងតាក់បើកជាធម្មតា (អក្សរកាត់ NO) ជាមួយនឹងម្ជុលទាំងនេះ។
ដើម្បីភ្ជាប់កុងតាក់ទៅ Raspberry Pi GPIO សូមដោតកូដ PIN នៅលើ GPIO3 (លេខ PIN រូបវិទ្យា 5 ខាងលើនៅខាងឆ្វេង) និងមួយទៀតនៅលើម៉ាស់ដែលមានទីតាំងនៅខាងស្តាំខាងស្តាំ (លេខ PIN រូបវិទ្យា 6)
ការធ្វើឱ្យសកម្មនៃកុងតាក់
របៀបម៉ឺនុយ GUI
Get a terminal window by quitting EmulationStation with a Keyboard or get access to a terminal by SSH. Now enter /etc/init.d/S92switch setup, and you will see a terminal window like in the picture below. From there, you can select and activate your power or switch device. The script will show you an already activated device (ONOFFSHIM in this case) and will later show you a small message box if the value setup was successful. After this reboot, the device and everything should work fine.
ការធ្វើឱ្យសកម្មដោយដៃ
Check in the table above what type of power switch you need.
បន្ទាប់មក កែសម្រួលឯកសារ confg /userdata/system/batocera.conf – នៅក្នុង exampខាងក្រោមជាមួយលេខ PIN56ONOFF ។
For a latching switch, edit batocera.conf with your preferred text editor and add system.power.switch=PIN56ONOFF
ចាប់ផ្ដើមប្រព័ន្ធឡើងវិញ
Alternatively, if you don’t want to edit the file and you are logged in with SSH or you have a terminal open, then enter: batocera-settings-set system. power. switch PIN56ONOFF then reboot. Your Batocera system can now be turned on/off with a button!
ត្របកភ្នែក
Retroflag is the manufacturer that focuses on retro cases for Raspberry Pi series and for original-looking retro game controllers. In the last years, they’ve managed to bring some pretty nice-looking housing to the market. These are inspired of gaming devices from the golden era of game consoles. If you are a proud owner of a GPicase, then take a look here. Besides the nice looking, there are always working buttons for power and/or reset. But you have to take a few steps there.
- Enable the Safe Shutdown Switch on the PCB! This small switch depends on the user. housing, refer to the shipped manual from Retroflag on how to do this.
- Edit batocera.conf and set the correct switch mode
You can edit the config file from the SAMBA share with your dedicated text editor
Or use SSH, and you can edit the config file with nano/userdata/system/batocera.conf
Or use the GUI mode; you need SSH for this method, too. - Activate or select the correct power switch system. power. switch=RETROFLAG
- ចាប់ផ្ដើមឡើងវិញ វានឹងធ្វើឱ្យមុខងារបិទសុវត្ថិភាពសកម្ម
សម្រាប់តែករណី NSPi 4 ប៉ុណ្ណោះ។
អ្នកត្រូវតែចាប់ផ្តើមឡើងវិញបន្ថែម! សុំទោសអ្នកទាំងអស់គ្នា ប៉ុន្តែយើងត្រូវធ្វើការកំណត់ដោយស្វ័យប្រវត្តិនៅពីក្រោយឆាក!
Also, for the NESPi4 case, you might experience some sluggishness using the HDD/SSD “cartridge”.
នៅទីនេះ a Reddit link that gives you a way to fix it (even if the Reddit post was written for RetroPie, it has been reported as OK on Batocera too).
អាហ្គុនមួយ។
Until Batocera 40, only ArgonOne V1/V2 cases for Raspberry Pi 4 are supported.
Batocera 41 introduces support for ArgonOne V3 for Raspberry Pi5, in addition to ArgonOne V1/V2 for Raspberry Pi5.
Activate the Argon One fan by adding system.power.switch=ARGONONE in the configuration file batocera.conf and that’s it. Upon next reboot, the fan will be controllable by software (fan speed depending on the temperature), and double-clicking the button on the back will kill the running emulator and get you back to EmulationStation. Don’t use any external script; the support for Argon One is already included in the Batocera Linux distribution.
តាមលំនាំដើម កង្ហារចាប់ផ្តើមនៅ 55 អង្សាសេ។ នេះគឺជាការកំណត់រចនាសម្ព័ន្ធខ្សែកង្ហារលំនាំដើម៖
argonone.conf
# ការកំណត់រចនាសម្ព័ន្ធ file for Argon One Pi4 case
# temperatures are in Celsius
# fan_speed គឺពី 0 ទៅ 100 ភាគរយ
# វាក្យសម្ព័ន្ធគឺ៖ temp_threshold=fan_speed
# លំនាំដើមគឺ៖
45=0
55=10
60=55
65=100
ជាមួយនឹងការកំណត់រចនាសម្ព័ន្ធខ្សែកង្ហារនេះ ឥរិយាបថនឹងមានដូចខាងក្រោម៖
- នៅសីតុណ្ហភាពទាបជាង 55°C កង្ហារបិទ
- នៅសីតុណ្ហភាព 55-59 អង្សាសេ កង្ហារដំណើរការក្នុងល្បឿន 10%
- នៅសីតុណ្ហភាព 60-64 អង្សាសេ កង្ហារដំណើរការក្នុងល្បឿន 55%
- នៅសីតុណ្ហភាព 65°C និងខ្ពស់ជាងនេះ កង្ហារដំណើរការក្នុងល្បឿន 100%
តាមការណែនាំរបស់អ្នកលក់ វាមានសុវត្ថិភាពក្នុងការចាប់ផ្តើមកង្ហារត្រឹម 55 ដឺក្រេប៉ុណ្ណោះ។ សំលេងរំខានតិច។ ![]()
អ្នកអាចកំណត់កម្រិតសីតុណ្ហភាព/កង្ហារល្បឿនផ្ទាល់ខ្លួនដោយបង្កើតឯកសារ argonone.conf ថ្មីនៅ /userdata/system/configs/argonone.conf ។
ពី៖ https://wiki.batocera.org/ – Batocera. Linux – Wiki
តំណអចិន្រ្តៃយ៍៖ https://wiki.batocera.org/add_powerdevices_rpi_only?rev=1725893619
បច្ចុប្បន្នភាពចុងក្រោយ៖ ២០១៩/០៨/០១ ១៧:៤៦

https://wiki.batocera.org/add_powerdevices_rpi_only
ឯកសារ/ធនធាន
![]() |
Retroflag GPi Case Case 2 Kit with Base Plus Internal Module [pdf] សេចក្តីណែនាំ GPi Case Case 2 Kit with Base Plus Internal Module ជាមួយ Base Plus Internal Module, Base Plus Internal Module, Plus Internal Module, Internal Module |
