SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions about processor boards have here!
User avatar
By NataliaM
#227307
Hello, I have a MicroMod datalogging carrier board with a MicroMod Artemis processor that I am trying to use with multiple sensors. I keep getting compile errors for my temp TSYS01 and pressure MS5837 sensors and cannot get past the examples provided within the libraries. I have uninstalled and reinstalled apollo3, the libraries etc. and have also successfully compiled both on a RedBoard Artemis with no errors. Blink and my other sensors compile with the MicroMod so it is specific to the TSYS01 and MS5837. I get the same error for both sensors saying I have an expected unqualified-id before numeric constant D1. I do not know how to update the macros in the micromod or what I can do to fix this error. Any help is greatly appreciated.

In file included from C:\Users\natal\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.2.1/cores/arduino/ard_sup/Arduino.h:87,
from sketch\MS5837_Example.ino.cpp:1:
C:\Users\natal\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.2.1\variants\artemis_micromod/config/variant.h:72:12: error: expected unqualified-id before numeric constant
#define D1 1
^
C:\Users\natal\OneDrive\Documents\Arduino\libraries\BlueRobotics_MS5837_Library/MS5837.h:88:11: note: in expansion of macro 'D1'
uint32_t D1, D2;
^~
exit status 1
Error compiling for board SparkFun Artemis MicroMod.
User avatar
By adam.g
#227308
Hi Natalia,

I've experienced this a few times with the MicroMod variant.h definitions. It's a common issue because "G" and "D" definitions are pretty generic and frequently used in other libraries.

You can either alter the MS5837 library to change the D1 definition to something else, though be aware how it is used. Alternatively, you can go into the MicroMod Artemis variant.h file and comment out the D1 definition. You'll need to make sure that any future references to D1 are 0 (zero) instead if you do (the actual pin it refers to). This may be the simpler approach instead of potentially breaking the library.

https://github.com/sparkfun/Arduino_Apo ... .h#L71-L72

On MacOS the variant.h file is located in the following directory:
/Users/adam/Library/Arduino15/packages/SparkFun/hardware/apollo3/1.2.3/variants/artemis_micromod/config/variant.h
If you're on Windows, I suspect it'll be very similar.

Cheers,
Adam
 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? [...]