You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_sections/_guide-primaries/getting-started/bluepad.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ nav_order: 6
8
8
9
9
# Bluetooth Controller
10
10
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)
12
12
13
13
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.
14
14
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).
16
16
17
17
## Connecting the Controller
18
18
@@ -22,22 +22,28 @@ See [BluePad32's official docs](https://bluepad32.readthedocs.io/en/latest/FAQ/#
22
22
First you will need to find out what your controller's Bluetooth address is.
23
23
1. Plug in your ESP32 and flash it with the starter code
24
24
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):
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.
33
44
34
-
## Using the Controller
35
45
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
Copy file name to clipboardExpand all lines: docs/_sections/_guide-primaries/getting-started/environment-setup/windows-setup.md
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ nav_order: 1
10
10
# Windows Setup
11
11
12
12
{: .highlight}
13
-
It is highly recommended to follow each component installation in order!
13
+
It is highly recommended to follow everything in order!
14
14
{: .callout-blue}
15
15
16
16
### __Install Git__
@@ -22,8 +22,7 @@ This is a source-control application that is very useful for sharing projects wi
22
22
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)
23
23
24
24
### __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.
27
26
28
27
### __Fork RobotathonESP32 Repository__
29
28
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
41
40
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)
42
41
43
42
### __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.
48
44
49
45
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:
50
46
@@ -86,8 +82,7 @@ The key should look something like `ssh-ed25519 SFNJNAFNEJKFNJNJKNFJHFJAHOHiowur
86
82
1. Click `Add SSH Key`
87
83
88
84
### __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!
@@ -106,19 +101,14 @@ This allows your computer to recognize and program your ESP32 when you plug it i
106
101
1. Agree and use default configuration
107
102
108
103
### __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
-
114
104
7-zip is a file compression tool that works much faster than your native Windows tools.
115
105
116
106
1. Go to the [7-zip download page](https://www.7-zip.org/)
117
107
1. Install using defaults
118
108
1. Launch 7-zip
119
109
120
110
### __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.
122
112
123
113
{: .highlight}
124
114
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
129
119
{: .highlight}
130
120
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)
131
121
{: .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
133
123
1. In the top menu bar of VS Code, click `File` > `Open Folder`
134
124
1. Use VS Code to open the folder where you cloned the Robotathon repository (“RobotathonESP32” by default)
135
125
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)
@@ -165,7 +155,7 @@ Building and flashing after the first time does not take nearly as long. In fact
165
155
166
156
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.
167
157
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 😄)!
169
159
170
160
{: .highlight}
171
161
Note that it is **your** responsibility to integrate this code with the controller starter code!
0 commit comments