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: documentation/asciidoc/accessories/audio/update-firmware.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Raspberry Pi Audio Boards use an EEPROM that contains information that is used by the host Raspberry Pi device to select the appropriate driver at boot time. This information is programmed into the EEPROM during manufacture. There are some circumstances where the end user may wish to update the EEPROM contents: this can be done from the command line.
4
4
5
-
IMPORTANT: Before proceeding, you should update the Raspberry Pi OS running on your Raspberry Pi to the latest version.
5
+
IMPORTANT: Before proceeding, update the version of Raspberry Pi OS running on your Raspberry Pi to the latest version.
The Sense HAT has an 8×8 RGB LED matrix and a five-button joystick, and includes the following sensors:
4
4
@@ -18,143 +18,8 @@ Schematics and mechanical drawings for the Sense HAT and the Sense HAT V2 are av
18
18
19
19
=== LED matrix
20
20
21
-
The LED matrix is an RGB565 https://www.kernel.org/doc/Documentation/fb/framebuffer.txt[framebuffer] with the id "RPi-Sense FB". The appropriate device node can be written to as a standard file or mmap-ed. The included 'snake' example shows how to access the framebuffer.
21
+
The LED matrix is an RGB565 https://www.kernel.org/doc/Documentation/fb/framebuffer.txt[framebuffer] with the id `RPi-Sense FB`. The appropriate device node can be written to as a standard file or mmap-ed. The included snake example shows how to access the framebuffer.
22
22
23
23
=== Joystick
24
24
25
-
The joystick comes up as an input event device named "Raspberry Pi Sense HAT Joystick", mapped to the arrow keys and `Enter`. It should be supported by any library which is capable of handling inputs, or directly through the https://www.kernel.org/doc/Documentation/input/input.txt[evdev interface]. Suitable libraries include SDL, http://www.pygame.org/docs/[pygame] and https://python-evdev.readthedocs.org/en/latest/[python-evdev]. The included 'snake' example shows how to access the joystick directly.
26
-
27
-
== Calibrate
28
-
29
-
Install the necessary software and run the calibration program as follows:
30
-
31
-
[source,console]
32
-
----
33
-
$ sudo apt update
34
-
$ sudo apt install octave -y
35
-
$ cd
36
-
$ cp /usr/share/librtimulib-utils/RTEllipsoidFit ./ -a
37
-
$ cd RTEllipsoidFit
38
-
$ RTIMULibCal
39
-
----
40
-
41
-
The calibration program displays the following menu:
42
-
43
-
----
44
-
Options are:
45
-
46
-
m - calibrate magnetometer with min/max
47
-
e - calibrate magnetometer with ellipsoid (do min/max first)
48
-
a - calibrate accelerometers
49
-
x - exit
50
-
51
-
Enter option:
52
-
----
53
-
54
-
Press lowercase `m`. The following message will then show. Press any key to start.
55
-
56
-
----
57
-
Magnetometer min/max calibration
58
-
--------------------------------
59
-
Waggle the IMU chip around, ensuring that all six axes
60
-
(+x, -x, +y, -y and +z, -z) go through their extrema.
61
-
When all extrema have been achieved, enter 's' to save, 'r' to reset
62
-
or 'x' to abort and discard the data.
63
-
64
-
Press any key to start...
65
-
----
66
-
67
-
After it starts, you should see output similar to the following scrolling up the screen:
68
-
69
-
----
70
-
Min x: 51.60 min y: 69.39 min z: 65.91
71
-
Max x: 53.15 max y: 70.97 max z: 67.97
72
-
----
73
-
74
-
Focus on the two lines at the very bottom of the screen, as these are the most recently posted measurements from the program.
75
-
76
-
Now, pick up the Raspberry Pi and Sense HAT and move it around in every possible way you can think of. It helps if you unplug all non-essential cables to avoid clutter.
77
-
78
-
Try and get a complete circle in each of the pitch, roll and yaw axes. Take care not to accidentally eject the SD card while doing this. Spend a few minutes moving the Sense HAT, and stop when you find that the numbers are not changing any more.
79
-
80
-
Now press lowercase `s` then lowercase `x` to exit the program. If you run the `ls` command now, you'll see a new `RTIMULib.ini` file has been created.
81
-
82
-
In addition to those steps, you can also do the ellipsoid fit by performing the steps above, but pressing `e` instead of `m`.
83
-
84
-
When you're done, copy the resulting `RTIMULib.ini` to `/etc/` and remove the local copy in `~/.config/sense_hat/`:
85
-
86
-
[source,console]
87
-
----
88
-
$ rm ~/.config/sense_hat/RTIMULib.ini
89
-
$ sudo cp RTIMULib.ini /etc
90
-
----
91
-
92
-
== Read and write EEPROM data
93
-
94
-
Enable I2C0 and I2C1 by adding the following line to the xref:../computers/config_txt.adoc#what-is-config-txt[`/boot/firmware/config.txt`] file:
NOTE: These steps may not work on Raspberry Pi 2 Model B Rev 1.0 and Raspberry Pi 3 Model B boards. The firmware will take control of I2C0, causing the ID pins to be configured as inputs.
119
-
120
-
=== Read
121
-
122
-
EEPROM data can be read with the following command:
WARNING: This operation will not damage your Raspberry Pi or Sense HAT, but if an error occurs, the HAT may no longer be automatically detected. The steps above are provided for debugging purposes only.
25
+
The joystick comes up as an input event device named `Raspberry Pi Sense HAT Joystick`, mapped to the arrow keys and **Enter**. It should be supported by any library which is capable of handling inputs, or directly through the https://www.kernel.org/doc/Documentation/input/input.txt[evdev interface]. Suitable libraries include SDL, http://www.pygame.org/docs/[pygame] and https://python-evdev.readthedocs.org/en/latest/[python-evdev]. The included `snake` example shows how to access the joystick directly.
The https://www.raspberrypi.com/products/sense-hat/[Raspberry Pi Sense HAT] is an add-on board that gives your Raspberry Pi an array of sensing capabilities. The on-board sensors allow you to monitor pressure, humidity, temperature, colour, orientation, and movement. The bright 8×8 RGB LED matrix allows you to visualise data from the sensors, and the five-button joystick lets users interact with your projects.
3
+
The https://www.raspberrypi.com/products/sense-hat/[Raspberry Pi Sense HAT] is an add-on board that gives your Raspberry Pi an array of sensing capabilities. The on-board sensors allow you to monitor pressure, humidity, temperature, colour, orientation, and movement. The 8×8 RGB LED matrix allows you to visualise data from the sensors. The five-button joystick lets users interact with your projects.
4
4
5
5
image::images/Sense-HAT.jpg[width="70%"]
6
6
7
-
The Sense HAT was originally developed for use on the International Space Station, as part of the educational https://astro-pi.org/[Astro Pi] programme run by the https://raspberrypi.org[Raspberry Pi Foundation] in partnership with the https://www.esa.int/[European Space Agency]. It is wellsuited to many projects that require position, motion, orientation, or environmental sensing. The Sense HAT is powered by the Raspberry Pi computer to which it is connected.
7
+
The Sense HAT was originally developed for use on the International Space Station as part of the educational https://astro-pi.org/[Astro Pi] programme run by the https://raspberrypi.org[Raspberry Pi Foundation] in partnership with the https://www.esa.int/[European Space Agency]. It is well-suited to many projects that require position, motion, orientation, or environmental sensing. Because it is an add-on board, the Sense HAT connects to a Raspberry Pi device, drawing power from that device.
8
8
9
-
An officially supported xref:sense-hat.adoc#use-the-sense-hat-with-python[Python library] provides access to all of the on-board sensors, the LED matrix, and the joystick. The Sense HAT is compatible with any Raspberry Pi computer with a 40-pin GPIO header.
9
+
An officially supported xref:sense-hat.adoc#use-the-sense-hat-with-python[Python library] provides access to the on-board sensors, LED matrix, and joystick. The Sense HAT is compatible with any Raspberry Pi device with a 40-pin GPIO header.
0 commit comments