Skip to content

Commit

Permalink
Updated introductory sections, removed checkpoints, updated 'getting …
Browse files Browse the repository at this point in the history
…started' section, added some content to 'sensors and actuators' section
  • Loading branch information
tguyenn committed Sep 15, 2024
1 parent a380402 commit 5da0898
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 163 deletions.
2 changes: 1 addition & 1 deletion docs/_sections/_guide-general/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nav_include: true
nav_order: 4
---

# Forms TODO: add actual links
# Forms and Links

This page contains direct links and forms that you might need for Robotathon!

Expand Down
4 changes: 3 additions & 1 deletion docs/_sections/_guide-general/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ nav_order: 2
---

# Competition Schedule

This calendar will have the most up to date version of the competition timeline!
<iframe src="https://calendar.google.com/calendar/embed?src=1e8b00794a07180514fdc54c5b78dca70637bc1a8a72076e64dc787ebe2a71cb%40group.calendar.google.com&ctz=America%2FChicago" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>

{: .highlight}
Expand All @@ -26,7 +28,7 @@ Tip: You can add this calendar to your personal Google calendar by clicking the
**Breadboarding Workshop** - Oct 14<br>
**Line/Wall/Color Checkpoint** - Oct 20<br>
**Color Sensor Workshop** - Oct 21<br>
**Line/Wall Follow Workshop** - Oct 28<br>
**Line/Wall/Color Follow Workshop** - Oct 28<br>
**Mechanical Design Checkpoint** - Nov 3<br>
**Line/Wall/Color Checkpoint** - Nov 10<br>
**Competition Day** - Nov 16<br>
Expand Down
10 changes: 5 additions & 5 deletions docs/_sections/_guide-general/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ nav_order: 1

## Hello!

This guide aims to provide you with helpful information and direction throughout your robot building process. While this guide is broad, it stays mostly within the realm of setup and basic tips since we want you to discover your own solutions.
This guide aims to provide you with helpful information and direction throughout your robot building process. While this guide is broad, it stays mostly within the realm of setup and basic tips since we encourage you to discover your own solutions.

Finally, if you have any technical questions or don’t understand a topic, ask the mentors or during office hours, which can be found [here (todo)](link)! We can help to resolve your problems, or point you to the right person who can. Mentors, office hours, and other teammates are valuable resources to turn to if you are stuck.
Finally, if you have any technical questions or don’t understand a topic, ask the mentors or during office hours, which can be found [here (soon™️)](link)! We can help to resolve your problems, or point you to the right person who can. Mentors, office hours, and other teammates are valuable resources to turn to if you are stuck.

## Overview

The first section, Getting Started, sets you up for success in regards to getting familiar with the ESP32 microcontroller, the software build process, and embedded systems development in general. We highly recommend that you at least take a look at Environment Setup, as this page will streamline your development process and prevent a lot of environment errors you may get in the future.
The first section, Getting Started, is about getting familiar with the ESP32 microcontroller, the software build process, and embedded systems development in general. We highly recommend that you at least take a look at Environment Setup, as this page will streamline your development process and prevent a lot of environment errors you may get in the future.

The second section, Sensors and Actuators, goes into detail about the wiring and programming for various peripherals you will be using in the competition, which include motors, distance sensors, line sensors, and color sensors.
The second section, Sensors and Actuators, goes into detail about the various peripherals you will be using in the competition, which include motors, distance sensors, line sensors, and color sensors.

The third section, Designing a Robot, covers the computer aided design (CAD) software - SOLIDWORKS - that Mechanical Engineers will use in their courses here. We’ll also discuss the physical construction of a robot, as well as the resources Texas Inventionworks (TIW) provides to students.
The third section, Designing a Robot, covers the physical construction of a robot, as well as the resources Texas Inventionworks (TIW) provides to students.

Finally, the Robotathon steering committee appreciates your feedback! If you have questions that you think should be clarified here, or topics that you think should be covered in the next revision of this guide, please fill out our [google form!](https://forms.gle/6UpwaETAtQpkvoMa8)
9 changes: 0 additions & 9 deletions docs/_sections/_guide-primaries/checkpoints/checkpoints.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions docs/_sections/_guide-primaries/checkpoints/wall-checkpoint.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ parent: Getting Started
nav_order: 5
---

Please reference the setup guide found in the [Robotathon Repo's readme!](https://github.com/ut-ras/RobotathonESP32)

## Programming goal
For this tutorial, we will control the onboard microcontroller by toggling it on and off periodically. This will serve as the goal for the Blink Checkpoint and demonstrates that you can flash your own program to the ESP32. If you are having trouble configuring your development environment, reference the setup guide on our [Github (scroll down)](https://github.com/ut-ras/RobotathonESP32) or ask a mentor for help!

The following program will blink the onboard LED (pin 2) on the ESP32 every second:

{: .highlight}
Note: While it is good coding practice to leave comments in your code to make it more understandable, they should be used sparingly to explain complex code — the below example has a ton of comments for the sake of explanation.
{: .callout-toby}

```cpp
int LED_BUILTIN = 2; // defines the word "LED_BUILTIN" as the number 2 for ease of use when defining and using the pin later

void setup() {
pinMode (LED_BUILTIN, OUTPUT); // configures pin 2 to be a GPIO output pin
}

void loop() {
digitalWrite(LED_BUILTIN, HIGH); // writes a digital high to pin 2
delay(1000); // waits for 1000 milliseconds (1 second)
digitalWrite(LED_BUILTIN, LOW); // writes a digital low to pin 2
delay(1000);
}

```



ermm uhh ummm
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@ parent: Getting Started
nav_order: 4
---

# Microcontroller Interfacing KINDA OUTDATED, images need formatting
Microcontrollers are cool and all, but they’re a lot more interesting when you can do stuff in the real world!
# Microcontroller Interfacing
Microcontrollers are cool and all, but they’re a lot more interesting when you can use them to do stuff in the real world! You can connect all sorts of devices to the ESP32 microcontroller to do whatever your heart desires. Below is a picture of that describes what kinds of connections can be made with each pin:

## Programming goal
For this tutorial, we want to turn on the LED by setting PA2 to output high (to power the LED) and the switch (button) is closed (pressed).
<img src="{{ '/_assets/images/wroom_pinout.jpg' | prepend: site.baseurl }}" alt="wroom_pinout.jpg">

We are only concerned with pins that are power, ground, GPIO, and ADC enabled, so don't worry about all the extra abilities.

## Interfacing example
For this example, we’ll use an LED and a switch. You will need six components - a red LED, switch, 470 ohm resistor, TM4C, breadboard, and some wires.
* Power - 3V3 and 5V pins labeled with red. These pins will always be outputting their respective voltage levels (3.3V and 5V) as long as the ESP32 is powered
* Ground - pins labeled as GND. These pins are 0V and serve as the return path in your circuits.
* GPIO (General Purpose Input/Output) - virtually every pin. These pins can be configured to read or output digital high and low signals.
* ADC (Analog to Digital Converter) - only some pins. These pins can read analog values instead of just high or low.

{: .highlight}
Our microcontroller pin outputs way too much current for our LED to handle, so we need to put a resistor in series with the microcontroller output pin and LED. The exact resistance depends on the current rating of the diode.
Note: Do NOT short (connect) a power pin directly to a ground pin. This will likely fry your ESP32 by causing a huge surge of current.
{: .callout-toby}

1. Connect a wire to a GPIO pin (let’s choose PA2 for this example). The other end goes to one of the switch legs.
1. Stick the long side of the LED on another switch leg. Use the continuity mode on the multimeter to make sure the leg is disconnected by putting each of the probes at each end of the switch (see below). Pressing the switch should short the legs.
1. Put the resistor in series with the short end of the LED (-), and connect the GND pin to the other end of the resistor.
If you want to know more about any features, feel free to ask a mentor or Google for more information :)

<img src="{{ '/_assets/images/led-pinout.png' | prepend: site.baseurl }}" alt="led interface" width=550 height=235>

<img src="{{ '/_assets/images/outdated-circuit-diagram.png' | prepend: site.baseurl }}" alt="outdated-circuit-diagram">

<img src="{{ '/_assets/images/button-diagram.png' | prepend: site.baseurl }}" alt="button-diagram.png">

<img src="{{ '/_assets/images/continuity-test.png' | prepend: site.baseurl }}" alt="continuity-test.png">

<img src="{{ '/_assets/images/wroom_pinout.jpg' | prepend: site.baseurl }}" alt="wroom_pinout.jpg">
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ nav_order: 5

# Actuators

Actuators in our case is just a fancy word for motors, and they will be the key to your robot's motion! You will deal with two types of motors in this competition: DC motors and servo motors.


The word "actuators" is just a fancy word for "devices that create motion," which can include anything ranging from hydraulic pistons to motors. In our case, electric motors will be the key to your robot's motion! You will deal with two types electrical actuators in this competition: DC motors and servo motors.

# DC Motors
<img src="{{ '/_assets/images/dc_motor.jpg' | prepend: site.baseurl }}" alt="dc_motor.jpg" width="200" height="300">
Expand Down Expand Up @@ -39,15 +37,15 @@ Control Pins: Connect the control pins (e.g., IN1, IN2, ENA) on the motor contro
| Red | OUT1 |
| Black | OUT2 |

| Motor Controller Terminal | ESP32 Pin |
| Motor Controller Terminal | ESP32 Pin |
|:-------------|:------------------|
| +5V | 5V |
| IN1 | GPIO |
| IN2 | GPIO |
| ENA | GPIO |

The following is an example of configuring and running the motor in software:
```c
```cpp
#define IN1 27 // Control pin 1
#define IN2 26 // Control pin 2
#define ENA 25 // PWM pin
Expand Down Expand Up @@ -100,7 +98,7 @@ If you're not sure which ESP32 pins are PWM capable, then check out the diagram

In this competition, we will be using the Arduino servo library to control the servos. The following is an example of how to configure the servo:

```c
```cpp
#include <Servo.h>

Servo myservo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,32 @@ parent: Sensors and Actuators
nav_order: 1
---

# Color Sensor UNEDITED
The TCS34725 ordered from Adafruit will allow you to navigate the Dance Challenge. By sensing the color of the tile you are on, your robot can waltz across the dance floor to victory, racking up those sweet combos!
# Color Sensor
The TCS34725 from Adafruit will allow you to complete the Color Challenge.

<img src="{{ '/_assets/images/color_sensor.jpg' | prepend: site.baseurl }}" alt="color_sensor.jpg">


## How it Works
The RGB sensor uses the RGB color space to represent the color that it sees. In our case, it provides the data in integer values of 0-255, represented in 8 binary bits. We will grab that data using a communication protocol called I2C, which is used in many electrical devices. The specific I2C implementation is found in RASware, but we’ve abstracted the hard logic for you already.
The RGB sensor uses the RGB color space to represent the color that it sees through photodiodes. It provides the data in integer values of 0-255, represented in 8 binary bits. We will grab that data using a communication protocol called I2C, which is used in many electrical devices. Implementing I2C is out of the scope of this competition, but you can find more information about it [here.](https://learn.sparkfun.com/tutorials/i2c/all)

# INSERT DIAGRAM OF WIRED EXAMPLE HERE
If you want more details on how the color sensor works, check out [this link!](https://www.utmel.com/components/everything-you-know-about-tcs34725-color-sensors-faq?id=1986)

| Color Sensor Pin | ESP32 Pin |
|:-------------|:------------------|
| VIN | 3.3V |
| GND | GND |
| SDA | GPIO21 |
| SCL | GPIO22 |

## Programming
For this tutorial, we’re only going to be reading the RGB sensor values from the TCS34725. Make sure that your pins are correctly connected or otherwise you won’t receive the data!
Build and flash the program, and watch the output change as you hold the sensor to different colored objects!

# Extensions
Extensions
Now that you’ve completed this tutorial, let’s move to more advanced stuff!
For the checkpoint I’m Sorry, You May Be Color Blind, you need to classify various colors. Try to output a specific message on CLI when you read Red or Blue or other colors.
# Tips
For the color checkpoint, you need to classify various colors. Try to output the sensor readings on the serial monitior for debugging.
Try to threshold a level of error for your sensor and think about the following questions.
* Do the values change under different lighting?
* Different distances?
* What about various shades of red? Is red one specific RGB value?
If you have a moving base, try to drive in a certain direction based on color. How about going right on a red tile?

<img src="{{ '/_assets/images/color_sensor_wiring.png' | prepend: site.baseurl }}" alt="color_sensor_wiring.png">
<img src="{{ '/_assets/images/color_sensor.jpg' | prepend: site.baseurl }}" alt="color_sensor.jpg">

todo make the color sensor picture a lot smaller lol
Loading

0 comments on commit 5da0898

Please sign in to comment.