Skip to content

Commit

Permalink
Addded link to dues. Verified sample code actually works (except for …
Browse files Browse the repository at this point in the history
…motors)
  • Loading branch information
tguyenn committed Sep 17, 2024
1 parent 17c99f6 commit b741b48
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 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 @@ -11,7 +11,7 @@ This page contains direct links and forms that you might need for Robotathon!

[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 }
[Robotathon Dues Form (https://utdirect.utexas.edu/txshop/item_details.WBX?application_name=ENENGALU&component=0&dept_prefix=EN&item_id=155&cat_seq_chosen=01&subcategory_seq_chosen=000)](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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ If you want more details on how the color sensor works, check out [this link!](h
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

#include "sdkconfig.h"
#ifndef CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#error "Must only be compiled when using Bluepad32 Arduino platform"
#endif // !CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#include <Arduino.h>


#include <Wire.h>
#include <Arduino_APDS9960.h>
#include <bits/stdc++.h>
Expand All @@ -60,6 +57,7 @@ void loop() {
int r, g, b, a;
// Wait until color is read from the sensor
while (!apds.colorAvailable()) { delay(5); }
apds.readColor(r, g, b, a);
// Read color from sensor apds.readColor(r, g, b, a);
// Print color in decimal
Serial.print("RED: ");
Expand All @@ -70,6 +68,7 @@ void loop() {
Serial.print(b);
Serial.print(" AMBIENT: ");
Serial.println(a);
delay(100);
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ The following program will allow you to read values from the IR sensor in a loop

#include <ESP32SharpIR.h>

ESP32SharpIR IRSensorName(ESP32SharpIR::GP2Y0A21YK0F, 27);

void setup() {
Serial.begin(115200);
ESP32SharpIR IRSensorName(ESP32SharpIR::GP2Y0A21YKOF, 27);
IRSensorName.setFilterRate(0.1f);
IRSensorName.setFilterRate(1.0f);
}

void loop() {
Serial.println(IRSensorName.getDistanceFloat());
delay(500);
delay(100);
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The following program will allow you to continuously read a general position val
different sensors.

```cpp

#include "sdkconfig.h"
#ifndef CONFIG_BLUEPAD32_PLATFORM_ARDUINO
#error "Must only be compiled when using Bluepad32 Arduino platform"
Expand All @@ -32,12 +33,13 @@ different sensors.
#include <QTRSensors.h>

QTRSensors qtr;
uint16_t sensors[3];

void setup() {
// set up Serial Communication and sensor pins
Serial.begin(115200);
qtr.setTypeAnalog(); // or setTypeAnalog()
qtr.setSensorPins((const uint8_t[]) {5, 17, 16}, 3); // pin numbers go in the curly brackets {}, and number of pins goes after
qtr.setSensorPins((const uint8_t[]) {36, 39, 34}, 3); // pin numbers go in the curly brackets {}, and number of pins goes after

// calibration sequence
for (uint8_t i = 0; i < 250; i++) {
Expand All @@ -48,9 +50,16 @@ void setup() {
}

void loop() {
uint16_t sensors [3];
// Get calibrated sensor values returned in the sensors array, along with the // line position, which will range from 0 to 2000, with 1000 corresponding to // a position under the middle sensor.
int16_t position = qtr.readLineBlack (sensors);
// Get calibrated sensor values returned in the sensors array, along with the
// line position, which will range from 0 to 2000, with 1000 corresponding to
// a position under the middle sensor.
qtr.readLineBlack(sensors);
Serial.print(sensors[0]);
Serial.print(" ");
Serial.print(sensors[1]);
Serial.print(" ");
Serial.println(sensors[2]);
delay(250);
}

```
Expand Down

0 comments on commit b741b48

Please sign in to comment.