GithubHelp home page GithubHelp logo

rmarabini / chessnutair Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 0.0 43 KB

python script able to connect to the chessnut air board using bluetooth

License: GNU General Public License v3.0

Python 100.00%

chessnutair's Introduction

chessnutair

python script able to connect to the chessnut air board using bluetooth

Here you will find a script able to read the position of the pieces in the chess board and print the board on the PC screen. Additionally it will switch on the leds of those squares that are not empty. If a piece is moved a new board will be printed on the screen and the corresponding leds switched off/on. The connection are made by bluetooth using the library bleak and no driver is needed. Regarding supported systems I believe the only limitations are those imposed by the bleak library that are (https://bleak.readthedocs.io/en/latest/):

  • Supports Windows 10, version 16299 (Fall Creators Update) or greater
  • Supports Linux distributions with BlueZ >= 5.43 (See Linux backend for more details)
  • OS X/macOS support via Core Bluetooth API, from at least OS X version 10.11

So far, I have only tested this shofware in Ubuntu 18.

Installation and execution

  1. download code
  2. install dependencies (pip3 install -r requeriments.txt
  3. Execute python3 ./main.py

The chessnut air board need to be paired to the PC in which you are running this.

chessnutair's People

Contributors

rmarabini avatar

Stargazers

johnrpenner avatar Lassana siby  avatar Alinson S. Xavier avatar Nicolas Vaagen avatar Patrick Rose avatar Luca D avatar cem berik avatar Nathan Loding avatar  avatar Edmund Bayerle avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chessnutair's Issues

I am trying to addapt your module to provide fen

Hello,

I am trying to modify your code to provide FEN.

Each of the 32 bytes represents two squares with the order being the squares labelled
H8,G8,F8...C1,B1,A1. Within each byte the lower 4 bits represent the first square and the
higher 4 bits represent the second square. This means that if the 32 bits were written out in
normal hex characters the pairs would actually appear reversed.
For example, the 32 bytes for the normal starting position with black on the 7th and 8th ranks
would be shown as:
58 23 31 85 44 44 44 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 77 77 77 77 A6 C9 9B 6A
So the first byte's value of 0x58 means a black rook (0x8) on H8 and a black knight (0x5) on
G8 and the second byte's value of 0x23 means a black bishop (0x3) on F8 and a black king (0x2)
on E8.

So the data is passed from the chessboad in columns?

I am mostly asking for clarification on what counterColum represents.

Thanks for reading

Nicolas Vaagen

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.