Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching on and off the radio can cause jamming problems. #462

Open
zfm076 opened this issue Apr 3, 2020 · 0 comments
Open

Switching on and off the radio can cause jamming problems. #462

zfm076 opened this issue Apr 3, 2020 · 0 comments

Comments

@zfm076
Copy link

zfm076 commented Apr 3, 2020

My code:

#include "MicroBit.h"
MicroBit uBit;
uint8_t enable_data[3]={0xFF ,0x01 ,0xAA};
uint8_t disable_data[3]={0xFF ,0x02 ,0xAA};
int main()
{
    uBit.init();
    while(1)
    {
        uBit.radio.enable();//turn on radio
        uBit.radio.setGroup(7);
        uBit.radio.datagram.send(enable_data, 3);
        uBit.sleep(500);

        uBit.radio.disable(); //turn off radio
        uBit.radio.datagram.send(disable_data, 3);
        uBit.sleep(500);
    }
    release_fiber();
}

Run the above code in microbit. My other microbit received enable_data and disable_data only once .It looks like sending data after it's closed will jam. In addition, I have uBit.radio.disable() but My other microbit can received disable_data once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant