Made mfrc522.py part of our micropython environment.
This commit is contained in:
@@ -8,3 +8,5 @@ require("aioble")
|
|||||||
module("rp2_neopixel.py", "../../src")
|
module("rp2_neopixel.py", "../../src")
|
||||||
require("sdcard")
|
require("sdcard")
|
||||||
require("aiorepl")
|
require("aiorepl")
|
||||||
|
|
||||||
|
module("mfrc522.py", "../../lib/micropython-mfrc522/")
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
#!/usr/bin/bash
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
MFRC522_LIBDIR=$(readlink -f "$SCRIPT_DIR"/../../lib/micropython-mfrc522)
|
|
||||||
|
|
||||||
error_exit()
|
|
||||||
{
|
|
||||||
MESSAGE="$1"
|
|
||||||
|
|
||||||
echo "Error: $MESSAGE"
|
|
||||||
echo "Exit."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
check_command()
|
|
||||||
{
|
|
||||||
CMD="$1"
|
|
||||||
|
|
||||||
if ! command -v "$CMD" 2>&1 >/dev/null
|
|
||||||
then
|
|
||||||
error_exit "'$CMD' not found."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_command mpremote
|
|
||||||
|
|
||||||
mpremote fs cp "$MFRC522_LIBDIR/mfrc522.py" ":mfrc522.py"
|
|
||||||
|
|
||||||
mpremote reset
|
|
||||||
|
|
||||||
echo "Library deployed. Run main.py with 'mpremote run main.py'"
|
|
||||||
Reference in New Issue
Block a user