Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Main.cpp@4:de69851cf725, 2020-04-08 (annotated)
- Committer:
- kabukistarship
- Date:
- Wed Apr 08 11:28:42 2020 +0000
- Revision:
- 4:de69851cf725
- Parent:
- 3:d15b6579b5ae
- Child:
- 5:da629056644f
Misc fixes.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kabukistarship | 2:1578ecfa9377 | 1 | /** Gravity Hookah Ventilator @version 0.x |
kabukistarship | 2:1578ecfa9377 | 2 | @link https://github.com/KabukiStarship/SickBay.git |
kabukistarship | 2:1578ecfa9377 | 3 | @file /Main.cpp |
kabukistarship | 2:1578ecfa9377 | 4 | @author Cale McCollough <https://cale-mccollough.github.io> |
kabukistarship | 2:1578ecfa9377 | 5 | @license Copyright 2020 (C) Kabuki Starship <kabukistarship.com>. |
kabukistarship | 2:1578ecfa9377 | 6 | This Source Code Form is subject to the terms of the Mozilla Public License, |
kabukistarship | 2:1578ecfa9377 | 7 | v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain |
kabukistarship | 2:1578ecfa9377 | 8 | one at <https://mozilla.org/MPL/2.0/>. */ |
kabukistarship | 2:1578ecfa9377 | 9 | |
kabukistarship | 2:1578ecfa9377 | 10 | #define GHVDebug 1 //< Set to 0 or 1 to enable or disable debugging. |
kabukistarship | 2:1578ecfa9377 | 11 | |
kabukistarship | 3:d15b6579b5ae | 12 | #include "GHVentilator.h" |
kabukistarship | 2:1578ecfa9377 | 13 | using namespace SickBay; |
kabukistarship | 2:1578ecfa9377 | 14 | |
kabukistarship | 2:1578ecfa9377 | 15 | int main () { |
kabukistarship | 4:de69851cf725 | 16 | int UpdatesPerSecond = 250; |
kabukistarship | 2:1578ecfa9377 | 17 | I2C I2CBus(A4, A5); |
kabukistarship | 4:de69851cf725 | 18 | GHVentilator GHV (UpdatesPerSecond, UpdatesPerSecond * 10, |
kabukistarship | 4:de69851cf725 | 19 | I2CBus, address, 0.25f, //<---- Pressure chamber hysteresis. |
kabukistarship | 3:d15b6579b5ae | 20 | // +------------------------- Updates per second. |
kabukistarship | 4:de69851cf725 | 21 | // | +-------------------- Pulse oximiter pin. |
kabukistarship | 4:de69851cf725 | 22 | // | | +---------------- Flow sensor interrupt pin. |
kabukistarship | 3:d15b6579b5ae | 23 | // | | | +------------ Solenoid Vavle. |
kabukistarship | 3:d15b6579b5ae | 24 | // | | | | +-------- Status LED/Alarm. |
kabukistarship | 3:d15b6579b5ae | 25 | // | | | | | +--- PWM Servo |
kabukistarship | 3:d15b6579b5ae | 26 | // v v v v v v |
kabukistarship | 4:de69851cf725 | 27 | GHVentilatorChannel (200, A0, D0, D4, D8, D12).This(), |
kabukistarship | 4:de69851cf725 | 28 | GHVentilatorChannel (200, A1, D1, D5, D9, D13).This(), |
kabukistarship | 4:de69851cf725 | 29 | GHVentilatorChannel (200, A2, D2, D6, D10, D14).This(), |
kabukistarship | 4:de69851cf725 | 30 | GHVentilatorChannel (200, A3, D3, D7, D11, D15).This()) |
kabukistarship | 2:1578ecfa9377 | 31 | ); |
kabukistarship | 2:1578ecfa9377 | 32 | } |