Skip to content

Instantly share code, notes, and snippets.

@gandy92
gandy92 / spool.py
Created May 14, 2020 05:04
Python3 code to demonstrate how the data on the NFC tag on an Ultimaker material spool is organised
# -*- coding: utf-8 -*-
#
# required packages: ndeflib, crc8
#
from crc8 import crc8
import ndef
import uuid
class UltimakerMaterialRecord(ndef.record.GlobalRecord):
@gandy92
gandy92 / write_spool_nfc.py
Created May 16, 2020 07:47
Python 3 script to demonstrate writing custom data to Ultimaker filament NFC tag
# -*- coding: utf-8 -*-
# https://github.com/BrianHVB/intro-to-smartcard-development#heading--python-example-1
#
# required packages: pyscard
#
from smartcard.Exceptions import NoCardException
from smartcard.System import *
from smartcard import util
from ums5 import MyFilamentSpool, decode
import uuid