The project 4 docs are still under construction, for now please review the slides and pseudocode for project details.
Video coming shortly...
It's time to make the call... The call from your communicator to another communicator.
We need you to build a serial communication device capable of sending and recieving messages via UART. For inputs, you'll have buttons, a potentiometer, and optionally any other components you've used in OPS (IR sensor?). Each time you send an input, your communicator will send a message corresponding to that input to a partner's communicator via UART. For outputs, you'll have LEDs, a servo, and optionally any other components you've used in OPS (buzzer?). Each time you receive a message from your parner, you'll adjust your outputs accordingly. You're required to at least implement one button, one LED, the potentiometer, and the servo.
When one communicator's potentiometer is turned, the servo on the other communicator should rotate. When one communicator's button is pressed, the corresponding LED on the other communicator should toggle it's state (if it was on, turn off; if it was off, turn on).
If you don't want to or aren't able to partner up with another student to test your communicator, that's totally fine. You can simulate another communicator using the serial monitor within the Arduino IDE. This is because the UART Tx and Rx pins on the Arduino are also connected to the USB-to-serial chip that connects the Arduino to your computer. Every time you use the Serial object to send or recieve data, you're sending it via those Tx/Rx pins and via the USB interface, which the serial monitor on your computer can hear and talk to.
Under construction. Apologies for the delay; for now please refer to the lecture slides and pseudocode and check back here later!
Under construction. Apologies for the delay; for now please refer to the lecture slides and pseudocode and check back here later!
Here's pseudocode which provides much of the project's functionality ready-made for you. We're providing more code this semester than in the past because we want this project to be easy so you can finish it and get back to preparing for final exams!
Treat this pseudocode as a fill-in-the-blank to get your communicator working, then add additional features onto it if you want. The code commends prompt you when you need to add code as well as some ideas for adding optional features!
As always, remember to work on just one thing at a time, then test your code and make sure that part works before moving on to the next part of your program. Printing messages and variables out to the serial console can help a lot with your testing, especially when it comes to signal filtering and making sure your filtering code / math is working the way you want it to.
You can use the Arduino IDE Serial Monitor to simulate being another communicator; simply type a message (like P512 or T0) into the text box and press enter to send it to your communicator. And, like we've seen before, your communicator's messages will be displayed in the serial monitor window for you to read.