- Cryptnox Basic card (Initialized & seeded - See 'Card initialization' for steps)
- Meter (or mock) circuit for pulse input
- Raspberry pi 3 or 4
- Card reader
- Clone this repo.
- Install dependencies with
pip install -r requirements.txt
- Request developer (Or person with minter role) to upgrade your wallet address to minter role.
- Run script (wallet address and GPIO pin number as argument e.g
python pulse_monitor.py 0x1a2b3c4d5e6f 40
)
The script starts a 30 second loop in which it monitors input pulses from the designated GPIO pin. At the end of each loop, the user will be prompted to enter the card PIN to confirm and sign the transaction where the number of pulses recorded multplied by 0.001 will minted via the KWH smart contract.
Syntax:
python pulse_monitor.py <wallet_address> <GPIO pin number>
- Run Cryptnoxpro
init -e
orinit
- Enter data
seed recover
- Enter mnemonics