GY-63_MS5611/libraries/Troolean/examples/testTrooleanArray/testTrooleanArray.ino

60 lines
1.1 KiB
Arduino
Raw Normal View History

2018-01-28 09:34:55 -05:00
//
// FILE: testTrooleanArray.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.1
// PURPOSE: test for troolean (tri state) math library for Arduino
2021-01-29 06:31:58 -05:00
// URL: https://github.com/RobTillaart/Troolean
2018-01-28 09:34:55 -05:00
#include "Troolean.h"
2021-01-29 06:31:58 -05:00
2018-01-28 09:34:55 -05:00
// minimal array test
Troolean arr[10];
Troolean brr[5] = { true, false, unknown };
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("TROOLEAN_LIB_VERSION: ");
Serial.println(TROOLEAN_LIB_VERSION);
for (int i = 0; i < 10; i++) arr[i] = false;
for (int i = 0; i < 10; i++)
{
Serial.print(arr[i]);
Serial.print(" ");
}
Serial.println();
for (int i = 0; i < 10; i++) arr[i] = true;
for (int i = 0; i < 10; i++)
{
Serial.print(arr[i]);
Serial.print(" ");
}
Serial.println();
for (int i = 0; i < 10; i++) arr[i] = unknown;
for (int i = 0; i < 10; i++)
{
Serial.print(arr[i]);
Serial.print(" ");
}
Serial.println();
Serial.println();
for (int i = 0; i < 5; i++)
{
Serial.print(brr[i]);
Serial.print(" ");
}
Serial.println();
}
void loop()
{
}
// END OF FILE