Pseudo-Medical Monitor Code

From LVL1
Revision as of 22:38, 12 December 2021 by Unknown user (talk)
Jump to navigation Jump to search

Being written on the fly, expect rewrites and restructures. Enough information is here for writing code on the completed hardware.

Hardware Libraries

 #include <Wire.h>
 #include <SPI.h>
 #include <Adafruit_GFX.h>
 #include <Adafruit_ST7735.h>
 #include <Adafruit_VL53L0X.h>
 #include <Adafruit_AMG88xx.h>
 #include <MAX30105.h>
 #include <SparkFunMLX90614.h> 
 #include <DFRobot_ID809.h>
 #include <SD.h>
 #include <Adafruit_MPU6050.h>
 #include <pu2clr_pcf8574.h>
 #include <TCA9548A.h>
 

Library Modification

// In this Library : #include <SparkFunMLX90614.h> 
//Change the following line in the bool IRTherm::I2CReadWord(byte reg, int16_t * dest) routine.
//
//  I2C processing change needed for Arduino Due implementation
//
// Comment Out Line Below
//	_i2cPort->requestFrom(_deviceAddress, (uint8_t) 3, (uint8_t) true); 

// Add Line Below
      _i2cPort->requestFrom(_deviceAddress, (uint8_t) 3, (uint32_t)reg, (uint8_t)1, (uint8_t)true);


Defines - Variables - Routines

Updates Needed

The following code is a mixing and matching of the example code provided by the referenced Special Libraries.

Custom Includes

#include "TFT_Stuff.h"

#include "SD_Stuff.h"

#include "TK_Stuff.h"

#include "PORT_Stuff.h"

#include "HB_Stuff.h"

#include "AMG_Stuff.h"

#include "VL_Stuff.h"

#include "CT_Stuff.h"

#include "FP_Stuff.h"

#include "NEO_Stuff.h"

#include "EXG_Stuff.h"

#include "Eye_Stuff.h"

#include "MIDI_Stuff.h"

#include "I2CMUX_Stuff.h"

#include "CNTRL_Stuff.h"

#include "Configuration_Stuff.h"

#include "HNDHLD_Stuff.h"

void setup()
{
  Wire.begin();
  Wire1.begin();
  Serial.begin(115200);

  Serial.println("SETUP - Begin");
  Serial.println("TFT");
  setup_TFT();
  Serial.println("SD Card");
  setup_SD();

  Serial.println("I2CMUX");
  setup_I2CMUX();  
  Serial.println("CT");
  setup_CT();
  Serial.println("AMG");
  setup_AMG();
  Serial.println("VL");
  setup_VL();  
  Serial.println("HB");
  setup_HB();
  Serial.println("FP");
  setup_FP();
  Serial.println("CNTRL");
  setup_CNTRL();
  
  Serial.println("SETUP - End");
}


void loop()
{
      VL_Frame();
      AMG_Frame();
      CT_Frame();
      FP_Frame();
      HB_Frame();

    if (Controls.encoder_A_Switch())
      {
        Controls.pcf_event=false;
        delay(20);
        ConfigurationScans();        
        DrawScreenReset();
        VL_Reset();
        AMG_Reset();
        CT_Reset();
        FP_Reset();  
        HB_Reset();
      }
    
}
 

Pseudo-Medical Monitor