Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi! Im confused about how to solve these problems that go hand in hand. For part 2 i got (1sec/9600 bits) * 24 bits =
Hi! Im confused about how to solve these problems that go hand in hand. For part 2 i got (1sec/9600 bits) * 24 bits = 0.0025 seconds but i feel as thought that is incorrect.
2. Assume our Arduino is configured to do UART communications at 9600 baud, with 1 start bit, 1 stop bit, and 0 parity bits. The data frame is 8 bits in size. How long would it take to send a single long integer (4-bytes), assuming an integer is sent "as-is" without being converted to some other data type in between? 3. Now, consider what would happen if the Arduino turned integers into a character array before transmitting them to the OpenLog. For example, the number 123 would be turned into the character array ['1' '2' "3'] before being sent. If we sent the integer number 1 to the OpenLog, how long would this take? Assume the same setup from the previous question. Do the same for the numbers 10, 100, and 1000, and 10000. (i.e., Assume the numbers are 4-byte integers on the one hand, and assume that they are N-length character arrays on the other hand.) 4. For what sized numbers is it be faster to send the data as a character array rather than as a long integer? Assume the time it takes to convert between characters and integers is negligible. What is the ratio in speeds between the time it takes to transmit the number 10000 as a character array versus as a long integer? 2. Assume our Arduino is configured to do UART communications at 9600 baud, with 1 start bit, 1 stop bit, and 0 parity bits. The data frame is 8 bits in size. How long would it take to send a single long integer (4-bytes), assuming an integer is sent "as-is" without being converted to some other data type in between? 3. Now, consider what would happen if the Arduino turned integers into a character array before transmitting them to the OpenLog. For example, the number 123 would be turned into the character array ['1' '2' "3'] before being sent. If we sent the integer number 1 to the OpenLog, how long would this take? Assume the same setup from the previous question. Do the same for the numbers 10, 100, and 1000, and 10000. (i.e., Assume the numbers are 4-byte integers on the one hand, and assume that they are N-length character arrays on the other hand.) 4. For what sized numbers is it be faster to send the data as a character array rather than as a long integer? Assume the time it takes to convert between characters and integers is negligible. What is the ratio in speeds between the time it takes to transmit the number 10000 as a character array versus as a long integerStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started