diff --git a/README.md b/README.md index 5d8140c..f8263fd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ A software package to record audio and related metadata from a configuration of hydrophones. +For setup instructions, see `setup.md`. + ## Overview Module | Description @@ -13,10 +15,12 @@ depth-logger | Record depth of the device and save it in `.csv` format. *lcd-display | Provide information on the device's LCD screen *device-controls | Provide device control using physical buttons. +*) todo, not implemented yet + ## Data Formats Type | Output file format | Output file name | Output structure | Content -------------|--------------------|--------------------------------------|------------------| +------------|--------------------|--------------------------------------|------------------|- Audio Data | .wav | _audio.wav | Each recorded chunk will be written to its own file in `audio` folder | Wav audio data, configuration defined in XXX GPS Data | .csv | _gps.wav | All data written to a single file | Csv data with following fields: GPS time UTC, latitude, longitude, speed, satellites in view Depth data | .csv | _depth.wav | All data written to a single file | Csv data with following fields: date and time, voltage of depth sensor (V), depth (m) @@ -24,8 +28,8 @@ Log data | .txt | _log.txt | All da ## Output Locations -The base location/path for the output directories is defined by a configurable value BASE_DIR_PATH. If directories along this path do not exist, they will be created. If an error occurs or the location is not writable, output will be written to the default location () instead. +The location for the output directories is defined by a configurable value OUTPUT_PATH in `hydrophonitor-config.txt`. If directories along this path do not exist, they will be created. If an error occurs or the location is not writable, output will be written to the default location (DEFAULT_OUTPUT_PATH in hydrophonitor-config.txt) instead. - +SSD card mounting is not yet configured in the setup. A recording session starts when the Raspberry Pi is turned on or booted, and ends on shutdown. Each session will have its output written in its own directory that will be named _recordings. \ No newline at end of file diff --git a/resources.md b/resources.md index 37e8e26..6879cfb 100755 --- a/resources.md +++ b/resources.md @@ -1,5 +1,13 @@ # Links +# Raspberry Pi GPIO pins pinout + +https://pinout.xyz/pinout/i2c + +# Setting up an additional i2c bus with the GPIO pins + +https://raspberrypi.stackexchange.com/questions/101951/using-normal-gpio-pins-as-i2c-required + # Raspberry Pi water pressure sensor https://www.circuito.io/app?components=9443,200000,267055 @@ -10,5 +18,10 @@ https://wiki.linuxaudio.org/wiki/raspberrypi https://github.com/supercollider/supercollider/blob/develop/README_RASPBERRY_PI.md https://madskjeldgaard.dk/posts/raspi4-notes/ -# Setting up GPS +# Setting up the RTC +https://pimylifeup.com/raspberry-pi-rtc/ + +## DS3231 module pinout + +https://electropeak.com/learn/interfacing-ds3231-real-time-clock-rtc-module-with-arduino/ \ No newline at end of file diff --git a/setup.md b/setup.md index 821697c..c93bc75 100755 --- a/setup.md +++ b/setup.md @@ -11,6 +11,7 @@ - Pressure sensor - Adafruit ADS1015 ADC - breadboard, resistors, jumper wires, 12V battery +- RTC module (DS3231) ## Raspberry OS basic setup @@ -41,8 +42,8 @@ Then the following steps: If you do not use the Raspberry Pi Imager to set up the SD card, the following steps are required: 1. Download the 32-bit / 64-bit Rasbperry Pi OS Lite from here: https://www.raspberrypi.com/software/operating-systems/ -2. Flash the image to the SD card with the utility of your choice (options for Mac, Linux, Windows?) -3. Fill in required details in the configuration files in configuration folder and copy them to the boot folder on the SD card (this is the folder that should open when you open the SD card volume on your computer): +2. Flash the image to the SD card with the utility of your choice (options here for Mac, Linux, Windows?) +3. Fill in required details in the configuration files in `hydrophonitor/pi-config` folder and copy them to the `boot` folder on the SD card (this is the folder that should open when you open the SD card volume on your computer): - ssh.txt: this enables ssh on the Raspberry Pi, no need to edit the file (it's empty, the existence of the file in the boot folder is enough) - userconf.txt: creates a user - replace with the username of choice (e.g. pi) @@ -58,13 +59,13 @@ If you do not use the Raspberry Pi Imager to set up the SD card, the following s ### 2. Setting up the recording programs on the Raspberry Pi -After flashing the operating system to the SD card, it should show up as volume called "boot". +After flashing the operating system to the SD card, it should show up as volume called `boot`. To install all the needed components and to configure the Raspberry Pi to start the recordings when it is turned on, four steps are needed: copying the needed files to the SD card, putting the SD card in the Raspberry Pi and connecting to it on the command line over SSH, running an installer script on the command line, and finally letting it restart and verify that everything works as intended. #### 2.1 Copy files to the SD card, set configuration values -First, set the configuration values in the file hydrophonitor/configuration/hydrophonitor-config.txt. Then, copy the entire `hydrophonitor` folder to the SD card (simple Ctrl+C and Ctrl+V works). +First, set the configuration values in the file `hydrophonitor/hydrophonitor-config.txt`. Then, copy the entire `hydrophonitor` folder to the SD card (simple Ctrl+C and Ctrl+V works). #### 2.2 Plug the SD card in and connect to the Raspberry Pi over SSH @@ -129,19 +130,19 @@ There are two scripts that configure the Raspberry Pi to read its system time fr The first part enables the i2c interface (bus 3 with SDA at GPIO pin 23 and SCL at GPIO pin 24) and loads the needed hardware modules at boot. After that, a reboot is needed to enable the hardware interface. The second part updates the hardware clock module time and configures the Raspberry Pi to set the hardware clock time as the system time on startup. -Connect to the Raspberry Pi over ssh and navigate to the home directory: +Connect to the Raspberry Pi over ssh, navigate to the home directory, and run the script with following commands: ``` -ssh pi@ +ssh @ cd $HOME -sh hydrophonitor/scripts/setup-rtc-1.sh +./hydrophonitor/scripts/setup-rtc-1.sh sudo reboot ``` ``` -ssh pi@ +ssh @ cd $HOME -sh hydrophonitor/scripts/setup-rtc-2.sh +./hydrophonitor/scripts/setup-rtc-2.sh ``` ### 4. Configuration options