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: kit/brain_board/advanced.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,11 @@ layout: page
3
3
title: Brain Board - Advanced
4
4
---
5
5
6
+
6
7
# Brain Board - Advanced
7
8
8
-
When connected to your [Brain Board WiFi]({{ site.baseurl }}/kit/brain_board/wifi), it is possible to access the Brain Board via a terminal interface. The Brain Board is running Student Robotics OS, a purpose-built Linux distribution that does not have all of the conveniences of a usual Linux system.
9
+
When connected to your [Brain Board WiFi]({{ site.baseurl }}/kit/brain_board/wifi), it is possible to access the Brain Board via a terminal interface.
10
+
The Brain Board is running Student Robotics OS, a purpose-built Linux distribution.
9
11
10
12
<divclass="warning">
11
13
Proceed at your own risk. We only provide limited support for these advanced features.
@@ -17,18 +19,20 @@ Please bear in mind the following:
17
19
- We may need you to upgrade the OS which will overwrite any changes.
18
20
- Any modifications you make must be in line with [the rules]({{ site.baseurl }}/rules).
19
21
- We reserve the right to inspect your Brain Board at any time.
20
-
- Feel free to tinker. If you are stuck, ask in [Discord]({{ site.baseurl }}/team_admin/discord), although we may be unable to help.
22
+
- Feel free to tinker. If you are stuck, ask in [Discord]({{ site.baseurl }}/team_admin/discord), we may be able to help.
23
+
21
24
22
25
## SSH Access
23
26
24
27
You can access the robot over SSH:
25
28
26
29
```shell
27
-
ssh robot@robot
30
+
ssh robot@robot.lan
28
31
```
29
32
30
33
Your SSH client will prompt you for a password, which is `robot`.
31
34
35
+
32
36
## Terminal Interface
33
37
34
38
A terminal interface with similar functionality to the web interface is available as `rtui`.
@@ -56,4 +60,4 @@ Some commands let you set data as well as get it:
<imgsrc="{{ site.baseurl }}/images/content/kit/brain.png"alt="A photo of a brain board"title="A brain board"class="right"style="max-width: 50%"/>
17
-
The Brain Board provided with your kit is what runs the code you write and controls the other peripheral boards. It consists of a [Raspberry Pi 4B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) and a Student Robotics KCH HAT.
18
17
19
-
The LEDs on the HAT display the current status of the robot and can be used to help debug your robot. There are also 3 RGB (Red, Green, and Blue) LEDs that you can control from your code.
18
+
The Brain Board provided with your kit is what runs the code you write and controls the other boards.
19
+
It consists of a [Raspberry Pi 4B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/) and a Student Robotics KCH.
20
+
21
+
The KCH is the board installed on top of the Pi, it powers the brain and has LEDs to show the current status of the robot.
22
+
There are also 3 RGB (Red, Green, and Blue) LEDs that you can control from your code.
23
+
20
24
21
25
## Board Diagram
22
26
23
27

24
28
29
+
[test](/docs/kit/brain_board#brain-board)
30
+
25
31
### Indicators
26
32
27
33
| LED | Meaning
28
34
|------------------|-------------------------
29
35
| 5V Power | The Brain Board is powered
30
-
| 12V Power | The KCH is powered
36
+
| 12V Power | 12V power is being provided to the KCH
31
37
| Reverse Polarity | The 12V power is reversed
32
38
| Boot Progress | Progress Bar for Brain Boot Progress
33
39
| Code | A USB containing code is plugged in
@@ -37,6 +43,7 @@ The LEDs on the HAT display the current status of the robot and can be used to h
37
43
| Start | The Robot is waiting to start
38
44
| OK | Shows the code status, see below table
39
45
46
+
40
47
### OK LED
41
48
42
49
The OK LED shows the status of your code using different colours.
@@ -50,43 +57,27 @@ The OK LED shows the status of your code using different colours.
50
57
| Green | Your code has finished without errors
51
58
| Red | Your code has crashed
52
59
60
+
53
61
## Powering the Brain Board
54
62
55
63
Your Brain Board will not power on unless it's connected to the "L2" port on the Power Board.
56
-
This is because the rest of the power outputs are disabled until the usercode runs.
57
-
58
-
## Flashing the SD card
59
-
60
-
The SD card is located on the underside of the board underneath the green power connector. Grab the SD card with your fingers and simply pull it out of the slot.
61
-
62
-
To fully update your Brain Board's software, or refresh it if you think it's not working correctly, you can flash our SD card image onto the microSD card in your Brain Board.
64
+
This is because the rest of the power outputs are disabled until your code runs.
63
65
64
-
To update the SD card, you'll need to download our image from the [updates page]({{ site.baseurl }}/kit/brain_board/robot_os). The latest version is `{{ latest_version }}`.
65
-
The flashing procedure is identical to flashing Raspberry Pi images.
66
66
67
-
### Etcher
67
+
##Student Robotics OS
68
68
69
-
We recommend using [Etcher](https://etcher.io), as it's simple to use, and available on Windows, macOS and Linux. If you're familiar with Raspberry Pis or other similar boards and have flashed images before with a different tool, that should also work.
69
+
The Raspberry Pi runs a custom operating system that contains the Student Robotics software.
70
+
The OS contains a set of pre-installed python libraries that you can use, the list of which can be found [here](./python_libraries).
Sometimes the OS on your Brain Board may need to be updated, the steps to do this can be found on the [tutorial page]({{ site.baseurl }}/tutorials/update_brain).
73
+
The latest version of the OS is currently `{{ latest_version }}`.
74
+
See the [Student Robotics OS](./robot_os) page for full details of the different versions.
72
75
73
-
<divclass="info"markdown="1">
74
-
If you choose to use a tool other than Etcher, you may need to extract the `srobo-robot-{{ latest_version }}.img.xz` to `srobo-robot-{{ latest_version }}.img`. There are many tools available for this, e.g. [7-zip](https://www.7-zip.org/).
75
-
</div>
76
-
77
-
### Flashing
78
-
79
-
1. Open Etcher and select the `srobo-robot-{{ latest_version }}.img.xz` file you downloaded
80
-
2. Select your SD card from the devices window
81
-
3. Click 'Flash!'
82
-
4. When the flash is complete you should safely eject the SD card.<br>
83
-
Your computer may complain that the SD card is no longer readable, however
84
-
this is expected as the data being written to the SD card is not in a format
85
-
that either Windows or macOS can natively understand.
86
76
87
77
## Robot Settings
88
78
89
-
Some of the features on your robot are configured using a settings file, called `robot-settings.toml`. This file is automatically created on your USB drive the first time that you run any code on your robot.
79
+
Some of the features on your robot are configured using a settings file, called `robot-settings.toml`.
80
+
This file is automatically created on your USB drive the first time that you run any code on your robot.
90
81
91
82
You can edit the settings file using your IDE or any text editor.
92
83
@@ -100,22 +91,9 @@ The robot settings file contains the following settings:
100
91
|`wifi_enabled`| Enables the WiFi |`true`|
101
92
|`usercode_entrypoint`| The entry point to your Python code |`robot.py`|
102
93
103
-
If your `robot-settings.toml` is not valid, it will be automatically regenerated with valid settings. This will reset any settings you have changed back to their default values. We therefore recommend that you do not change your settings file before a competition match.
104
-
105
-
In software version `2023.1.0` and later, an error file will be generated if your settings are invalid: `robot-settings-error.txt`. This file contains a message explaining the problem and a copy of your old settings.
106
-
107
-
108
-
## Firewall
109
-
110
-
<divclass="info">
111
-
This documentation refers to a feature which is only available from software version `2023.1.0` and later.
112
-
</div>
113
-
114
-
The Brain Board has a [network firewall](https://en.wikipedia.org/wiki/Firewall_(computing)) that prevents access to applications and services on the Brain Board unless it is required.
115
-
116
-
If you are running code that uses networking, you will need to use a port from the range that is allocated for competitor use:
94
+
If your `robot-settings.toml` is not valid, it will be automatically regenerated with valid settings.
95
+
This will reset any settings you have changed back to their default values.
96
+
We therefore recommend that you do not change your settings file before a competition match.
117
97
118
-
| Protocol | Start of Range | End of Range |
119
-
|----------|----------------|--------------|
120
-
| TCP | 7000 | 8999 |
121
-
| UDP | 7000 | 8999 |
98
+
An error file will be generated if your settings are invalid: `robot-settings-error.txt`.
99
+
This file contains a message explaining the problem and a copy of your old settings.
The Raspberry Pi runs a custom operating system that contains the Student Robotics software.
10
+
It's based on [Raspberry Pi OS](https://www.raspberrypi.com/documentation/computers/os.html) (`2023-05-03`).
11
+
The OS contains a set of pre-installed python libraries that you can use, the list of which can be found [here](./python_libraries).
12
12
13
-
Keeping your kit up to date is very important. It enables us to deploy new features, as well as fix bugs.
14
13
15
-
Once you have downloaded the file you need, refer to the documentation on [updating your brain board]({{ site.baseurl }}/kit/brain_board#flashing-the-sd-card) to apply the update.
14
+
## Updates
16
15
17
-
Each update file is a complete upgrade. Each file contains the changes of those before it. If you need to jump up multiple versions, you can do so by using the latest file.
16
+
Keeping your kit up to date is very important, it enables us to fix bugs, as well as deploy new features.
17
+
18
+
Below is a list of the versions released, once you have downloaded the file you need, refer to the steps on the [tutorial page]({{ site.baseurl }}/tutorials/update_brain) to apply the update.
19
+
20
+
Each update file is a complete upgrade and contains all the changes of those before it.
21
+
If you need to jump up multiple versions, you can do so by just using the latest version.
Copy file name to clipboardExpand all lines: kit/brain_board/wifi.md
+23-30Lines changed: 23 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,63 +3,56 @@ layout: page
3
3
title: WiFi
4
4
---
5
5
6
-
WiFi
7
-
====
8
6
9
-
The Raspberry Pi that makes up your kit's brain board contains a WiFi radio which allows you to interface with and debug your robot.
10
-
You can connect to your robot using any WiFi capable device (laptop, tablet, phone, etc.)
7
+
# WiFi
11
8
12
-
Connecting to Your Robot
13
-
------------------------
9
+
The Raspberry Pi that makes up your kit's brain board has WiFi which allows you to connect to and debug your robot, using any WiFi capable device (laptop, tablet, phone, etc.).
10
+
The WiFi is only available during development and will be disabled during competition matches.
11
+
12
+
## Connecting to Your Robot
14
13
15
14
During the boot process you should notice the green LED on the KCH (the board on top of the Pi) labelled "WiFi" turn on.
16
-
Your robot has now set up its very own WiFi network! It will initially have a name starting with `robot-ZZZ` followed by some random numbers.
15
+
Your robot has now set up its very own WiFi network!
16
+
It will initially have a name starting with `robot-ZZZ` followed by some random numbers.
17
17
18
18
You can now connect to your robot in the same way you normally connect to a WiFi network.
19
19
You will need a WiFi key to be able to connect and you can find this inside `robot-settings.toml` on the USB drive containing your code.
20
20
21
-
<divclass="info">
22
-
If there is no <code>robot-settings.toml</code> on your USB drive, you can generate one by first running any code on your robot. For more information see our docs on <a href="{{ site.baseurl }}/kit/brain_board#robot-settings">Robot Settings</a>.
21
+
<divclass="info"markdown="1">
22
+
If there is no `robot-settings.toml` on your USB drive, you can generate one by first running any code on your robot.
23
+
For more information see our docs on [Robot Settings]({{ site.baseurl }}/kit/brain_board#robot-settings).
23
24
</div>
24
25
25
26
These details can also be printed using:
26
27
~~~~~python
27
-
R.print_wifi_details()
28
+
robot.print_wifi_details()
28
29
~~~~~
29
30
30
-
If you are having any problems connecting to your robot, just head on over to the Discord
31
-
and ask for help.
31
+
If you are having any problems connecting to your robot, just head on over to the Discord and ask for help.
32
+
32
33
33
-
Using the robot interface
34
-
-------------------------
34
+
## Using the robot interface
35
35
36
36
Once you have a WiFi connection, visit `http://robot.lan` in a web browser to see the robot interface.
37
37
38
-
The robot interface gives you the ability to remotely start the code on your robot,
39
-
as well as view the logs.
38
+
The robot interface gives you the ability to remotely start the code on your robot, as well as view the logs.
40
39
41
40

42
41
42
+
43
43
### Viewing logs
44
44
45
-
The robot interface allows you to see all messages from your code sent by `print(...)`
46
-
statements (and anything else that outputs to standard output or standard
47
-
error). It will also show messages from the initialisation of the robot's
48
-
hardware, as well as any errors that occurred when running your code.
45
+
The robot interface allows you to see all messages from your code sent by `print(...)` statements (and anything else that outputs to standard output or standard error).
46
+
It will also show messages from the initialisation of the robot's hardware, as well as any errors that occurred when running your code.
49
47
50
48
You can also see your robot's logs on the USB stick, in a file called
51
49
`log.txt`.
52
50
53
-
### Setting up the Robot's Environment
54
51
55
-
The toolbar present at the top of the page, or bottom of the page on mobile, allows you to change the robot's starting zone and mode.
56
-
Changing the starting zone allows you to test how your robot handles being started in a
57
-
different zone.
58
-
59
-
The WiFi interface will only be fully accessible when your robot is started in dev mode and will be restricted in competition mode.
52
+
### Setting the robot zone
60
53
61
-
Changing to competition mode causes the development markers to be unreadable,
62
-
and instead reads the competition markers, which are different. Therefore, you
63
-
should keep your robot in development mode.
54
+
The toolbar present at the top of the page, or bottom of the page on mobile, allows you to change the robot's starting zone and mode.
55
+
Changing the starting zone allows you to test how your robot handles being started in a different zone.
56
+
Changing mode only applies from the next time your code runs.
64
57
65
-
Changing this applies from the next time your code runs.
58
+
See the [competition mode]({{ site.baseurl }}/programming/robot_api/comp_mode) page for details of what competition mode is.
0 commit comments