Skip to content
Snippets Groups Projects
Commit 68fc353b authored by esc2's avatar esc2
Browse files

Update README.md

parent a1277f31
No related branches found
No related tags found
No related merge requests found
......@@ -22,4 +22,35 @@ To run this program all you need to do is:
4. enter each index (0x__) separated by enter presses
5. check my result :)
Functions I wrote and their purpose:
- int main(void): main loop that gathers user inputs as packet data to be
distinguished. This function calls Distinguish(uint8_t *data)
and then checks wether this function was successful at reading
the data.
- int Distinguish(uint8_t *data): Takes a pointer to the data packet and then
looks into the data to find the message_type, length, and ID.
Then check the message type to be Display (x34), motor
message (x80) or neither. If the message type is known then
the message_data is created following the appropriate data
structure depending on message_type. Then call the correct
function inputting the message_data.
- void display_message(char* message, uint16_t message_length):
This function first prompts to the user that this specific
function was called. Then displays the message in ASCII by
looping through the char array/string.
- void update_motor(int32_t forwardback, int32_t leftright):
This function first prompts the user that this specific
function was called. Then it displays the forward_back and
left_right data as a signed integer.
if for some reason things dont work try /make clean and repeat the steps.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment