SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions about carrier boards have here!
User avatar
By davidgs
#225701
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)
Code: Select all
#if defined(ESP_PLATFORM)
int LED_BUILTIN = 5;
Causes a compiler error:
Code: Select all
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:
Code: Select all
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?
User avatar
By davidgs
#225702
So, here's the solution, to anyone else interested:
Code: Select all
//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.
Code: Select all
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
Code: Select all
doubles
to
Code: Select all
floats
. Recompile everything and it works. Maybe I should put in a PR to the library?

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

dg
User avatar
By mcrobotics
#225991
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. :D 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?
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]