Sparkfun Weather Meter Kit

Hi

Has anyone got code and libraries for a sparkfun weather meter kit which will connect to the Waether shield are these shields compatible with Mbed nucleo boards or only Ardiuno , I need assistance urgently please .

Hello,

you will probably not found a plug-and-play solution for this, but can try compose it like a puzzle.

SparkFun Weather Shield - DEV-13956 - SparkFun Electronics include

5 min with Search | Mbed, same time what you spent of creating two topics for same thing.

About hardware connection, hard to say. Arduino Uno is working with 5V logic, so the shield is prepared for 5V logic, but ARM architecture is usually 3.3V logic.

BR, Jan

Thanks Jan

I will have a look sorry for the questions as i am new to this .

Regards

Hi Jan

I only find the below code for the weather station that I have , will it work with MBED6 ?

Regards

Hello again,

great, you found something.

Line 29 of WheaterMeters.h

// from this
class WeatherMeters : public Base {
// to this because I do not know where the base class can be and I don't see any relation with it
class WeatherMeters{

Lines 43-45 of WheaterMeters.cpp

// from this
    int01.fall(this, &WeatherMeters::int_anemometer);
    int02.fall(this, &WeatherMeters::int_raingauge);
    ticker01.attach(this, &WeatherMeters::int_timer, 0.25); 
// to this
    int01.fall(callback(this,&WeatherMeters::int_anemometer));
    int02.fall(callback(this,&WeatherMeters::int_raingauge));
    ticker01.attach(callback(this,&WeatherMeters::int_timer), 250ms); 

However this library is only for Anemometer, Wind vane, Rain gauge. For rest sensors you will need another libraries.

BR, Jan

Thanks i will just add the pin numbers and hopefully it will work

Regards

Hi

So do i need to add pins to the code as i dont see any pins allocated and i see no printf function to display the values .

Thanking You

Hi

I tried to load the code , but I seem to get the error red lines below on Mbed studio 6

Regards

Please be so kind, scroll up and look my last post.
BTW it is not Mbed Studio 6. Mbed Studio is 1.4.3 and MbedOS is 6+ (6.15.1 is latest)

BR, Jan

Hi

I tried to compile my code but I get an error ? Am i maybe in an incorrect directory as I did try to create a new project .

Hi there,

try change from Release profile to Debug profile.
Also take a look to windows Output and Problems - View->Output / View->Problems

BR, Jan

Good Day

I tried to change to debug mode but am getting the same error;

Regards

Good day also for you,

nope that is not same errors. About those errors I already told you two times above, so be so kind and change the content of the library according to instructions

BR, Jan

Hi Sir

It has been changed please see below , I have attached the code and library .

Link to library ;

https://os.mbed.com/users/okini3939/code/WeatherMeters/

main.cpp

Weathermeters.h :

Regards

(Attachment main.cpp is missing)

(Attachment WeatherMeters.h is missing)

Ok, but how you can see compiler does not see that…
So you have selected another project with same content. If not try to run Clean Build ( under the arrow close to the hammer button).

BTW that not seem to be right, It seems like have it twice in project (one with gear is OK)

BR, Jan

Ok I deleted the 1 it was a duplicate , it looking better now , just giving error after 100% compile

Thanks for the assistance

Regards

Good Afternoon

When i try to compile under debug mode after compiling 100% I get the below error , code seems fine

Regards

Hi there,

You still have a chaos in your project I think.
According to first picture you have content of WeatherMeters.cpp inside of main.cpp

BR, Jan

Good Evening

I had a look and the folder seems fine as I have deleted the previous “project within a project” I still cant complie though

I also have a 2nd Question I am using a Nucleo F446RE MCU , dont I need to assign ports as I dont see any ports assigned in the code

Thanking You

This is the current files in the folder which seems correct