The Jacdac examples I’ve seen are all about connecting sensors and buttons to a Micro:bit. That’s great but I am interested in connecting Micro:bits to each other, initially two but perhaps more. Is this possible? If so can this be done with existing blocks or would it require a MakeCode extension to be created?
What do you mean by ‘connected’? Like multiplayer?
I mean being able to send bytes to each other, half-duplex. I am thinking of simulating how a smart card and smart card reader talk to each other, which is a serial half-duplex protocol.
Ah, sorry! I wouldn’t know then!
@sjmurdoch This isn’t using Jacdac, but it is possible to redirect the serial port (from USB to other pins) to have micro:bits communicate. Of course, this may not be ideal for a demonstration if the demo relies on serial (console) messages to show what’s happening.
On a related note, there are/were some interesting networking ideas in “Networking with the micro:bit” by Cigdem Sengul and Anthony Kirby. It looks like it’s still freely available via a GitHub repository: https://github.com/nominetresearch/microbit-networking-book. The wired serial redirect example is here: https://github.com/nominetresearch/microbit-networking-book/blob/master/wiredcommunication/wiredcommunication.md . (Also has a Python edition: https://github.com/nominetresearch/microbit-networking-book-python) .
Thanks @bsiever. The book you referenced is quite interesting although doesn’t seem exactly what I’m looking for (which might not exist). The wired examples seem to be unidirectional whereas I’m looking for a simulation of the half-duplex smart card protocol.
@sjmurdoch What’s the specific smart card or specific protocol?
Here are some examples of bidirectional UART communication:
- Pretty detailed/comprehensive video: https://www.youtube.com/watch?v=MYoMM1FY6yM (Actual micro:bit demo of 2-way communication at about 900 seconds : https://youtu.be/MYoMM1FY6yM?t=900)
- Here’s a tutorial on micro:bit to Arduino communication using the same trick: https://samndave.org.uk/ourdoc/2020/12/26/microbit-serial-communications/ (I haven’t tested this)