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@3:d15b6579b5ae, 2020-04-08 (annotated)
- Committer:
- kabukistarship
- Date:
- Wed Apr 08 07:16:51 2020 +0000
- Revision:
- 3:d15b6579b5ae
- Parent:
- 2:1578ecfa9377
- Child:
- 4:de69851cf725
Updates from PandemicCookbook#75
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 | 2:1578ecfa9377 | 12 | #include <mbedBug.h> |
kabukistarship | 2:1578ecfa9377 | 13 | |
kabukistarship | 3:d15b6579b5ae | 14 | #include "GHVentilator.h" |
kabukistarship | 2:1578ecfa9377 | 15 | using namespace SickBay; |
kabukistarship | 2:1578ecfa9377 | 16 | |
kabukistarship | 2:1578ecfa9377 | 17 | int main () { |
kabukistarship | 2:1578ecfa9377 | 18 | I2C I2CBus(A4, A5); |
kabukistarship | 2:1578ecfa9377 | 19 | // + ------------------------ Number of updates per second. |
kabukistarship | 2:1578ecfa9377 | 20 | // v |
kabukistarship | 2:1578ecfa9377 | 21 | GHVentilator GHV (250, I2CBus, address, |
kabukistarship | 3:d15b6579b5ae | 22 | // +------------------------- Updates per second. |
kabukistarship | 3:d15b6579b5ae | 23 | // | +-------------------- Flow sensor interrupt pin. |
kabukistarship | 3:d15b6579b5ae | 24 | // | | +---------------- Pulse oximiter pin. |
kabukistarship | 3:d15b6579b5ae | 25 | // | | | +------------ Solenoid Vavle. |
kabukistarship | 3:d15b6579b5ae | 26 | // | | | | +-------- Status LED/Alarm. |
kabukistarship | 3:d15b6579b5ae | 27 | // | | | | | +--- PWM Servo |
kabukistarship | 3:d15b6579b5ae | 28 | // v v v v v v |
kabukistarship | 3:d15b6579b5ae | 29 | GHVentilatorChannel (200, D0, A0, D4, D8, D12).This(), |
kabukistarship | 3:d15b6579b5ae | 30 | GHVentilatorChannel (200, D1, A1, D5, D9, D13).This(), |
kabukistarship | 3:d15b6579b5ae | 31 | GHVentilatorChannel (200, D2, A2, D6, D10, D14).This(), |
kabukistarship | 3:d15b6579b5ae | 32 | GHVentilatorChannel (200, D3, A3, D7, D11, D15).This()) |
kabukistarship | 2:1578ecfa9377 | 33 | ); |
kabukistarship | 2:1578ecfa9377 | 34 | } |