diff --git a/README.md b/README.md index e426f2b13673f4fbf1d904a29b06717d96b6dd0d..c843e8b2eee14ad0d704f8677b61681efd9e199a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - [Description](#description) - [Task 1: a RPN calculator in Python.](#task-1--a-rpn-calculator-in-python) - [Task 2: Hardware interface.](#task-2-hardware-interface) - - [Task 3: Server UDP time.](#task-3-server-udp-time) + - [Task 3: Documentation.](#task-3-documentation) - [Demos](#demos) - [Getting Started](#getting-started) - [Dependencies](#dependencies) @@ -60,26 +60,18 @@ FEATURES OF CALCULATOR * **On-Off** Located on the side of the calculator lies a push button with a On-Off icon. Pressing this button toggles a toggle switch connected between the negative leg of the batery and the raspberry pi. * **LED** As the rapsberry pi is located within the case, I have added a LED status light that indicates that the device is powered and working. * **Battery** The battery is a small LIPO Cell connected to the usb-c charging port. It charges relatively slow but due to the low power consumption of the raspberry pi this is not an issue. - * **USB-C** - * **Case** + * **USB-C** The adafruit usb-c board is responsible for charging the battery. It charges the battery at 100ma. + * **Case** I designed the case to house all the components. I used fusion 360 and my 3d printer. Everything is securely mounted with cap hex bolts and nuts that are recessed into the case. ___ -### Task 3: Server UDP time. -* This takes builds upon **task 1** and **task 2** we need to send and receive packets from the sever with the correct checksum. This means encoding and decoding UDP. -* ***mainSendandReceive()*** This function is a controller for smaller functions. It simply connects to server and tells the program to send and get packets from the server. -* ***recv_and_decode_packet(websocket)*** We are taking a websocket connecting to it and printing the packet all it one. This take doesnt require us todo much else with the packet so it can just be called in a function.  +### Task 3: Documentation. +* This task involves building UML diagrams for the calculator. +* ***Wiring Diagram*** This diagram demonstrates how the calculator is wired up. +* ***UML Class Diagram*** We are taking a websocket connecting to it and printing the packet all it one. This take doesnt require us todo much else with the packet so it can just be called in a function.  * ***send_packet(websocket, sourcePort, deskPort, payLoad)*** To send packets to the server they need to be in UDP format in base64. This function will create a header for the payload including the correct checksum so the server can confirm the packet has arrived valid.  * ***unittest.py*** unittest is an inbuilt Python library. Its a test runner and is specially design for running tests and debugging. This one contains a few useful tools that we are going to use. It works similarly to the assert function. Task 3 doesn't have any output other than to the terminal. I could alter the output but this is out of my scope for the project. Here I am just checking if the program runs correctly. All the tests were successful. ___ ## Demos -* ***Task 1:*** - **https://www.youtube.com/embed/_whlYriiWjs** -  -* ***Task 2:*** - **https://www.youtube.com/embed/1Am2Eauk4dY** -  -* ***Task 3:*** - **https://www.youtube.com/embed/wndZ8pPSINo** -  +* Completed demo in class ___ ## Getting Started diff --git a/src/UML.PNG b/src/UML.PNG new file mode 100644 index 0000000000000000000000000000000000000000..8720000046ad3f6ce8f110f182cf190682128a27 Binary files /dev/null and b/src/UML.PNG differ diff --git a/src/Wiring-Diagram.PNG b/src/Wiring-Diagram.PNG new file mode 100644 index 0000000000000000000000000000000000000000..05c4dba372e811e079544e7cc3ff786bf3249e4f Binary files /dev/null and b/src/Wiring-Diagram.PNG differ