Skip to content

Commit

Permalink
��Deleted unnecessary files, made code blocks readable by changing no…
Browse files Browse the repository at this point in the history
…rmal text color, completed content for home section, added content for Actuators in 'Sensors and Actuators' section
  • Loading branch information
tguyenn committed Sep 13, 2024
1 parent cc10fb4 commit 94c6a20
Show file tree
Hide file tree
Showing 19 changed files with 180 additions and 1,932 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt

This file was deleted.

9 changes: 0 additions & 9 deletions Makefile

This file was deleted.

9 changes: 0 additions & 9 deletions dependencies.lock

This file was deleted.

Binary file added docs/_assets/images/servo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_assets/images/servo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_sass/color_schemes/catppuccin_latte.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $nav-child-link-color: $sapphire;
$sidebar-color: $base;
$base-button-color: $white;
$btn-primary-color: $overlay0;
$code-background-color: $text;
$code-background-color: #f8f8f2;
$table-background-color: $white;
$search-background-color: $white;
$search-result-preview-color: $crust;
51 changes: 51 additions & 0 deletions docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,55 @@
margin-bottom: .4rem;
}

// For styles that aren’t defined as SCSS variables, you may want to modify specific CSS classes
// Additionally, you may want to add completely custom CSS specific to your content
// To do this, put your styles in the file _sass/custom/custom.scss
// This will allow for all overrides to be kept in a single file, and for any upstream changes to still be applied

// General theme components

// Unique structures
.callout-toby {
background-color: #F8F8F0;
border-left: 5px solid #66D9EF;
border-radius: 5px; // rounded edge
padding: 0.5rem; // left side padding
margin-top: .4rem;
margin-bottom: .4rem;
}

// Custom code block styling
// pre code {
// // background-color: #2d2d2d !important; /* Dark background */
// color: #f8f8f2 !important; /* Light text color */
// // border: 1px solid #444 !important; /* Dark border */
// // padding: 10px !important;
// // border-radius: 4px !important;
// font-family: 'Courier New', Courier, monospace !important; /* Monospaced font */
// overflow: auto !important; /* Ensure long code blocks are scrollable */
// }

// /* Syntax highlighting */
// pre code {
// color: #f8f8f2 !important; /* Default text color */
// }

// pre code .keyword {
// color: #66d9ef !important; /* Light blue for keywords */
// }

// pre code .string {
// color: #e6db74 !important; /* Light yellow for strings */
// }

// pre code .comment {
// color: #75715e !important; /* Gray for comments */
// }

// pre code .function {
// color: #a6e22e !important; /* Light green for functions */
// }

// pre code .variable {
// color: #f92672 !important; /* Pink for variables */
// }
13 changes: 9 additions & 4 deletions docs/_sections/_guide-general/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ nav_order: 4

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

[Robotathon Linktree (todo)](a){: .btn .btn-purple }
[Robotathon Linktree](https://linktr.ee/robotathon2024?utm_source=linktree_profile_share&ltsid=e97f46bf-044a-4460-9ae9-b069387234ea){: .btn .btn-purple }
<br>
[Robotathon Dues Form (todo)](a){: .btn .btn-green }
[RAS Dues Form](https://utdirect.utexas.edu/nlogon/txshop/item_details.WBX?application_name=ENENGALU&component=0&dept_prefix=E2&item_id=199&cat_seq_chosen=02&subcategory_seq_chosen=000){: .btn .btn-green }
<br>
[RAS Safety Waiver](https://docs.google.com/forms/d/e/1FAIpQLSdRvNc2R3vnG0AXu4k7bypacyeB2jgF_D1nDPq76kE8WIIBmQ/viewform){: .btn .btn-green }
[Robotathon Sign Up Form](https://docs.google.com/forms/d/e/1FAIpQLScSTcmRPuThAxm5Y_3yomNF6AkQEQ5HVp_gJdVz3lGVPYHTgw/viewform){: .btn .btn-purple }
[Robotathon Sign Up Form](https://docs.google.com/forms/d/e/1FAIpQLScSTcmRPuThAxm5Y_3yomNF6AkQEQ5HVp_gJdVz3lGVPYHTgw/viewform){: .btn .btn-green }

Here are some more general links for RAS:

[RAS Membership Form](https://docs.google.com/forms/d/e/1FAIpQLSf5v1L3MB3naSaYESixKXnwWSFYm6uatYRvCiesrBWiLwvQuQ/viewform){: .btn .btn-blue }
[RAS Mailing List](https://docs.google.com/forms/d/e/1FAIpQLScdAMIHPdN18ZUY6EZq9AYJMJMIKXiRspwr9NHgzLCBaIh4nw/viewform){: .btn .btn-blue }
[RAS Linktree](https://linktr.ee/ut.ras){: .btn .btn-purple }
<br>
[RAS Membership Form](https://docs.google.com/forms/d/e/1FAIpQLSf5v1L3MB3naSaYESixKXnwWSFYm6uatYRvCiesrBWiLwvQuQ/viewform){: .btn .btn-blue }
<br>
[RAS Mailing List Form](https://docs.google.com/forms/d/e/1FAIpQLScdAMIHPdN18ZUY6EZq9AYJMJMIKXiRspwr9NHgzLCBaIh4nw/viewform){: .btn .btn-blue }
1 change: 0 additions & 1 deletion docs/_sections/_guide-general/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ nav_include: true
nav_order: 2
---

# todo: office hours where??
# Competition Schedule
<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>

Expand Down
13 changes: 5 additions & 8 deletions docs/_sections/_guide-general/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ nav_order: 1

# Robotathon Docs

Hello! This guide is separated into multiple sections each with graphics, tips, and sample code or examples.
## Hello!

We suggest that you read the pages as you progress with your robot - please reference back to this guide when you need direction. Also understand that this guide, while broad, is not comprehensive. We want you to discover solutions by yourselves, so we will only provide the bare minimum to create a working robot.
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.

Finally, if you have any technical questions or don’t understand a topic, ask the mentors or during office hours! We can help to resolve your problems, or point you to the right person who can. The mentors, office hours, tech talks, our youtube video series, and other teammates are valuable resources to turn to.
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.

## 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 second section, Sensors and Actuators, involves building the circuits and programming the software that controls your robot. To soften the learning curve, we abstract a lot of logic needed to program the ESP32, and provide high level interfaces for you to use described in our [wiki](https://github.com/ut-ras/Rasware/wiki). We encourage you to utilize our APIs beyond what is used in each instructional page.
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 third section, Designing a Robot, is pretty self explanatory. We’ll cover 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 the engineering Makerspace provides to students.


The fourth section, Debugging, provides optional, but highly recommended guides to problem solving. Trust us, >95% of your code problems can be solved with the right Google search, saving you time and stress.
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.

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)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ nav_order: 4

# Chassis Construction

Now that you have some idea of your drive system layout, let’s look at how to build a base for your bot. While you can use a Poptart box to house everything (yes, it’s been done), we highly encourage you to use one of following methods.
Now that you have some idea of your drive system layout, let’s look at how to build a base for your bot. While you can use a Poptart box to house everything (yes, it’s been done), we highly encourage you to use one of following methods using the tools found at TIW.

{: .highlight}
Note that you will have to be trained by TIW staff to use their equipment. Their Canvas page for training can be [accessed here!](https://inventionworks.engr.utexas.edu/training)
{: .callout-toby}

## Subtractive Manufacturing (SM)
SM, like laser cutting or mills/lathes, removes material from a product to achieve an end result. The laser cutters in the Makerspace can cut things like wood or acrylic sheets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ As you can see, the wheel positions will immensely affect the design of your mec

After you’ve decided upon your wheels placement, how you drive your wheels (software) can also result in different movements. See the below two diagrams and observe their center of movement (the white circle). You can drive both sides at once, or a single side. You can drive them in opposite directions, and you can drive them at different rates. There are so many options!


<img src="{{ '/_assets/images/chassis_rotation.png' | prepend: site.baseurl }}" alt="chassis rotation">



Remember, you aren’t limited to any configuration. In fact, we recommend you try them all out!
124 changes: 109 additions & 15 deletions docs/_sections/_guide-primaries/sensors-and-actuators/actuators.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,116 @@
---
layout: default
title: Actuators
nav_include: true
parent: Sensors and Actuators
nav_order: 5
---

<!-- cover servos -->
# Actuators

1.) define servos (what are they, how do they work)
2.) how to use servos
3.) code
<img src="{{ '/_assets/images/servo.png' | prepend: site.baseurl }}" alt="servo.png">
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.


<!-- cover DC motors and motor controllers -->

1.) define DC motors
2.) how to use motor contorllers
3.) code
# DC Motors
<img src="{{ '/_assets/images/dc_motor.jpg' | prepend: site.baseurl }}" alt="dc_motor.jpg" width="200" height="300">

<img src="{{ '/_assets/images/dc_motor.jpg' | prepend: site.baseurl }}" alt="dc_motor.jpg">
<img src="{{ '/_assets/images/l298n_pinout.png' | prepend: site.baseurl }}" alt="l298n_pinout.png">
<img src="{{ '/_assets/images/l298n_motor_driver.jpg' | prepend: site.baseurl }}" alt="l298n_motor_driver.jpg">
You will be using DC (direct current) motors as the primary means of moving your robot around. However, directly connecting a DC motor to the ESP32 may not be desirable due to lack of direction control and higher voltage/current requirements of the motor. This is where motor controllers come into play.

difference between the two
1.) why use one over the other?
2.) why does one need a motor contorller while the other doesnt?
## Motor Controllers
<img src="{{ '/_assets/images/l298n_motor_driver.jpg' | prepend: site.baseurl }}" alt="l298n_motor_driver.jpg" width="200" height="300">

A motor controller, such as the L298N, acts as an intermediary between the microcontroller and the DC motor. It allows the microcontroller to control the motor's speed and direction without directly handling the high current. The motor controller typically has the following key components:
* H-Bridge Circuit: This allows the motor to be driven in both forward and reverse directions.
* PWM (Pulse Width Modulation) Control: This enables speed control by varying the duty cycle of the PWM signal.
* Power Supply Terminals: These provide the necessary power to the motor.

# How to Use Motor and Controller?
To control a DC motor using an ESP32 and a motor controller, you need to directly connect the power source and ESP32 to the motor controller as shown below:
<br>
<img src="{{ '/_assets/images/l298n_driver_pinout.png' | prepend: site.baseurl }}" alt="l298n_driver_pinout.png" width="300" height="400">

Power: Connect the motor controller's 12V terminal to a power source less than 12V
<br>
Control Pins: Connect the control pins (e.g., IN1, IN2, ENA) on the motor controller to the GPIO pins on the ESP32.

| Motor Wire | Motor Controller Terminal |
|:-------------|:------------------|
| Red | OUT1 |
| Black | OUT2 |

| 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
#define IN1 27 // Control pin 1
#define IN2 26 // Control pin 2
#define ENA 25 // PWM pin

void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENA, OUTPUT);
}

void loop() {
// Move motor forward
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
analogWrite(ENA, 128); // Set speed (0-255)

delay(2000); // Run for 2 seconds

// Stop motor
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
analogWrite(ENA, 0);

delay(2000);
}
```
More detailed information about the L298N motor controllers can be [found here!](https://lastminuteengineers.com/l298n-dc-stepper-driver-arduino-tutorial/)

# Servo Motors

<img src="{{ '/_assets/images/servo.jpg' | prepend: site.baseurl }}" alt="servo.jpg" width="300" height="400">

## What Are Servos?

Servos are motors that are designed for precise position control. Instead of rotating arbitrarily when powered, servos listen to a control signal (usually [PWM](https://learn.sparkfun.com/tutorials/pulse-width-modulation/all)) to determine where to rotate. Some servos offer limited rotation, while others can rotate continuously (like ours).More advanced servos have other ways to be even more precise such as a feedback system on top of the control signal, but that is not necessary for this competition.

## How to Use Servos?

For the servos in our competition, you can use it to precisely control your mechanism for the Mechanical Challenge. To interface it with your ESP32, you will connect the wires as follows:

| Servo Wire | ESP32 Pin |
|:-------------|:------------------|
| Red | 5V |
| Black | GND |
| White | Any PWM capable pin |

{: .highlight}
If you're not sure which ESP32 pins are PWM capable, then check out the diagram in [this page!](https://ut-ras.github.io/RobotathonESP32/getting-started/microcontroller-interface)
{: .callout-toby}

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
#include <Servo.h>

Servo myservo;

void setup() {
myservo.attach(9);
myservo.writeMicroseconds(1500); // set servo to mid-point
}

void loop() {}
```

Simply input a different value in the ```writeMicroseconds()``` function to change how the servo behaves!
13 changes: 0 additions & 13 deletions main/CMakeLists.txt

This file was deleted.

14 changes: 0 additions & 14 deletions main/Kconfig.projbuild

This file was deleted.

Loading

0 comments on commit 94c6a20

Please sign in to comment.