Weather Carrier Board with ESP32

I was so excited to get my Weather Carrier board with ESP32 MicroMod today! I have worked through and read all the docs, etc on these two gems, and was hoping that the example applications would ‘just run’ when opened and deployed. Sadly, that appears not to be the case.

Here are the specific problems I’m facing:

In the MM_Weather_CB_Test.ino example, (well in all of the examples)

#if defined(ESP_PLATFORM)
int LED_BUILTIN = 5;

Causes a compiler error:

In file included from /Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/cores/esp32/Arduino.h:185:0,
                 from /var/folders/ns/44h75gxn0v95t1xj67pdfjqc0000gn/T/arduino_build_561788/sketch/MM_Weather_CB_Test.ino.cpp:1:
/Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/variants/esp32micromod/pins_arduino.h:72:22: note: previous declaration as 'const uint8_t LED_BUILTIN'
 static const uint8_t LED_BUILTIN = 2;

Ok, so that’s just the built-in LED, I can live without that.

But it gets steadily worse:

MM_Weather_CB_Test:41:5: error: conflicting declaration 'int G0'
 int G0 = 4;
     ^
In file included from /Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/cores/esp32/Arduino.h:185:0,
                 from /var/folders/ns/44h75gxn0v95t1xj67pdfjqc0000gn/T/arduino_build_123506/sketch/MM_Weather_CB_Test.ino.cpp:1:
/Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/variants/esp32micromod/pins_arduino.h:42:22: note: previous declaration as 'const uint8_t G0'
 static const uint8_t G0 = 15;
                      ^
MM_Weather_CB_Test:42:5: error: conflicting declaration 'int D0'
 int D0 = 23;
     ^
In file included from /Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/cores/esp32/Arduino.h:185:0,
                 from /var/folders/ns/44h75gxn0v95t1xj67pdfjqc0000gn/T/arduino_build_123506/sketch/MM_Weather_CB_Test.ino.cpp:1:
/Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/variants/esp32micromod/pins_arduino.h:39:22: note: previous declaration as 'const uint8_t D0'
 static const uint8_t D0 = 14;
                      ^
MM_Weather_CB_Test:44:5: error: conflicting declaration 'int D1'
 int D1 = 27;
     ^
In file included from /Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/cores/esp32/Arduino.h:185:0,
                 from /var/folders/ns/44h75gxn0v95t1xj67pdfjqc0000gn/T/arduino_build_123506/sketch/MM_Weather_CB_Test.ino.cpp:1:
/Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/variants/esp32micromod/pins_arduino.h:40:22: note: previous declaration as 'const uint8_t D1'
 static const uint8_t D1 = 27;
                      ^
MM_Weather_CB_Test:45:11: error: conflicting declaration 'const int G3'
 const int G3 = 17;
           ^
In file included from /Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/cores/esp32/Arduino.h:185:0,
                 from /var/folders/ns/44h75gxn0v95t1xj67pdfjqc0000gn/T/arduino_build_123506/sketch/MM_Weather_CB_Test.ino.cpp:1:
/Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/variants/esp32micromod/pins_arduino.h:45:22: note: previous declaration as 'const uint8_t G3'
 static const uint8_t G3 = 17;
                      ^
MM_Weather_CB_Test:46:5: error: conflicting declaration 'int G1'
 int G1 = 12;
     ^
In file included from /Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/cores/esp32/Arduino.h:185:0,
                 from /var/folders/ns/44h75gxn0v95t1xj67pdfjqc0000gn/T/arduino_build_123506/sketch/MM_Weather_CB_Test.ino.cpp:1:
/Users/davidgs/Library/Arduino15/packages/SparkFun/hardware/esp32/1.0.1/variants/esp32micromod/pins_arduino.h:43:22: note: previous declaration as 'const uint8_t G1'
 static const uint8_t G1 = 25;
                      ^
exit status 1

Essentially, it’s un-buildable and un-runnable. What am I missing here?

So, here’s the solution, to anyone else interested:

//int LED_BUILTIN = 5;
//int A0 = 34;
// int G0 = 4;
// int D0 = 23;
//int A1 = 35;
// int D1 = 27;
// const int G3 = 17;
// int G1 = 12;

Comment all that stuff out. It just breaks the build.

const float UVA_RESPONSIVITY[NUM_INTEGRATION_TIMES] =
    {
        UVA_RESPONSIVITY_100MS_UNCOVERED / (float)0.5016286645, // 50ms
        UVA_RESPONSIVITY_100MS_UNCOVERED,                       // 100ms
        UVA_RESPONSIVITY_100MS_UNCOVERED / (float)2.039087948,  // 200ms
        UVA_RESPONSIVITY_100MS_UNCOVERED / (float)3.781758958,  // 400ms
        UVA_RESPONSIVITY_100MS_UNCOVERED / (float)7.371335505   // 800ms
};

const float UVB_RESPONSIVITY[NUM_INTEGRATION_TIMES] =
    {
        UVB_RESPONSIVITY_100MS_UNCOVERED / (float)0.5016286645, // 50ms
        UVB_RESPONSIVITY_100MS_UNCOVERED,                       // 100ms
        UVB_RESPONSIVITY_100MS_UNCOVERED / (float)2.039087948,  // 200ms
        UVB_RESPONSIVITY_100MS_UNCOVERED / (float)3.781758958,  // 400ms
        UVB_RESPONSIVITY_100MS_UNCOVERED / (float)7.371335505   // 800ms
};

Edit the Library, and cast all those doubles to ```
floats


Next thing to debug is why the Wind Direction returns -1 so often. 

dg

I had this same MM+carrier arrive on my doorstep yesterday! Glad to hear someone else selected this combination. Will have to see if I get the same issue/solution pair. :smiley: Have only done the standard Blink sketch and the Wifi example thus far (had to install the official esp32 BSP in addition to the SparkFun MicroMod BSP for compiler to work?), what files did you end up editing to get this working, just the example .ino?

Have you tried the WiFiSecure example? And gotten it to work? I can’t!