Skip to content

Commit

Permalink
Removed date list from schedule because source of inconsistency + low…
Browse files Browse the repository at this point in the history
… practicality, finished 'Getting Started' section, added more content for 'Sensors and Actuators' section
  • Loading branch information
tguyenn committed Sep 16, 2024
1 parent 5da0898 commit a8510ae
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 35 deletions.
Binary file added docs/_assets/images/IR-sensor-graph.png
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/ir-sensor-graph.png
Binary file not shown.
23 changes: 1 addition & 22 deletions docs/_sections/_guide-general/schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,4 @@ This calendar will have the most up to date version of the competition timeline!

{: .highlight}
Tip: You can add this calendar to your personal Google calendar by clicking the plus button above^^
{: .callout-toby}

## Dates List:

**Kickoff** - Sept 17th<br>
**Team Assembly Checkpoint** - Sept 17th (at kickoff)<br>
**Design Checkpoint** - Sept 22nd<br>
**Programming Workshop I** - Sept 23<br>
**LED Blink Checkpoint** - Sept 29<br>
**Programming Workshop II** - Sept 30<br>
**Moving Base Checkpoint** - Oct 6<br>
**Solidworks Workshop** - Oct 7<br>
**Line/Wall/Color Checkpoint** - Oct 13<br>
**Breadboarding Workshop** - Oct 14<br>
**Line/Wall/Color Checkpoint** - Oct 20<br>
**Color Sensor Workshop** - Oct 21<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>

Note: Line/Wall/Color means your team has a choice between the three different sensors to demo for the checkpoint
{: .callout-toby}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Microcontrollers are cool and all, but they’re a lot more interesting when you

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

* 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.
* 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 serve as the current's 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ nav_order: 1
# 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">

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

## How it Works
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)
Expand All @@ -27,11 +26,16 @@ If you want more details on how the color sensor works, check out [this link!](h
## 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!

```cpp
todo
```

# 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.

Try to threshold a level of error for your sensor and think about the following questions:
* Do the values change under different lighting?
* Inconsistent lighting skewing your results can be remedied with an external white LED
* 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?

Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ parent: Sensors and Actuators
nav_order: 1
---

# IR Sensor (UNEDITED)
# IR Sensor

<img src="{{ '/_assets/images/ir_sensor.png' | prepend: site.baseurl }}" alt="ir_sensor.png">
<img src="{{ '/_assets/images/ir_sensor.png' | prepend: site.baseurl }}" alt="ir_sensor.png" width=200 height=300>

A necessary component for any challenge that utilizes walls, analog IR sensors are a staple of Robotathon. This particular sensor is the GP2Y0A21, and detects distances from 10 to 80 cm.

## How it Works
IR distance sensors emit long wavelength (700 nm - 1 mm) light towards a surface. The light bounces off objects it hits, and then enters a proximity sensor. The output is then transformed into a voltage that can be read by the ESP32.
IR distance sensors emit bursts of infrared light towards a surface. The light bounces off objects it hits, and then enters a proximity sensor. The output is then transformed into a voltage (see graph below) that can be read by the ESP32. See [this link for more information.](https://www.pololu.com/product/136)

<img src="{{ '/_assets/images/ir-sensor-functionality.png' | prepend: site.baseurl }}" alt="ir-sensor-functionality.png">
<img src="{{ '/_assets/images/ir-sensor-graph.png' | prepend: site.baseurl }}" alt="ir-sensor-graph.png">
<img src="{{ '/_assets/images/ir-sensor-graph.png' | prepend: site.baseurl }}" alt="IR-sensor-graph.png">

## Interfacing
There are 3 pins (red, black, white) to the device as seen in the picture, associated to Power, Ground, and Output Signal, respectively. For testing the distance sensor, let’s use the analog pin, pin 27, as the signal pin. Hook up the circuit as follows:
Expand All @@ -36,7 +36,12 @@ If you're not sure which ESP32 pins are ADC (Analog to Digital Converter) capabl
{: .callout-toby}

## Programming
The following program will allow you to read values from the IR sensor in a loop. After you build and flash the program, you should see the values in the UART change as you move it towards and away from an object.
The following program will allow you to read values from the IR sensor in a loop. After you build and flash the program, you should see the values in your terminal output change as you move it towards and away from an object.

```cpp
todo
```


## Extensions
You received values from the sensor, but do they mean anything? The next step for the IR sensor is translating and thresholding it. Take a look at the above graph. There is a strong linear relationship between your signal value and the inverse of the distance away from the object. It’s your job now to code a function that returns an accurate distance given a voltage input value. After that, your team needs to threshold the data. When do the values become inconsistent (too close or too far)? What do you do with your robot when that happens?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Note: you do NOT have to use all of the LED/phototransistor pairs — You can le
The following program will allow you to continuously read a general position value of the sensor across a line. After you build and flash the program, you should see the values in the UART change as you shift the line across the
different sensors.

```cpp
todo
```

TIP: always run the calibrate function (i.e. hold a line of the color you’re sensing under all the sensors during set up) to ensure consistent and accurate results.

## Extensions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
<!-- ---
layout: default
title: PID Control
nav_include: true
parent: Sensors and Actuators
nav_order: 1
---
TBD
TBD -->

0 comments on commit a8510ae

Please sign in to comment.