Skip to content

Commit

Permalink
Merge pull request #47 from Hacking3DPrinters/testing
Browse files Browse the repository at this point in the history
Push update 0.2.2
  • Loading branch information
HippoProgrammer authored Jun 17, 2024
2 parents f4e4edc + 0dc7fc5 commit 89da324
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 3 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
# Robotic Chess

An chess playing robot, powered by Stockfish.
For documentation, see [our wiki](https://github.com/Hacking3DPrinters/robotic-chess/wiki).

---

## Installation

### Installation from wheel

First, visit [our releases page](https://github.com/Hacking3DPrinters/robotic-chess/releases) and download the `.whl` and `requirements.txt` files from the desired version.

Then, run
```pip install robotic_chess-0.2.1-py3.whl```
(replace 0.2.1 with the version number of your downloaded wheel).

Finally, run
```pip install -r requirements.txt```
to install dependencies.

THIS DOES NOT INSTALL STOCKFISH OR OCTOPRINT (will be included in the future).

### Installation from source

First, clone our repo using `git clone https://github.com/Hacking3DPrinters/robotic-chess.git`, and enter the new directory. Then do `pip install dist/robotic_chess-0.2.1-py3-none-any.whl` (replace 0.2.1 with the desired version number), followed by `pip install -r requirements.txt`.

THIS DOES NOT INSTALL STOCKFISH OR OCTOPRINT (will be included in the future).
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0","stockfish==3.28.0"]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pip requirements file for robotic-chess
stockfish==3.28.0
octoprint-cli==3.3.2
3 changes: 3 additions & 0 deletions src/robotic_chess/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import chess
import gcode
import __main__
1 change: 1 addition & 0 deletions src/robotic_chess/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# placeholder
7 changes: 5 additions & 2 deletions src/robotic_chess/gcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def add_movement(self,x=0,y=0,z=0,speed=200):
def add_home(self):
self.cmd_list.append('G00 X{x} Y{y} Z{z} ; go to set home'.format(x=str(self.home[0]), y=str(self.home[1]), z=str(self.home[2])))
def add_fan(self,speed=255):
self.cmd_list.append('M106 S{s} ; use fan'.format(s=str(speed)))
if speed=255:
self.cmd_list.append('M106 ; use fan'.format(s=str(speed)))
else:
self.cmd_list.append('M106 S{s} ; use fan'.format(s=str(speed)))
def change_pos(self,rel_pos=True):
if rel_pos:
self.cmd_list.append('G91 ; set relative position')
Expand Down Expand Up @@ -78,4 +81,4 @@ def clear(self):





0 comments on commit 89da324

Please sign in to comment.