|
| 1 | +# Programs We Write |
| 2 | + |
| 3 | +### 1. Arduino/C++ code for the microcontroller |
| 4 | +- <u>Possible Responsibilities:</u> |
| 5 | + - Setting drivetrain DC motor voltages, and reading their encoders. |
| 6 | + - Probably also their PID controls. |
| 7 | + - Setting stepper motor positions/speeds (for perhaps lift/spinnywheel) |
| 8 | + - Setting voltage for the charge pads |
| 9 | + - Reading any other encoder data |
| 10 | +- <u>Programming Language:</u> |
| 11 | + - Written in C/C++ using the Arduino framework - but pretty easy C++ 😄 Programming 1 students can pick it up. |
| 12 | + |
| 13 | +### 2. "Server" code on the Raspberry Pi on the bot |
| 14 | +- <u>Possible Responsibilities:</u> |
| 15 | + - Autonomous planning: following a path, selecting red/blue team, selecting the `pad_voltage` and `wheel_RPM` for the match |
| 16 | + - Telling the Arduino what to do (ex.: Pi tells it to move backwards, so the Arduino sets the 4 motors to be at -10V) |
| 17 | + - Streaming all the cameras back to the driver station |
| 18 | + - Receiving controller input and other commands from the Client (see #3 below) |
| 19 | +- <u>Programming Language:</u> |
| 20 | + - Can be written in any language. Python is fair! Last sem we used Kotlin and Python. |
| 21 | + - Example Python framework to help: [RTCBot](https://rtcbot.readthedocs.io/en/latest/examples/remotecontrol/README.html) |
| 22 | + |
| 23 | +### 3. "Client" code on the Laptop - this is where the driver is. Tis a GUI! |
| 24 | +- Here's my [UI Mockup](https://docs.google.com/presentation/d/16uvMm6rYv_J0msN8qPZQq8pTDy1lySPG2yX7DNMqpps). |
| 25 | +- <u>Possible Responsibilities:</u> |
| 26 | + - This is also the "Driver station". |
| 27 | + - Driver would plug in their controller into this laptop, and view the camera streams and other sensor info via the GUI. |
| 28 | + - The Driver Station app would then take the controller inputs, and send those to the Pi's Server (from #2 above). |
| 29 | +- <u>Programming Language:</u> |
| 30 | + - Can also be written in any language. |
| 31 | + - Last sem we used Kotlin and Python on the client as well, with a GUI in Kotlin (the Python one didn't have a GUI, just commandline). |
0 commit comments