Giter Site home page Giter Site logo

chesspuzzlesoninky's Introduction

Chess Puzzles on Inky Impression 7

This project allows you to display random chess puzzles on an Inky Impression 7.3" ePaper display. It's designed to help you improve your chess calculations from various positions and enhance your memory skills.

Requirements

Before you begin, make sure you have the following requirements in place:

  • Raspbian OS: Ensure you are using the Raspberry Pi's operating system. It's recomented that you use Raspbian Lite as it consumes less power but that one does not come with a Desktop environmnet so be ready to setup the pi over ssh if you go with lite
  • Enabled IC2 and SPI Interfaces: You can enable these interfaces using the raspi-config CLI. Refer to the official documentation for guidance on using this tool.
  • Inky Impression 7.3" eInk Display: You can purchase this display from the official site.
  • Compatible Raspberry Pi: Any Raspberry Pi with a 40-pin GPIO header will work for this project.

Features

This project offers several useful features:

  • Automatic Database Download: It automatically downloads the lichess puzzles database and saves it locally.
  • Random Puzzle Display: The program randomly selects a puzzle from the downloaded database.
  • Move Highlighting: It highlights the last move made in the puzzle.
  • QR Code Encoding: The puzzle's URL is encoded into a QR code, allowing you to check your calculation.
  • Fallback Rendering: If Inky Impression is not detected, it renders the puzzle image on a monitor, making development faster.
  • Scheduling: The main script can be easily scheduled (e.g., using cron) to render a random puzzle daily or at any desired frequency.

Note: If you use this script with other Inky ePaper displays (e.g., Inky Impression 4"), you can adjust text-rendering coordinates in the add_text and add_qr_code functions.

Running the script

Before running main.py make sure that you have installed all of the dependencie. You can do that by:

  1. cd to the root folder of the project
  2. run pip install -r requirements.txt

Manual run

  1. Change directory to the root of the project
  2. Execute python main.py

Scheduled run

If you like to schedule the script to once twice a day (at 8am):

  1. Change directory to the root of the project
  2. Run the install_cron_job.sh script

Screenshots

puzzleTwo puzzleOne

3D Case

If you want to print a 3D case for your Inky Impression 7.3" display, you can use the following resources:

This project offers an enjoyable way to enhance your chess skills and adds interactivity with the Inky Impression display. Have fun with your chess puzzles!

Troubleshooting

If you get this error when trying to run the main.py script:

ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

You need to install libopenblas-dev package -> sudo apt-get install libopenblas-dev

Raspberri Pi Zero

Increasing swap

The default swap size of the Pi Zero - 128MB (on Raspbian OS for example) is not enough to run the script. If you attempt to run the script with 128MB, the OS just kills the process when there is not enough memory. That can be easily fixed by increasing the swap memory to 1024MB. Follow the steps listed here on how to do that.

chesspuzzlesoninky's People

Contributors

georgikoemdzhiev avatar

Stargazers

 avatar

Watchers

 avatar

chesspuzzlesoninky's Issues

Add run steps

Currently the README file does not provide steps on executing the python script.

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.