Skip to content
Snippets Groups Projects
Commit aa162607 authored by Josef Vágner's avatar Josef Vágner
Browse files

edit of sw documantation

parent a6991029
No related branches found
No related tags found
No related merge requests found
# Iron heart
# Iron heart project
## Getting started
......@@ -44,7 +42,7 @@ Use the built-in continuous integration in GitLab.
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
---
# Editing this README
......@@ -55,30 +53,39 @@ When you're ready to make this README your own, just edit this file and use the
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
......@@ -86,10 +93,13 @@ For people who want to make changes to your project, it's helpful to have some d
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
# SW (Programs)
# Heart Rate Monitor with Captive Portal on Raspberry Pi Pico W - project iron heart
Write documentation here!
The project uses a Raspberry Pi Pico W to create a heart rate monitor with a captive portal that displays the heart rate data on a web page and visualize heart activity on RGB strips. The Pico W acts as an access point and serves a web page automatically when a device connects to the Wi-Fi network.
## Features
- Captive Portal: Automatically redirects connected devices to the heart rate monitor web page.
- Heart Rate Display: Shows real-time heart rate data on the web page.
- LED Visualization: Uses NeoPixel LEDs to visualize heart rate data with color transitions.
## Hardware Requirements
For custom design:
- Raspberry Pi Pico W
- NeoPixel LED strips
- EKG sensor with analog output pin
- Breadboard and connecting wires
For Iron Heart project:
- Iron heart PCB
- Raspberry Pi Pico W
- 39 x WS2812B
- EKG sensor AD8232
- JST-PH connector
- 4xAAA battery box and 4xAAA battery
## Software Requirements
- Arduino IDE
- Required Arduino libraries:
- Adafruit NeoPixel
- WiFi
- WebServer
- DNSServer
- Installed required Rpi pico boards
## Installation
1. **Set up Arduino IDE for Raspberry Pi Pico W:**
- Follow the instructions from the [official guide](https://www.raspberrypi.org/documentation/microcontrollers/micropython.html) to set up the Arduino IDE for the Raspberry Pi Pico W.
2. **Install Required Libraries:**
- Install the following libraries via the Arduino Library Manager:
- Adafruit NeoPixel
- WiFi
- WebServer
- DNSServer
3. **Install the Raspberry Pi Pico Boards:**
- Open the Arduino IDE.
- Go to `File` > `Preferences`.
- In the `Additional Boards Manager URLs` field, enter the following URL: `https://github.com/raspberrypi/arduino-barebones/releases/download/0.0.1/package_raspberrypi_barebones_index.json`
- Click `OK` to save the preferences.
- Go to `Tools` > `Board` > `Boards Manager`.
- Search for `Raspberry Pi Pico` and click on `Install` to install the boards.
4. **Flash the Code:**
- Connect your Raspberry Pi Pico W to your computer.
- Open the provided `src.ino` file in the Arduino IDE.
- Select the correct board and port from the `Tools` menu.
- Click on the `Upload` button to flash the code to the Pico W.
## Usage
1. **Connect EKG sensor:**
- Use provided pads to connect the sensor electrodes.
2. **Power the Pico W:**
- After flashing the code, power the Raspberry Pi Pico W using a USB cable or an external power source.
3. **Connect to Wi-Fi:**
- On your mobile device or computer, connect to the Wi-Fi network named `IRON_HEART` with the password `1234567899`.
4. **Automatic Redirection:**
- Once connected, the device should automatically redirect to the heart rate monitor web page. If not, open a web browser and navigate to `http://192.168.4.1`.
## Web Page
The generated web page includes:
- A heading displaying the text "Heart Rate Monitor".
- A dynamically updated section showing the current heart rate in BPM (beats per minute).
- CSS for basic styling to enhance the appearance of the web page.
- JavaScript for automatically fetching and updating the heart rate data every second.
### HTML, CSS, and JavaScript
- **HTML:** Structure of the web page including a heading and a section for displaying heart rate data.
- **CSS:** Styling to make the web page look visually appealing.
- **JavaScript:** Script to fetch the heart rate data from the server and update the web page every second.
## Functions Overview
- `setup()`: Initializes the EKG sensor and NeoPixel LED strips.
- `setup1()`: Runs on the second core to set up Wi-Fi in AP mode, starts the DNS server for the captive portal, and starts the web server.
- `loop()`: Continuously reads EKG data, processes it to detect heart rate, and updates the LEDs based on the heart rate.
- `loop1()`: Handles DNS and HTTP client requests for the captive portal.
- `lowPassFilter(float input)`: Applies a low-pass filter to the input signal.
- `highPassFilter(float input)`: Applies a high-pass filter to the input signal.
- `detectPeak(float current)`: Detects peaks in the filtered EKG signal.
- `controlLEDs(long brightness, float heartRate)`: Controls the NeoPixel LEDs to visualize the heart rate with color transitions.
- `handleRoot()`: Serves the main HTML page.
- `handleNotFound()`: Redirects any unknown requests to the captive portal.
- `serveHtml()`: Generates and serves the main HTML content for the web page.
- `redirectToCaptivePortal()`: Redirects clients to the captive portal.
## Notes
- Ensure that the EKG sensor and NeoPixel LED strips are correctly connected to the Raspberry Pi Pico W.
- The Wi-Fi credentials (`ssid` and `password`) can be changed to your preference.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment