Skip to content

Commit

Permalink
redid color sensor wiring diagram, added wiring table to line sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
tguyenn committed Oct 28, 2024
1 parent 083ab30 commit e3f4514
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Binary file modified docs/_assets/images/color_sensor_wiring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ nav_order: 1
---

# Color Sensor
The TCS34725 from Adafruit will allow you to complete the Color Challenge.
The APDS-9960 Color Sensor will allow you to complete the Color Challenge.

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

Expand All @@ -20,8 +20,6 @@ Here is a wiring diagram:

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

The color sensor layout does not exactly match the sensor you have, but all the pin names should be the same (see table below)

| Color Sensor Pin | ESP32 Pin |
|:-------------|:------------------|
| VIN | 3.3V |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ Note: You do NOT have to use all 8 of the LED/phototransistor pairs — You can

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

| Line Sensor Pin | ESP32 Pin |
|:-------------|:------------------|
| 5V | 5V |
| GND | GND |
| Signal | Any ADC Capable Pin (i.e. GPIO32) |
| Signal | Any ADC Capable Pin (i.e. GPIO33) |

## Programming
The following program will allow you to continuously read the sensor data from 2 of the photodiode sensors. You will have to calibrate the sensors by positioning the ones you want to use directly over the black electrical tape. If you need to use more than 2 sensors, then you can also move the line sensor back and forth over the black electrical tape to calibrate it.

Expand Down

0 comments on commit e3f4514

Please sign in to comment.