OLADIPUPO JOHN SHOTADE, 20084356 #8
Serial communication continued
Problem encountered two weeks ago
Wasnt able to establish the connection using the tera term editor.
Steps involved to fix the problem above
- Searched google on how to change the usb port communication number on windows
- Closed the roborealm application
- Opened the control panel
- Clicked the on the usb port icon
- Changed the baud rate number to match that in robobrealm (115200).
- Reopened the roborealm app
- Ran the serial communication application
- Opened the serial communication window
- Serial communication window showing the word connected in the console section of the window (proof that the connection was established).
After the connection was established i sent values from roborealm to the microbit and from the microbit back to roborealm.
Steps involved in sending values to the microbit.
- Typed values in the console section of the serial communication window
- Clicked on send now
- Values showed in the space below and the microbit blinked as proofs that the value had been sent to the microbit.
Steps involved in sending values to roborealm from the microbit
- Opened makecode on a browser window
- Took the redirect to usb block from the serial extension and placed it in the on start block (meaning redirecting the serial input and output to use the usb connection on start).
- Took the key A pressed block from the input extension, duplicated it and changed the key pressed to B on the duplicate.
- Took the serial write number block (which sends a value serially in this case to the roborealm application), duplicated it and placed it in the key A and B pressed blocks.
- Changed the values in the serial write number blocks to 0 for A and 1 for B
- Took the show number block from the basic extension (which in this case shows the number that is being transmitted to roborealm on the LED), duplicated it and placed it in the key A and B pressed blocks under the serial write number blocks.
- Changed the values in the show number blocks to 0 for A and 1 for B.
- Downloaded the code onto the microbit.
- Tested the code by pressing A on the microbit (which showed 0 in the console section of the serial communication window in roborealm and 0 on the LED) and B (which showed 1 in the console section of the serial communication window in roborealm and 1 on the LED).
Next step
Showing the value that is being transmitted to the microbit from roborealm on the LED of the microbit
BYE FOR NOW!!! UNTIL NEXT WEEK
Comments
Post a Comment