I have a sodaq Sara outside in low temperature.
The code sets the RGB led to Yellow, then calls this snippet
Wire.begin(); accelerometer.rebootAccelerometer(); delay(1000); accelerometer.enableAccelerometer(Sodaq_LSM303AGR::LowPowerMode, Sodaq_LSM303AGR::HrNormalLowPower10Hz, Sodaq_LSM303AGR::XYZ, Sodaq_LSM303AGR::Scale2g, true); // Enable the Accelerometer, in2 G (default) pinMode(ACC_INT_PIN, INPUT); // Enable interrupts on the SAMD GCLK->CLKCTRL.reg = GCLK_CLKCTRL_ID(GCM_EIC) | GCLK_CLKCTRL_GEN_GCLK1 | GCLK_CLKCTRL_CLKEN; float threshold = 0.5; pinMode(GPS_ENABLE, OUTPUT); digitalWrite(GPS_ENABLE, HIGH); #if (GPS_INTERFACE == WIRE_BUS) Wire.begin(); #elif (GPS_INTERFACE == SERIAL_BUS) GPS_STREAM.begin(GPS_BAUD); #endif
Had this been successful, the LED would have been blue
At the globals, i have
#define ACC_INT_PIN ACCEL_INT2 and GPS_ENABLE is also defined.
So alltogether, normally, this works without a problem.
But in the night the board was left outside for testing qand the temperature went below zero. Then the board went to sleep.
This morning, the temperature was 4°C, and after waking up, the board was unable to execute this snippet (hanged in one of these functions)
What is the cause, and what is the remedy.