reciever.cpp
void Data(MicroBitEvent e)
{
    //Takes data sent from Sender and stores it in a variable
    ManagedString dataFromSender = uBit.radio.datagram.recv();

    //If-statement issued to display correct corossponding values
    if (dataFromSender == "1")
    {
        uBit.display.print(".");
    }
    else if (dataFromSender == "2")
    {
        uBit.display.print("-");
    }

    //Delay duration given for the Micro:bit to go to sleep
    uBit.sleep(500);
    //Clears the screen after delay is done
    uBit.display.clear();
}
/*
 * Function: Data
 * Parameters: N/A
 * Description: Code to handle the received data from Sender and the display it on Reciever
 */
Data
Parameters: N/A
Description: Code to handle the received data from Sender and the display it on Reciever
Data Parameters : N / A Description : Code to handle the received data from Sender and the display it on Reciever
void Data(MicroBitEvent e)
{
    ManagedString dataFromSender = uBit.radio.datagram.recv();
    if (dataFromSender == "1")
    {
        uBit.display.print(".");
    }
    else if (dataFromSender == "2")
    {
        uBit.display.print("-");
    }
    uBit.sleep(500);
    uBit.display.clear();
}
void Data ( MicroBitEvent e ) { ManagedString dataFromSender = uBit . radio . datagram . recv ( ) ; if ( dataFromSender == " " ) { uBit . display . print ( " " ) ; } else if ( dataFromSender == " " ) { uBit . display . print ( " " ) ; } uBit . sleep ( 500 ) ; uBit . display . clear ( ) ; }
Function: Data
 Parameters: N/A
 Description: Code to handle the received data from Sender and the display it on Reciever
Function : Data Parameters : N / A Description : Code to handle the received data from Sender and the display it on Reciever
//Takes data sent from Sender and stores it in a variable //If-statement issued to display correct corossponding values //Delay duration given for the Micro:bit to go to sleep //Clears the screen after delay is done