Hi,
i run a weather station since several years. Suddenly the startup did not work anymore. The debugging infos in startup over serial do not come. After several hours of debugging i could find that the initialisation of the AM2321 caused this. The code did not changed. Normally i simply search for an alternative library, but found none. Now it seems that i am forced to change the sensor or find the problem. The sensor must not be attached, and this worked some Arduino versions ahead. Code itself did not change.
Any idea is very welcome.
Libraries needed to compile:
https://github.com/wangdong/AM2321
https://github.com/geneReeves/ArduinoStreaming
And i found an older post here that involved also AM2321 https://forum.pjrc.com/threads/31249-tsl2561-arduino-Lib-crashing-teensy?p=87010&viewfull=1#post87010
i run a weather station since several years. Suddenly the startup did not work anymore. The debugging infos in startup over serial do not come. After several hours of debugging i could find that the initialisation of the AM2321 caused this. The code did not changed. Normally i simply search for an alternative library, but found none. Now it seems that i am forced to change the sensor or find the problem. The sensor must not be attached, and this worked some Arduino versions ahead. Code itself did not change.
Any idea is very welcome.
Libraries needed to compile:
https://github.com/wangdong/AM2321
https://github.com/geneReeves/ArduinoStreaming
Code:
// Test serial output at startup
#include <Streaming.h>
#include <AM2321.h>
int led1 = 13;
AM2321 ac; // ===> comment to unblock
void setup()
{
Serial.begin(115200); // USB is always 12 Mbit/sec
pinMode(led1, OUTPUT);
delay(100);
Serial << (F("=========MeteoStation 100ms =========")) << endl;
delay(100);
digitalWrite(led1, HIGH);
Serial << (F("=========MeteoStation 200ms =========")) << endl;
delay(100);
digitalWrite(led1, LOW);
Serial << (F("=========MeteoStation 300ms =========")) << endl;
delay(100);
digitalWrite(led1, HIGH);
Serial << (F("=========MeteoStation 400ms =========")) << endl;
delay(100);
digitalWrite(led1, LOW);
Serial << (F("=========MeteoStation 500ms =========")) << endl;
delay(100);
digitalWrite(led1, HIGH);
Serial << (F("=========MeteoStation 600ms =========")) << endl;
delay(100);
digitalWrite(led1, LOW);
Serial << (F("=========MeteoStation 700ms =========")) << endl;
delay(100);
digitalWrite(led1, HIGH);
Serial << (F("=========MeteoStation 800ms =========")) << endl;
delay(100);
digitalWrite(led1, LOW);
Serial << (F("=========MeteoStation 900ms =========")) << endl;
delay(100);
digitalWrite(led1, HIGH);
Serial << (F("=========MeteoStation 1000ms =========")) << endl;
delay(100);
digitalWrite(led1, LOW);
}
void loop()
{
}
And i found an older post here that involved also AM2321 https://forum.pjrc.com/threads/31249-tsl2561-arduino-Lib-crashing-teensy?p=87010&viewfull=1#post87010
Last edited: