Skip to content

Commit d41ec26

Browse files
authored
Better documentation on installation of the Adafruit GPS HAT. (#116)
Better documentation on installation of the Adafruit GPS HAT.
1 parent faea523 commit d41ec26

8 files changed

Lines changed: 20 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.7.1-do
2+
3+
* Better documentation on installation of the Adafruit GPS HAT.
4+
15
## 3.7.0
26

37
* Now (at last!) works with Raspberry Pi 5.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Using Firefox you will have to depend on using the Settings dialog to exit the w
101101

102102
### Hardware set-up for temperature/humidity sensors
103103

104-
If you are running the server on a Raspberry Pi you have the option to display indoor temperature and humidity using a direct-wired DHT22/AM2302 sensor, as seen here: <https://www.amazon.com/HiLetgo-Temperature-Humidity-Electronic-Practice/dp/B01N9BA0O4/>. The wiring I describe below is specifically for the AM2302 version of the DHT22, with a built-in pull-up resistor.
104+
If you are running the server on a Raspberry Pi you have the option to display indoor temperature and humidity using a direct-wired DHT22/AM2302 sensor, as seen here: <https://www.amazon.com/JESSINIE-DHT22-Temperature-Humidity-Electronic/dp/B0DPG1ZN6T/>. The wiring I describe below is specifically for the AM2302 version of the DHT22, with a built-in pull-up resistor.
105105

106106
With your Raspberry Pi shut down and disconnected from power, connect the DHT22/AM2302 sensor. The code defaults to assuming the signal lead (“out”) of the sensor is connected to GPIO 17* (physical pin 11 on the 40-pin J8 header). The `+` lead from the sensor needs to be connected to 5V (I chose pin 2 on the 40-pin J8 header) and the `-` lead needs to be connected to ground (I chose pin 9). In the image below, the signal lead is orange, the ground is brown, and +5 is the upper red wire.
107107

@@ -411,7 +411,7 @@ With later versions of Raspbian all you need to do is set a lower display resolu
411411

412412
Adafruit provides its own instructions on initial set-up of their GPS HAT here: https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/pi-setup
413413

414-
...but I’m including some extra details and clarifications below for the particular steps that helped with this clock set-up. Most important for Raspberry Pi 5 users was my discovery, not yet documented on the Adafruit website, was the need to add `dtparam=uart0_console` at the end of `/boot/firmware/config.txt` in order to get serial data from the GPS HAT.
414+
...but I’m including some clarifications below for the particular steps that helped with this clock set-up. Most important for Raspberry Pi 5 users was learning that, with the Raspberry Pi 5, serial data from the GPS HAT comes in on a differently-name serial port by default if you start with using `sudo raspi-config` as described below.
415415

416416
As documented by Adafruit, I used `sudo raspi-config` to disable shell access via the serial console while leaving the serial hardware enabled. Then I installed GPS and NTP tools as follows:
417417

@@ -420,16 +420,16 @@ sudo apt-get update
420420
sudo apt install pps-tools gpsd gpsd-clients ntp
421421
```
422422

423-
I added the following line (or lines, depending on what might already be present) to the end of `/boot/firmware/config.txt` (`/boot/config.txt` in earlier versions of Raspbian) (`enable_uart=1` is probably already there due to `raspi-config`):
423+
At the end of `/boot/firmware/config.txt` (`/boot/config.txt` in earlier versions of Raspbian) you should see this:
424424

425425
```text
426+
[all]
426427
enable_uart=1
427428
428429
# GPS
429430
dtoverlay=pps-gpio,gpiopin=4
430431
431432
dtparam=uart0=on
432-
# dtparam=uart0_console # uncomment for Raspberry Pi 5
433433
```
434434

435435
I added the following lines to the end of `/etc/ntpsec/ntp.conf` (`/etc/ntp.conf` in earlier versions of Raspbian):
@@ -444,7 +444,7 @@ server 127.127.28.0
444444
fudge 127.127.28.0 refid GPS
445445
```
446446

447-
And the entirety of my `/etc/default/gpsd` is as follows:
447+
And the entirety of my `/etc/default/gpsd` is as follows (replacing `serial0` with `ttyAMA0` for the Raspberry Pi 5):
448448

449449
```text
450450
# Devices gpsd should collect to at boot time.
@@ -461,6 +461,8 @@ USBAUTO="false"
461461
START_DAEMON="true"
462462
```
463463

464+
As of the time I'm writing this documentation, the most critical advice currently missing from the Adafruit tutorial is the need to **use `ttyAMA0` for the Raspberry Pi 5**.
465+
464466
### Developer notes
465467

466468
To greatly improve the speed and reliability of automated installations and updates, the often troublesome node-sass has been moved into a separate `sass` directory. To set up node-sass, `cd` into the `sass` directory and enter `npm i`. This prepares you for translating the source file `styles.scss` into `styles.css`.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock",
3-
"version": "3.7.0",
3+
"version": "3.7.1",
44
"license": "MIT",
55
"author": "Kerry Shetline <kerry@shetline.com>",
66
"scripts": {

sass/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock-sass",
3-
"version": "3.7.0",
3+
"version": "3.7.1",
44
"description": "SASS builder for aw-clock",
55
"keywords": [
66
"sass"

server/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aw-clock-server",
3-
"version": "3.7.0",
3+
"version": "3.7.1",
44
"license": "MIT",
55
"author": "Kerry Shetline <kerry@shetline.com>",
66
"private": true,

0 commit comments

Comments
 (0)