Code Monkey home page Code Monkey logo

recalbox-clcd's Introduction

Recalbox-CLCD

Scrolling informations for Recalbox v4.x or later using 16x2 CLCD on Raspberry Pi.

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 scrape your rom to make this script work correctly when playing.

Credits

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 18.02.09
  • 16x2 I2C HD447800 LCD (A00)

Prerequisites

You will need an CLCD I2C like the HD44780 with rom A00 (Ascii support + japanese characters) or A02 (Ascii + European Characters)

Raspberry Pi I2C GPIO Pinout

Connection of the I2C to a Raspberry Pi 3

Automatic Installation with clcld-install.sh

  • connect in ssh to your Recalbox and mount partition to rw mode
mount -o remount, rw /
  • Copy file clcd-install.sh to /recalbox/scripts
  • Execute the script with command :
sh clcd_install.sh
  • Follow the text on screen to proceed to the installation.

Note: you could have to relaunch the script a second time to complete the installation (indicate on screen before reboot). The script also provide a way to uninstall Recalbox-clcd.

Manual Installation

Activate I2C inside recalbox

  • connect in ssh to your recalbox and mount partition to rw mode
mount -o remount,rw /
mount -o remount,rw /boot
  • Edit /etc/modules.conf
  • Add at the end of the file
i2c-bcm2708
i2c-dev
  • Edit the /boot/config.txt
  • add following lines in it:
#Activate I2C
dtparam=i2c_arm=on
  • Edit the /boot/cmdline.txt

add at the end of line

bcm2708.vc_i2c_override=1
  • reboot your Recalbox

Check I2C address

You should check your I2C address of 16x2 CLCD as this device can have a different address. 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

In our example the I2C adress is 0x27

Scripts installation

  • connect in ssh to your Recalbox and mount partition to rw mode
mount -o remount, rw /
  • Copy the clcd folder inside /recalbox/scripts with winscp for example

  • Check that recalbox_clcd.py recalbox_clcd_off.py I2C_LCD_driver.py lcdScroll.py recalbox_clcd.lang are also in the /recalbox/scripts/clcd folder

  • Copy S97LCDInfoText to /etc/init.d/

  • then give execute right on all files

chmod +x /recalbox/scripts/clcd/recalbox_clcd.py
chmod +x /recalbox/scripts/clcd/recalbox_clcd_off.py
chmod +x /recalbox/scripts/clcd/I2C_LCD_driver.py
chmod +x /recalbox/scripts/clcd/lcdScroll.py
chmod +x /recalbox/scripts/clcd/recalbox_clcd.lang
chmod +x /etc/init.d/S97LCDInfoText
  • edit line #22 in I2C_LCD_driver.py in /recalbox/scripts/clcd/ with the correct I2C address, you have recover before (in our example :0x27).
nano I2C_LCD_driver.py

# LCD Address
ADDRESS = 0x27 # or 0x3f
  • reboot your Recalbox, the script will now launch automatically on start, and exit and turn off LCD backlight during shutdown of your Recalbox

Important note

To make this script work with ScummVM, they should be scrape 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>

Screenshots

Reference

recalbox-clcd's People

Contributors

choum28 avatar paradadf avatar

Watchers

 avatar

Forkers

tong-man paradadf

recalbox-clcd's Issues

Automatize installation process

Building upon #3, it would be cool if the installation process could be automatize.
The user could just type something like wget https://url_of_gist_with_instructions.com
and get everything downloaded and setup. This could be done with a simple bash script.
Even changing the "PI STATION" name over a prompt can be done.

Steps I see would be to edit:

Activate I2C inside recalbox

  • mount -o remount, rw /
  • /etc/modules.conf
  • /boot/config.txt
  • /boot/cmdline.txt
  • reboot and run the script again but skip the first steps?

Check I2C address

  • mount -o remount, rw /
  • find the I2C address

Scripts installation

  • Download all scripts to the right location
  • Give them proper rights with chmod
  • Enter your I2C address into I2C_LCD_driver.py
  • reboot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.