cover

Asynchronous Serial Communication

I had a lot of fun working on this lab. It’s nice to see the Arduino input really come to life. I had a few questions.

On the “data in many formats” exercise, my Serial.write(mappedValue); just outputted a “.” and my Serial.println(mappedValue); and Serial.print(mappedValue); outputted identical values (which I would have expected), but this doesn’t match the expected output in the lab instructions. All other values looked correct. I just copied and pasted the code from the lab into my editor. Why would my results have been inconsistent?

In the Serial P5 lab, my ball was really jittery. Is there a way to make the ball less sensitive/more stable?

  • Thank you for posting your question, I look forward to seeing what you do now that the possibilities are endless! Regarding the lab about serial formats, there is no difference between Serial.print and Serial.println, as the last one will print in ASCII encoded and add a carriage return and line feed, so it will just allow to go to the next line over. And for the ball being jittery on screen, implementing the Call and Response highly helps with that as well as if the sensor is actually still jittery you can do things like averaging the values.

Submit a comment

Your email address will not be published. Required fields are marked *