Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    [Script] CLCD display on recalbox

    Community projects
    [script] clcd display recalbox
    8
    29
    10810
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Choum
      Choum last edited by Substring

      Recalbox-Clcd

      https://github.com/Choum28/Recalbox-Clcd

      alt text

      About

      Small script written in Python for Recalbox project ( http://recalbox.com/ )
      running on Raspberry Pi 2,3, which displays all necessary info on a 16x2 CLCD display
      You must scrap your rom to make this script work correctly when playing.

      Credits

      • Original version of the recalbox script from Godhunter74
      • Original project for retropie from zzeromin (https://github.com/zzeromin/RetroPie-Clcd)
      • Thanks to zzeromin smyani, zerocool, GreatKStar
      • Recalbox team http://www.recalbox.com

      Features

      • Current Date and Time
      • IP address of eth0, wlan0
      • CPU Temperature and Speed
      • Emulation and ROM informations
      • Daemon provide to manage start/stop of the script

      Development Environment

      • Raspberry Pi 3
      • Recalbox v4.1
      • 16x2 I2C HD447800 LCD (A00)

      Installation

      Raspberry Pi I2C GPIO Pinout

      1602 LCD + IIC/IC2, 16x2 HD44780A00 or HD44780A02 (A00 = Ascii + japanese fonts, A02 = Ascii + European fonts)

      Connection of the I2c to a raspberry pi 3

      alt text

      Scripts installation

      • connect in ssh to your recalbox and mount partition to rw mode
      mount -o remount, rw /
      
      • Copy
        recalbox_clcd.py
        recalbox_clcd_off.py
        I2C_LCD_driver.py
        lcdScroll.py
        to /recalbox/scripts folder with winscp for example

      • Copy
        S97LCDInfoText
        to /etc/init.d/

      • then give execute right on all file

      chmod +x /recalbox/scripts/recalbox_clcd_off.py
      chmod +x /recalbox/scripts/recalbox_clcd_off.py
      chmod +x /recalbox/scripts/I2C_LCD_driver.py
      chmod +x /recalbox/scripts/lcdScroll.py
      chmod +x /etc/init.d/S97LCDInfoText
      

      Activate I2C inside recalbox

      • Edit /etc/modules.conf
      • Add at the end of the file
      i2c-bcm2708
      i2c-dev
      
      • Edit the /boot/config.txt
        add at the end of line
      bcm2708.vc_i2c_override=1
      
      • reboot

      Check I2C address

      You should check your I2C address of 16x2 CLCD as this device can have different adress.
      Those are two address each other normally => 0x27 or 0x3f.

      Execute the following command (could take some time to complete)

      i2cdetect -y 1
      
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      00:          -- -- -- -- -- -- -- -- -- -- -- -- --
      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      

      edit line #22 in I2C_LCD_driver.py in /recalbox/scripts with the correct adress show by the command (in this example :0x27).

      nano I2C_LCD_driver.py
      
      # LCD Address
      ADDRESS = 0x27 # or 0x3f
      

      Important note

      To make this script work with Scummvm, they should be scrap but the path in the gamelist.xml should be a folder and not the scummvm "fake file".

      <path>./FT/</path>
      instead of 
      <path>./FT/ft.scummvm</path>
      

      Reference

      https://forum.recalbox.com/topic/5777/relier-à-un-écran-et-afficher-du-texte/121

      screenshots

      alt text
      alt text
      alt text

      1 Reply Last reply Reply Quote 4
      • rockaddicted
        rockaddicted last edited by

        great thank you,
        could it be possible to do a wiki, please ?

        Recalbox V4.1.0 - RPI3 OC - Xbox360 wireless
        Wiki ENG : https://github.com/recalbox/recalbox-os/wiki/Mini-How-To-(EN)
        Wiki FR : https://github.com/recalbox/recalbox-os/wiki/Mini-How-To-(FR)

        Don't forget to upvote messages if it has been useful ;)

        1 Reply Last reply Reply Quote 0
        • Choum
          Choum last edited by

          could be possible, for the moment I still working to clean-up the code and do a more simple one.

          paradadf 1 Reply Last reply Reply Quote 0
          • paradadf
            paradadf Staff @Choum last edited by

            @choum Libretro is written wrong here:
            https://github.com/Choum28/Recalbox-Clcd/blob/master/recalbox_clcd.py#L255

            If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

            1 Reply Last reply Reply Quote 0
            • Choum
              Choum last edited by

              Thank will be fix in the next commut.

              1 Reply Last reply Reply Quote 0
              • Choum
                Choum last edited by

                I have add an entry to the French and English wiki.

                1 Reply Last reply Reply Quote 1
                • Choum
                  Choum last edited by

                  Any return about this script especially on stable version of recalbox ?

                  Is there a way to "intercept" retroachievemet unlock ?
                  Same for kodi I didn't find a way to know which file is been playing, I saw that kodi already have some kind of script that do that but it require LCDPROC which seems to not be avalaible on recalbox.

                  paradadf voljega 2 Replies Last reply Reply Quote 0
                  • paradadf
                    paradadf Staff @Choum last edited by

                    @choum I don't have the required hardware, so I can hardly comment on that (yet, at least).
                    About kodi... the people on its forum is very responsive if you don't find another way to do it online.

                    If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                    1 Reply Last reply Reply Quote 0
                    • voljega
                      voljega Banned @Choum last edited by voljega

                      @choum I think you're only the second one here to have a lcd display for its recalbox ...

                      1 Reply Last reply Reply Quote 0
                      • cissou
                        cissou last edited by

                        For kodi I think you can use the jsonrpc api :
                        http://kodi.wiki/view/JSON-RPC_API

                        Dell 3020M + X360 sans fil
                        Bartop Modulaire : Rpi3
                        Gpi case rpi0 -sans W- [oui je suis un fou]

                        1 Reply Last reply Reply Quote 0
                        • paradadf
                          paradadf Staff last edited by

                          It would be cool if the script would identify recalbox's language (store in recalbox.conf) and show the dictionary for it. There are not so many strings to translate and you can allways fallback to english it the languague isn't supported.

                          If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                          Choum 1 Reply Last reply Reply Quote -1
                          • Choum
                            Choum @paradadf last edited by

                            @paradadf This is now implement. Just check the different translation if some word are incorrect, (missing turkish and chinese translation)

                            paradadf 1 Reply Last reply Reply Quote 0
                            • paradadf
                              paradadf Staff @Choum last edited by

                              @choum you are so efficient! Great job! I'm on my phone now, but I'll try to correct some translations tomorrow.

                              If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                              1 Reply Last reply Reply Quote 0
                              • Choum
                                Choum last edited by

                                I have redo all the translation implementation, all texts are now in .lang text file to make translation easiest.

                                The script support all recalbox language (from 4.1).
                                Non European alphabet like Greek, Chinese, Russian, Arabic will use English (GB) texts (European console name)
                                Japanese use English text with his own specific console name.
                                Because the lcd HD44780 display them correctly ( but I think it could be possible for Japanese).
                                Future unsupported language will also use English (GB) texts in not found in .lang file.

                                paradadf 1 Reply Last reply Reply Quote 0
                                • paradadf
                                  paradadf Staff @Choum last edited by

                                  @choum hi! I´m not sure if you´ve missed the issues and PR I made on your repo, but wanted to give you a heads up about the installation script I wrote. Currently, it is based on the changes I made on my fork. Mainly and most important moving the scripts to a separated folder to have it better organized.
                                  https://github.com/paradadf/Recalbox-Clcd/blob/master/clcd-install.sh

                                  If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                                  La Vague 1 Reply Last reply Reply Quote 0
                                  • Choum
                                    Choum last edited by

                                    Hello,

                                    I saw them today, this is wonderfull.

                                    La Vague 1 Reply Last reply Reply Quote 0
                                    • La Vague
                                      La Vague @Choum last edited by

                                      @choum
                                      Bonjour,
                                      achat de l'afficheur sur aliexpress. (1602 16x2 HD44780 Character LCD blue + 1pcs IIC/I2C 1602 Serial Interface)
                                      branchement ok (rétro-éclairage)
                                      et configuration (copie des fichier & modifications) mais a la commande: i2cdetect -y 1
                                      ça ne fonctionne pas rien de détecté.
                                      D’où viens le pb ?
                                      merci de votre aide.

                                      1 Reply Last reply Reply Quote 0
                                      • La Vague
                                        La Vague @paradadf last edited by OyyoDams

                                        @paradadf said in [Script] CLCD display on recalbox:

                                        @choum hi! I´m not sure if you´ve missed the issues and PR I made on your repo, but wanted to give you a heads up about the installation script I wrote. Currently, it is based on the changes I made on my fork. Mainly and most important moving the scripts to a separated folder to have it better organized.
                                        https://github.com/paradadf/Recalbox-Clcd/blob/master/clcd-install.sh

                                        Bonjour,
                                        message d'euure au lancement !

                                        sous windows avec putty:

                                        login as: root
                                        root@recalbox's password:
                                        # sh ./clcd-install.sh
                                        sh: ./clcd-install.sh: No such file or directory
                                        # cd /
                                        # sh ./clcd-install.sh
                                        ./clcd-install.sh: line 7: syntax error near unexpected token `newline'
                                        ./clcd-install.sh: line 7: `<!DOCTYPE html>'
                                        # chmod +x clcd-install.sh
                                        

                                        merci de votre aide.

                                        paradadf 1 Reply Last reply Reply Quote 0
                                        • Choum
                                          Choum last edited by

                                          Bonjour,

                                          Pour le script aucune idée, je ne l'ai pas pas encore testé ni développé.

                                          Pour la commande i2cdetect -y 1, elle devrait normalement fonctionner, une fois les modifications effectuées ET le raspberry redémarré.

                                          Si tu fais un : LS /dev/

                                          Tu vois un I2c-1 (ou autre I2C)

                                          1 Reply Last reply Reply Quote 0
                                          • paradadf
                                            paradadf Staff @La Vague last edited by

                                            @la-vague I don’t speak french, but you have to copy the clcd-install.sh script preferably to /recalbox/scripts/ with, e.g. WinSCP. Connect with putty and navigate to that folder wirh cd /recalbox/scripts/, then chmod +x ./clcd-install.sh and finally run the script with ./clcd-install.sh. Follow the instructions then...

                                            If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                                            La Vague 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Want to support us ?

                                            60
                                            Online

                                            98.7k
                                            Users

                                            28.1k
                                            Topics

                                            187.0k
                                            Posts

                                            Copyright © 2021 recalbox.com