Just got released from the hospital and revisiting my problem. The omission is obvious if you know the explanation of the error codes.
Where can I find them?
I corrected the error and came up with another error about the Wire Library that I have not included. So I included it and came up with this error:
Using board 'uno' from platform in folder: C:\Users\jgmor\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2
Using core 'arduino' from platform in folder: C:\Users\jgmor\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2
Detecting libraries used...
"C:\\Users\\jgmor\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\jgmor\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\cores\\arduino" "-IC:\\Users\\jgmor\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\variants\\standard" "C:\\Users\\jgmor\\AppData\\Local\\Temp\\arduino-sketch-3AC2EB01025F276FCF46DB7637E563AC\\sketch\\TCA and AHT V4.ino.cpp" -o nul
Alternatives for Audrino.h: []
ResolveLibrary(Audrino.h)
-> candidates: []
Compilation error: Error: 2 UNKNOWN: exit status 1
Please tell me how to interpret this.
My code is:
/* Jim Moroz's attempt to combine mux and AHT examples. program TCA and AHT V1.ino
copied and pasted from the library examples code from:
1. BasicUaageini from the TCA9548A
2. adafruit_aht10_testlib from the Adafruit AHT10
My compile error:
*/
#include "TCA9548A.h" // Lib for mux
#include <Audrino.h> // Lib for Audrino from the example program TCA9548A
#include <Adafruit_AHT10> // Lib for AHT10
#include <Wire.h> // inserted beacuse compile error suggested it needs to be included
TCA9548A I2CMux; // Address can be passed into the constructor
Adafruit_AHT10 aht; //aht is an object of type Adafruit_AHTX0. Adafruit_AHTX0 is a class declared by the "Adafruit AHTX0" library
void setup() {
Serial.begin(9600); //from the TCA9548A example which conflicts with the AHT10 example
// IGNORED: Wire.setPins(21, 22); // ESP32 users, use setPins(sda, scl) if customised, *before* passing Wire to the library (the line below).
I2CMux.begin(Wire); // Wire instance is passed to the library
I2CMux.closeAll(); // Set a base state which we know (also the default state on power on)
}
void loop()
{
I2CMux.openChannel(0);
/* Code to interactive with revealed address on bus */
sensors_event_t humidity, temp;
aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data
Serial.println("Chan 0 Temperature: "); Serial.println(temp.temperature); Serial.println(" degrees C");
Serial.println("Chan 0 Humidity: "); Serial.println(humidity.relative_humidity); Serial.println("% rH");
I2CMux.closeChannel(0);
I2CMux.openChannel(1);
sensors_event_t humidity, temp;
aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data
Serial.println("Chan 1 Temperature: "); Serial.println(temp.temperature); Serial.println(" degrees C");
Serial.println("Chan 1 Humidity: "); Serial.println(humidity.relative_humidity); Serial.println("% rH");
I2CMux.closeChannel(1);
Delay (500);
}
Thanks
Jim