Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bofh69 committed Mar 6, 2024
1 parent e5249fd commit 31c2ce1
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
[![REUSE status](https://api.reuse.software/badge/github.com/bofh69/nfc2klipper)](https://api.reuse.software/info/github.com/bofh69/nfc2klipper)
![GitHub Workflow Status](https://github.com/bofh69/nfc2klipper/actions/workflows/pylint.yml/badge.svg)


# nfc2klipper

Set loaded spool & filament in klipper from NFC tags.
Set loaded spool & filament in klipper from NFC/RFID tags.


## Preparing an NFC reader
Expand All @@ -29,20 +30,32 @@ for how to configure a raspberry pi for it.

## Preparing klipper

Klipper should have two gcode macros:
When a tag has been read, it will send these gcodes to Klipper:

* SET_ACTIVE_FILAMENT ID=n1
* SET_ACTIVE_SPOOL ID=n2


See [klipper-spoolman.cfg] for the klipper config for them.


## Preparing the slicer

For every filament, add a custom start gcode that calls:

`ASSERT_ACTIVE_FILAMENT ID=<id>`

* SET_ACTIVE_FILAMENT ID=n
* SET_ACTIVE_SPOOL ID=n
where `<id>` is its filament id in Spoolman.

This can be done automatically by using [sm2ss](https://github.com/bofh69/sm2ss).

See [klipper-spoolman.cfg] for klipper config for them.

## Preparing tags

The tags should contain an NDEF record with a text block like this:
```
SPOOL: 3
FILAMENT: 2
SPOOL:3
FILAMENT:2
```

The numbers are the id numbers that will be sent to the macros in
Expand All @@ -51,5 +64,5 @@ klipper via the [Moonraker](https://github.com/Arksine/moonraker) API.

This can be written via NXP's TagWriter on a phone, or better yet,
use the `write_tags.py` program. The later fetches Spoolman's filaments,
shows a simple GUI, press return on the chosen spool and it will be
written to the tag.
shows a simple text interface where the spool can be chosen, then press
return to write to the tag.

0 comments on commit 31c2ce1

Please sign in to comment.