A simple Morse Code program will be executed on the BBC Micro:bit physical device to execute on two BBC Micro:bit's using crocodile cables using the IO ports.
The program chosen for Challenge 02 is the "Morse Code". It is an intermediate level program and the intended language to be written for Challenge 02 will be in C++ as it was done for challenge 01. The program will be executed on the BBC Micro:bit physical device once the device is powered on and connected to the computer or a external battery pack. There are two Micro:bit devices involved in this challenge 02. Micro:bit #1 is the sender and Micro:bit #2 is the reciever. Once Micro:bit #1 and Micro:bit #2 is powered on and Button B of Micro:bit #1 is pressed, it will use the IO pins using crocodiles cables attached on Micro:bit #1 to transmit an undeciphered Morse Code to Micro:bit #2 through the cable which will be deciphered by pressing Button B of Micro:bit #2. A short press on Micro:bit #1 will transmit a dot "." and a long press will transmit a dash "-". If Micro:bit #1's transmission presses is invalid Micro:bit #2's display will show a scroll message as "MISMATCH".
The program is to only be executed on the BBC Micro:bit device. Attempts to execute the C++ source code's hex code intended for this device and Challenge 02 on any other IOT device has the chance of not to execute and probably run in to errors. Log in to Mbed if you wish to edit the .cpp files given in this repository and to maybe compile a new program for yourself online after the Micro:bit device is connected to the computer using a Mico USB to USB cable. Compile the code, download and copy the .hex file on to the device and it will run on start. Attach one pair of crocodile cables to each of the "0" pins in both Micro:bit's and attach the other pair to each of the "gnd" pins for it to work.