Example activity codes
In this repo, aside from the python codes, could you also upload the sample MicroBlock codes too?
Comments
-
Hello!
You can check our GitHub page for MicroBlocks codes. https://github.com/Robotistan/PicoBricks
0 -
Was trying out the Confirming door project and it dosn't work (or at least the micropython version don't work)
It says no module named 'mfrc522'.
How do you add that module in micropython
0 -
Hello @Bragir
For the Confirming Door project, you can try it first in Microblocks. You should complete the construction by following the construction steps of the project. Then you need to know the serial number of the card that came out of the package to run the project. You can find out the serial number of your card by running the code called Card Serial Number Code on GitHub. Here is the link; https://github.com/Robotistan/PicoBricks/tree/main/Examples/Activities/Confirming%20Door/confirming-door-microblocks/Card%20Serial%20Number%20Code
Then you will have realized the project by running the code named Confirming Door Code. Here is the link; https://github.com/Robotistan/PicoBricks/tree/main/Examples/Activities/Confirming%20Door/confirming-door-microblocks/Confirming%20Door%20Code
Thanks.
Naze
0 -
this is the part code to find the id of the card from the book page 172
from machine import Pin, SPI
from mfrc522 import MFRC522
sck = Pin(18, Pin.OUT)
mosi = Pin(19, Pin.OUT)
miso = Pin(16, Pin.OUT)
sda = Pin(17, Pin.OUT)
rst = Pin(20, Pin.OUT)
spi = SPI(0, baudrate=100000, polarity=0, phase=0, sck=sck, mosi=mosi, miso=miso)
rdr = MFRC522(spi, sda, rst)
it wants to import MFRC522 function from the mfrc622 module
but that module is missing,
this code would properly work on a standard Raspberry pi running a full version of python but apparently not on the micropython on the picobrick
0
Howdy, Stranger!
Categories
- 118 All Categories
- 3 Community
- 3 Hello Maker!
- 103 PicoBricks - Make, Run, Split, Merge
- 1 PicoBricks IDE
- 1 Arduino IDE
- 32 Hardware Support
- 15 PicoBricks Backers Hub
- 49 MicroBlocks Support
- 3 Shipping Support
- 2 MicroPython
- REX - 8 in 1
- Mechanical Parts and Parkour
- REX Main
- Arduino-IDE
- REX - Shipping
- 12 Products & Technology
- 2 Raspberry Pi
- Arduino
- 10 Other