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

SparkFun Electronics

This kit represents the three core components of weather measurement: wind speed, wind direction and rainfall. None of the sensors in this kit contain active electronics, instead they use sealed magnetic reed switches and magnets, so you’ll need to source a voltage to take any measurements. The positive side of this is that the sensors are easy to interpret. The rain gauge is a self-emptying bucket-type rain gauge which activates a momentary button closure for each 0.011" of rain that are collected. The anemometer (wind speed meter) encodes the wind speed by simply closing a switch which each rotation. A wind speed of 1.492 MPH produces a switch closure once per second. Finally, the wind vane reports wind direction as a voltage which is produced by the combination of resistors inside the sensor. The vane’s magnet may close two switches at once, allowing up to 16 different positions to be indicated.

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