Here is the first part of my program:
#include <Ciao.h>
#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define SEALEVELPRESSURE_HPA (1013.25)
Adafruit_BME280 bme;
//Variablen Tian nach Labview
String TtL[48];
float baroAlti =0; // 0, Stelle,
float baroHumi =0; // 1, Stelle,
float baroPres =0; // 2, Stelle,
float baroTemp =0; // 3, Stelle,
int beepFB =0; // 4, Stelle,
int beltStat1 =0; // 5, Stelle,
int beltStat2 =0; // 6, Stelle,
int beltStat3 =0; // 7, Stelle,
int beltStat4 =0; // 8, Stelle,
int charIMeas =0; // 9, Stelle,
int charTimeEl =0; // 10, Stelle,
int charUfin1 =0; // 11, Stelle,
int charUMeas =0; // 12, Stelle,
int charUZero1 =0; // 13, Stelle,
int charUZero2 =0; // 14, Stelle,
int fsMeas =0; // 15, Stelle,
int genReadyFB =0; // 16, Stelle,
int gndSwGnd =0; // 17, Stelle,
int gndSwUGnd =0; // 18, Stelle,
long heart2 =0; // 19, Stelle,
int hs1Stat =0; // 20, Stelle,
int hs2Stat =0; // 21, Stelle,
int hs3Stat =0; // 22, Stelle,
int hvOnOffFB =0; // 23, Stelle,
int mafsMeas =0; // 24, Stelle,
int polFbMed =0; // 25, Stelle,
int polFbNeg =0; // 26, Stelle,
int polFbPos =0; // 27, Stelle,
int secCust1 =0; // 28, Stelle,
int secCust2 =0; // 29, Stelle,
int secEmrgSW =0; // 30, Stelle,
int secloop =0; // 31, Stelle,
int secLoop1 =0; // 32, Stelle,
int secLoop2 =0; // 33, Stelle,
int statusA1 =0; // 34, Stelle,
int statusA2 =0; // 35, Stelle,
int statusA3 =0; // 36, Stelle,
int timehours =0; // 37, Stelle,
int timetemp =0; // 38, Stelle,
int trigFB =0; // 39, Stelle,
int trigDone =0; // 40, Stelle,
int voltMeasM =0; // 41, Stelle,
int voltMeasT =0; // 42, Stelle,
int msg =0; // 43, Stelle,
int lockwarn =0; // 44, Stelle,
int debug =0; // 45, Stelle,
long timeDS =0; // 46, Stelle,
//Variablen Labview nach Tian
String LtT[62];
int beep =0; // 0, Stelle,
int beepvolt =0; // 1, Stelle,
int belt =0; // 2, Stelle,
int charIRamp1 =0; // 3, Stelle,
int charIRamp2 =0; // 4, Stelle,
int charISet =0; // 5, Stelle,
int charTime =0; // 6, Stelle,
int charURamp1 =0; // 7, Stelle,
int charURamp2 =0; // 8, Stelle,
int charUSet =0; // 9, Stelle,
int fs =0; // 10, Stelle,
int fsAuto =0; // 11, Stelle,
int fsHyst =0; // 12, Stelle,
int fsIncMax =0; // 13, Stelle,
int fsIncMin =0; // 14, Stelle,
int fsMin =0; // 15, Stelle,
int fsPlus =0; // 16, Stelle,
int fsSet =0; // 17, Stelle,
int gen =0; // 18, Stelle,
int genConf =0; // 19, Stelle,
int genReady =0; // 20, Stelle,
int heart1 =0; // 21, Stelle,
int hvOnOff =0; // 22, Stelle,
int lockAct1 =0; // 23, Stelle,
int lockAct2 =0; // 24, Stelle,
int lockAct3 =0; // 25, Stelle,
int lockAct4 =0; // 26, Stelle,
int lockAct5 =0; // 27, Stelle,
int lockAct6 =0; // 28, Stelle,
int lockDate1 =0; // 29, Stelle,
int lockDate2 =0; // 30, Stelle,
int lockDate3 =0; // 31, Stelle,
int lockDate4 =0; // 32, Stelle,
int lockDate5 =0; // 33, Stelle,
int lockDate6 =0; // 34, Stelle,
int lockImp =0; // 35, Stelle,
int lockImpA =0; // 36, Stelle,
int lockTime =0; // 37, Stelle,
int lockTimA =0; // 38, Stelle,
int mafs =0; // 39, Stelle,
int mafsAuto =0; // 40, Stelle,
int mafsHyst =0; // 41, Stelle,
int mafsIncMax =0; // 42, Stelle,
int mafsIncMin =0; // 43, Stelle,
int mafsMin =0; // 44, Stelle,
int mafsPlus =0; // 45, Stelle,
int mafsSet =0; // 46, Stelle,
int mafsTime =0; // 47, Stelle,
int pol =0; // 48, Stelle,
int shunt =0; // 49, Stelle,
int trig =0; // 50, Stelle,
int trigPhaOn =0; // 51, Stelle,
int trigPhase =0; // 52, Stelle,
int voltOver =0; // 53, Stelle,
int voltOver1 =0; // 54, Stelle,
int voltOverEx =0; // 55, Stelle,
int trigAuto =0; // 56, Stelle,
int timeInst =0; // 57, Stelle,
int trigtemp =0; // 58, Stelle,
int timegnd =0; // 59, Stelle,
int DcImp =0; // 60, Stelle,
//another
int beltUGnd=0;
long previousMillis05 =0;
long previousMillis1 =0;
long previousMillis2 =0;
long previousMillis1800 =0;
void setup()
{
Wire.begin();
Ciao.begin();
bme.begin();
PinSetup();
baroAlti = bme.readAltitude(SEALEVELPRESSURE_HPA);
baroHumi = bme.readHumidity();
baroPres = bme.readPressure();
baroTemp = bme.readTemperature();
digitalWrite(13, HIGH);
}
void loop()
{
if (millis() - previousMillis05 > 500)
{
previousMillis05 = millis();
}
if (millis() - previousMillis1 > 1000)
{
previousMillis1 = millis();
digitalWrite(13, LOW);
}
if (millis() - previousMillis2 > 2000)
{
previousMillis2 = millis();
baroAlti = bme.readAltitude(SEALEVELPRESSURE_HPA);
baroHumi = bme.readHumidity();
baroPres = bme.readPressure();
baroTemp = bme.readTemperature();
digitalWrite(13, HIGH);
CiaoReadWrite();
}
if (millis() - previousMillis1800 > 10000)
{
previousMillis1800 = millis();
}
if (beep==1) digitalWrite(11, HIGH);
if (beep==0) digitalWrite(11, LOW);
}