sender.cpp
void Send()
{
    //if statements checks button press, sends data and displays that data on display
    if (uBit.buttonA.isPressed())
    {
        uBit.radio.datagram.send("1");
        uBit.display.print(".");
    }

    else if (uBit.buttonB.isPressed())
    {
        uBit.radio.datagram.send("2");
        uBit.display.print("-");
    }

    uBit.sleep(500);
    uBit.display.clear();
}
/*
 * Function: Send
 * Parameters: N/A
 * Description: Sends 1 and Displays "." when button A is pressed Sends 2 and Displays "-" when Button B is pressed
 */
Send
Parameters: N/A
Description: Sends 1 and Displays "." when button A is pressed Sends 2 and Displays "-" when Button B is pressed
Send Parameters : N / A Description : Sends 1 and Displays " . " when button A is pressed Sends 2 and Displays " - " when Button B is pressed
void Send()
{
    if (uBit.buttonA.isPressed())
    {
        uBit.radio.datagram.send("1");
        uBit.display.print(".");
    }
    else if (uBit.buttonB.isPressed())
    {
        uBit.radio.datagram.send("2");
        uBit.display.print("-");
    }
    uBit.sleep(500);
    uBit.display.clear();
}
void Send ( ) { if ( uBit . buttonA . isPressed ( ) ) { uBit . radio . datagram . send ( " " ) ; uBit . display . print ( " " ) ; } else if ( uBit . buttonB . isPressed ( ) ) { uBit . radio . datagram . send ( " " ) ; uBit . display . print ( " " ) ; } uBit . sleep ( 500 ) ; uBit . display . clear ( ) ; }
Function: Send
 Parameters: N/A
 Description: Sends 1 and Displays "."
Function : Send Parameters : N / A Description : Sends 1 and Displays " . "
//if statements checks button press, sends data and displays that data on display