Skip to content

Commit a1ed76d

Browse files
committed
some bluepad and environment setup
1 parent 6ecf8c8 commit a1ed76d

File tree

3 files changed

+27
-31
lines changed

3 files changed

+27
-31
lines changed

docs/_sections/_guide-primaries/getting-started/bluepad.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ nav_order: 6
88

99
# Bluetooth Controller
1010

11-
You will be connecting a game controller to your ESP32 for controlling your robot (i.e. triggering autonomous modes, moving between challenges, and firing your launching mechanism)
11+
You will be connecting a wireless game controller to your ESP32 for controlling your robot (i.e. triggering autonomous modes, moving between challenges, and firing your launching mechanism)
1212

1313
That being said, you will not earn points for manually driving your robot through the challenges, as that defeats the purpose of having the sensors.
1414

15-
It is highly recommended that you program specific functions of the sensors (line, color, distance) to specific buttons on the remote controller so that you have more control over your robot's behavior (i.e. press A -> color autonomy mode, press B -> exit to normal drive mode).
15+
It is highly recommended that you map autonomous sensors modes (line, color, distance) to specific buttons on the remote controller so that you have more control over your robot's behavior (i.e. press A -> autonomous color mode, press B -> exit to normal drive mode).
1616

1717
## Connecting the Controller
1818

@@ -22,22 +22,28 @@ See [BluePad32's official docs](https://bluepad32.readthedocs.io/en/latest/FAQ/#
2222
First you will need to find out what your controller's Bluetooth address is.
2323
1. Plug in your ESP32 and flash it with the starter code
2424
1. Open the serial monitor
25-
1. You should see this in the serial monitor while trying to connect your controller (press and hold power button on controller until lights slowly and then rapidly move):
25+
1. You should see your controller address as a string of octets (something like `98:B6:E1:7C:C3:95`) in the serial monitor while trying to connect your controller (press and hold power button on controller until lights slowly and then rapidly move to put it in pairing mode):
2626
<img src="{{ '/_assets/images/controller_address.png' | prepend: site.baseurl }}" alt="controller_address :(">
27-
The string of octets (something like `98:B6:E1:7C:C3:95`) is your controller’s Bluetooth address
2827

2928
1. Try adding your controller's Bluetooth address through the serial terminal:
3029
<img src="{{ '/_assets/images/add_bluetooth.png' | prepend: site.baseurl }}" alt="add_bluetooth.png :(">
3130

32-
1. Controller should connect automatically, and the controller data should begin streaming in the serial monitor
31+
1. Controller should be able to connect now, and the controller data should begin streaming in the serial monitor after connecting
32+
33+
## Accessing controller data
34+
35+
In the sample code, there is a handle (i.e. pointer) for your controller called `myCtl` defined at the top of the `loop()` function. You can use the `ControllerPtr` class's helper functions to read data from the controller into your code logic.
36+
37+
This means you will have to pass the controller handle into functions if you want to use them in there. TODO: do we want to just make the myCtl handle a global var
38+
39+
{: .highlight}
40+
You **must** call `BP32.update()` to update the values being read into your ESP32, and **then** you call helper functions (i.e. `a()` or `x()`) to actually retrieve the controller values.
41+
{: .callout-red}
42+
43+
To see how to access the different peripherals on your controller, check out the sample code's `dumpGamepad()` function! Alternatively, you can hover over a function defined by BluePad32 and `Ctrl + Left Click` to see the actual source code for it. Yet another alternative is to go dig around on the official BluePad32 docs.
3344

34-
## Using the Controller
3545

36-
- BP32.update()
37-
- for loop in loop()
38-
- todo: actually figure out how the iterator works and make it something more standard to be understandable by anyone
3946

40-
- accessing controller data
4147

4248

4349

docs/_sections/_guide-primaries/getting-started/environment-setup/windows-setup.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ nav_order: 1
1010
# Windows Setup
1111

1212
{: .highlight}
13-
It is highly recommended to follow each component installation in order!
13+
It is highly recommended to follow everything in order!
1414
{: .callout-blue}
1515

1616
### __Install Git__
@@ -22,8 +22,7 @@ This is a source-control application that is very useful for sharing projects wi
2222
1. Open Git Bash and familiarize yourself with how to navigate the bash terminal [(How do I do that?)](https://ut-ras.github.io/RobotathonESP32/technical#what-is-a-bash-terminal)
2323

2424
### __Create GitHub account__
25-
GitHub is like a Google Drive for your Git repositories.
26-
Go to the [GitHub website](https://github.com/) and create an account if you do not have one already.
25+
GitHub is a cloud service for saving your Git repositories online. Go to the [GitHub website](https://github.com/) and create an account if you do not have one already.
2726

2827
### __Fork RobotathonESP32 Repository__
2928
Forking a repository creates a copy that you control on your GitHub account. Teams will use our RobotathonESP32 repo as the template.
@@ -41,10 +40,7 @@ Note: only **one** person in each team has to fork the repository and invite the
4140
1. Share repository access to your teammates by navigating to the settings of your newly forked repository and clicking collaborators in the left menu [(How do I invite teammates to my forked repository?)](https://ut-ras.github.io/RobotathonESP32/getting-started/git#how-do-i-invite-teammates-to-my-forked-repository)
4241

4342
### __Set Up Git SSH Authentication__
44-
45-
{: .highlight}
46-
This SSH section is **optional**, but it will make your life easier down the road by letting you push code to your remote repository without manually typing credentials
47-
{: .callout-blue}
43+
This allows for easy and secure interfacing with Git when you want to touch your repositories. The SSH keys are a nice way to authenticate your identity with GitHub.
4844

4945
See the [official GitHub tutorial](https://docs.github.com/en/enterprise-cloud@latest/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) if you want more information. Otherwise just follow these instructions:
5046

@@ -86,8 +82,7 @@ The key should look something like `ssh-ed25519 SFNJNAFNEJKFNJNJKNFJHFJAHOHiowur
8682
1. Click `Add SSH Key`
8783

8884
### __Clone Forked Repository__
89-
Cloning is the process of copying a Git repository onto your local computer storage
90-
85+
Cloning is the process of copying a Git repository onto your local computer storage. Everyone has to do this to work on code!
9186

9287
1. Go to your team's newly forked repository
9388
<img src="{{ '/_assets/images/github_repo.png' | prepend: site.baseurl }}" alt="my_image.png :(">
@@ -106,19 +101,14 @@ This allows your computer to recognize and program your ESP32 when you plug it i
106101
1. Agree and use default configuration
107102

108103
### __Install 7-zip__
109-
110-
{: .highlight}
111-
This step is **optional**, but it will save you at least 30 minutes when unzipping your VS Code installation.
112-
{: .callout-blue}
113-
114104
7-zip is a file compression tool that works much faster than your native Windows tools.
115105

116106
1. Go to the [7-zip download page](https://www.7-zip.org/)
117107
1. Install using defaults
118108
1. Launch 7-zip
119109

120110
### __Install Preconfigured VS Code__
121-
VS Code is an easily customizable IDE with many extensions and a large community. The preconfigured version you will download will already have ESP-IDF installed.
111+
VS Code is an easily customizable IDE with many extensions and a large community. The preconfigured version you will download will already have the ESP-IDF extension installed for convenience.
122112

123113
{: .highlight}
124114
Do this even if you already have VS Code to minimize environment setup issues. Installing the ESP-IDF extension normally may result in unecessary debugging.
@@ -129,11 +119,11 @@ Do this even if you already have VS Code to minimize environment setup issues. I
129119
{: .highlight}
130120
This **will** take a while unless you use 7-zip. [How do I use 7-zip?](https://ut-ras.github.io/RobotathonESP32/technical#how-do-i-use-7-zip)
131121
{: .callout-blue}
132-
1. Launch the "containerized" VS Code by running the Code.exe file in the unzipped folder
122+
1. Launch the "containerized" VS Code by running the `Code.exe` file in the unzipped folder
133123
1. In the top menu bar of VS Code, click `File` > `Open Folder`
134124
1. Use VS Code to open the folder where you cloned the Robotathon repository (“RobotathonESP32” by default)
135125
1. Wait for the ESP-IDF extension to initialize
136-
1. Build the project by clicking the wrench icon in the bottom ribbon of VS Code (this will take a while)
126+
1. Build the project by clicking the wrench icon in the bottom ribbon of VS Code (this will take a while the first time)
137127
<img src="{{ '/_assets/images/vscode_bottom_ribbon_build.png' | prepend: site.baseurl }}" alt="vscode_bottom_ribbon_build.png :(">
138128

139129
### __Flash your ESP32__
@@ -165,7 +155,7 @@ Building and flashing after the first time does not take nearly as long. In fact
165155

166156
Here is an example program that blinks the onboard LED. "Blinky" projects are a standard "hello world" type of program that demonstrate your development environment works properly.
167157

168-
If you replace your `arduino_main.cpp` file's contents with the following and flash properly, then your ESP32's blue onboard LED will begin to blink (yay 😄)!
158+
If you replace your `arduino_main.cpp` file's contents with the following and flash properly, then your ESP32's blue onboard LED will begin to blink every second (yay 😄)!
169159

170160
{: .highlight}
171161
Note that it is **your** responsibility to integrate this code with the controller starter code!

docs/_sections/_guide-primaries/getting-started/git.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ Forks are copies of a repo on GitHub (remote), while clones are repos stored on
6767

6868
## How do I invite my teammates to my forked repository on GitHub?
6969
1. Navigate to your repository on GitHub
70-
<img src="{{ '/_assets/images/main_github.png' | prepend: site.baseurl }}" alt="fork1.png :(">
70+
<img src="{{ '/_assets/images/main_github.png' | prepend: site.baseurl }}" alt="main_github.png :(">
7171
1. Click the `Settings` tab
72-
<img src="{{ '/_assets/images/settings_tab.png' | prepend: site.baseurl }}" alt="fork1.png :(">
72+
<img src="{{ '/_assets/images/settings_tab.png' | prepend: site.baseurl }}" alt="settings_tab.png :(">
7373
1. Click `Collaborators` in the left menu
74-
<img src="{{ '/_assets/images/collaborators.png' | prepend: site.baseurl }}" alt="fork1.png :(">
74+
<img src="{{ '/_assets/images/collaborators.png' | prepend: site.baseurl }}" alt="collaborators.png :(">
7575
1. Click `Add people` and find your teammates once they have made their own GitHub accounts
7676
1. Have your teammates accept the invite on their account
7777

0 commit comments

Comments
 (0)