'Microbit v2 radio HiFive Inventor esp32

While there is also a microbit forum this is quite specific to having both a microbit and hifive inventor device. I was curious if anyone has done it.

Question is: Of course I know the difference in the boards as I will state below. I just can't get radio to work between the two which should be possible as there are arduinos and such that can use radio with the microbit (I am doing this out of simplicity).

Microbit uses nordic semiconductor bluetooth chip and the Hifive uses esp32 for wifi and bluetooth. Similarities are both are part of bbc collaborative boards and both come with relatively same libraries (radio) in micropython.

I use the same group setting radio.config(group = 1) <- for both boards. Neither are getting messages.

Code would look like in general but not exact (don't worry about python syntax issues here as far as indentation or if I missed a semicolon anywhere, I am just writing it out here). Same exact code needed for both boards.

radio.config(group = 1) 

radio.on()
radio.send("hello") is for the send board only

while True:
  if radio.receive = "hello":
   print(radio.receive)


Solution 1:[1]

Maybe unrelated, but I noticed that BOTH my boards (they are microbit V2) need to actually SEND a message for them to work. This is different from the older V1 where you could have one board ONLY for listening.


"radio.send("hello") is for the send board only"


I just send a dummy message at start and it works. Don't ask me why!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BLJ