Kabuki Starship / Mbed 2 deprecated GHVentilator

Dependencies:   mbed SickBayTek

Committer:
kabukistarship
Date:
Thu Apr 09 02:05:03 2020 +0000
Revision:
6:b2672da545f1
Parent:
5:da629056644f
Child:
8:fa5cc1397510
Detail.GHVentilator.Firmware.Mbed.Move BMP280 polling code into main loop; States.Add PEEP state. #67

Who changed what in which revision?

UserRevisionLine numberNew 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 6:b2672da545f1 20 UpdatesPerSecond * 10, //<-- Calibration state tick count.
kabukistarship 5:da629056644f 21 I2CBus, Address,
kabukistarship 6:b2672da545f1 22 0.25f, //<-------------- Pressure chamber hysteresis %.
kabukistarship 6:b2672da545f1 23 0.01f, // <------------- Patient pressure hysteresis,
kabukistarship 6:b2672da545f1 24 D0, // <------------- Blower pin.
kabukistarship 6:b2672da545f1 25 D1, // <------------- Status pin.
kabukistarship 6:b2672da545f1 26 // +------------------ Pulse oximiter pin.
kabukistarship 6:b2672da545f1 27 // | +-------------- Flow sensor interrupt pin.
kabukistarship 6:b2672da545f1 28 // | | +-------- Solenoid Vavle.
kabukistarship 6:b2672da545f1 29 // | | | +--- PWM Servo
kabukistarship 6:b2672da545f1 30 // v v v v
kabukistarship 6:b2672da545f1 31 GHVentilatorChannel (A0, D3, D4, D5, I2CBus,Address+1).This(),
kabukistarship 6:b2672da545f1 32 GHVentilatorChannel (A1, D6, D7, D8, I2CBus,Address+2).This(),
kabukistarship 6:b2672da545f1 33 GHVentilatorChannel (A2, D9, D10, D11, I2CBus,Address+3).This(),
kabukistarship 6:b2672da545f1 34 // This channel is for an STM Nucleo-L152RE; use your dev boards pins.
kabukistarship 6:b2672da545f1 35 GHVentilatorChannel (A3, PC_8, PC_6, PC_5, I2CBus,Address+4).This()
kabukistarship 2:1578ecfa9377 36 );
kabukistarship 2:1578ecfa9377 37 }