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@5:da629056644f, 2020-04-08 (annotated)
- Committer:
- kabukistarship
- Date:
- Wed Apr 08 12:36:36 2020 +0000
- Revision:
- 5:da629056644f
- Parent:
- 4:de69851cf725
- Child:
- 6:b2672da545f1
Fixed compile errors.
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 | 5:da629056644f | 18 | int Address = BMP280SlaveAddressDefault; |
kabukistarship | 5:da629056644f | 19 | GHVentilator GHV (UpdatesPerSecond, |
kabukistarship | 5:da629056644f | 20 | UpdatesPerSecond * 10, //<-- Calibration tick count. |
kabukistarship | 5:da629056644f | 21 | I2CBus, Address, |
kabukistarship | 5:da629056644f | 22 | 0.25f, //<------------------ Pressure chamber hysteresis %. |
kabukistarship | 5:da629056644f | 23 | 0.01f, // <----------------- Patient pressure hysteresis, |
kabukistarship | 5:da629056644f | 24 | D0, // <----------------- Blower pin. |
kabukistarship | 5:da629056644f | 25 | D1, // <----------------- Status pin. |
kabukistarship | 5:da629056644f | 26 | // +---------------------- Pulse oximiter pin. |
kabukistarship | 5:da629056644f | 27 | // | +------------------ Flow sensor interrupt pin. |
kabukistarship | 5:da629056644f | 28 | // | | +------------- Solenoid Vavle. |
kabukistarship | 5:da629056644f | 29 | // | | | +-------- Status LED/Alarm. |
kabukistarship | 5:da629056644f | 30 | // | | | | +--- PWM Servo |
kabukistarship | 5:da629056644f | 31 | // v v v v v |
kabukistarship | 5:da629056644f | 32 | GHVentilatorChannel (A0, D3, D4, D5, D6, I2CBus,Address+1).This(), |
kabukistarship | 5:da629056644f | 33 | GHVentilatorChannel (A1, D7, D8, D9, D10, I2CBus,Address+2).This(), |
kabukistarship | 5:da629056644f | 34 | GHVentilatorChannel (A2, D11, D12, D13, D14, I2CBus,Address+3).This(), |
kabukistarship | 5:da629056644f | 35 | GHVentilatorChannel (A3, D15, PC_8, PC_6, PC_5, I2CBus,Address+4).This() |
kabukistarship | 2:1578ecfa9377 | 36 | ); |
kabukistarship | 2:1578ecfa9377 | 37 | } |