mDot Sensornode Firmware Ready to use

Check main.h there are all IDs defined.
`/**

  • @defgroup LoRa Message IDs
  • @{
    */

#define MAX44009_MESSAGE_ID “L”
#define UBLOX_GPS_MESSAGE_ITOW_ID “G1”
#define UBLOX_GPS_MESSAGE_LONGITUDE_ID “G2”
#define UBLOX_GPS_MESSAGE_LATITUDE_ID “G3”
#define UBLOX_GPS_MESSAGE_HEIGHT_ID “G4”
#define UBLOX_GPS_MESSAGE_HMSL_ID “G5”
#define UBLOX_GPS_MESSAGE_HACC_ID “G6”
#define UBLOX_GPS_MESSAGE_VACC_ID “G7”
#define BME280_TEMPERATURE_MESSAGE_ID “B1”
#define BME280_PRESSURE_MESSAGE_ID “B2”
#define BME280_HUMIDITY_MESSAGE_ID “B3”
#define MPU9250_X_ACCELERATION_MESSAGE_ID “M1”
#define MPU9250_Y_ACCELERATION_MESSAGE_ID “M2”
#define MPU9250_Z_ACCELERATION_MESSAGE_ID “M3”
#define MPU9250_X_GYROSCOPE_MESSAGE_ID “M4”
#define MPU9250_Y_GYROSCOPE_MESSAGE_ID “M5”
#define MPU9250_Z_GYROSCOPE_MESSAGE_ID “M6”
#define MPU9250_X_TESLA_MESSAGE_ID “M7”
#define MPU9250_Y_TESLA_MESSAGE_ID “M8”
#define MPU9250_Z_TESLA_MESSAGE_ID “M9”
#define SI1143_PROXIMITY_MESSAGE_ID “P1”

#define LORA_MEASURMENT_RSSI_MESSAGE_ID “Z1”
#define LORA_MEASURMENT_SNR_MESSAGE_ID “Z2”
#define LORA_MEASURMENT_SPREADING_FACTOR_MESSAGE_ID “Z3”
#define LORA_MEASURMENT_TX_POWER_MESSAGE_ID “Z4”`

also
#define BME280_TEMPERATURE_MESSAGE_ID “B1”
#define BME280_PRESSURE_MESSAGE_ID “B2”

you can change them in your project to any id if you would like to: e.g.

#define BME280_TEMPERATURE_MESSAGE_ID “whateveryoulike”

{
“payload”: “B1:23.22,B2:96029.30,”
hey thank you very much i really apperictare what are you doing here.

i got the pressure as 96029.30 is that for example air pressure in Pa

You’re welcome.

Dont know if you are aware of the api documentation I wrote https://developer.mbed.org/users/mitea1/code/mDot_LoRa_Sensornode/docs/tip/

How much programming experience do you have?
If you check the code of BME280.h you will notice in the function comment that it returns the pressure in hPa.

i dont have much am learning, i asked because my readings are giving me 95681.64 hPa which for me it doesnt make sense right? its about 95.6 bar
}

even in the above post by @
skramer she has the same readings maybe its a mistake in the program ?

You’re right. The value actualy seems to be to big by a factor of 100. I will take a deeper look into the code this weekend if i find some time. For now I guess you just have to divide it by 100.
Edit: i guess the comment in the code is wrong and its actually Pa not hPa then.

I never tried them. However theoretically you can connect almost any sensor to the mdot you just have to check if there is an interface for it. For example if you sensor needs pulse input you have to check if there is one gpio available on the mdot which can act like that. Then you only have to write a driver for it and add it to my existing code or do your own stuff.

1 Like

how can i create a driver like you said i got a library for flowmeter from github. i can add flowmeter.h and flowmeter.cpp then i dont know what to write in main please help!!

You can give me the link to the github repo and I will take a look at it.

1 Like

https://github.com/sekdiy/FlowMeter Thank you i appreciate it

I took a look at it. It’s a library for Arduino. However it is theoretically possible to use it as part of my firmware but it needs some C++ in Embedded Systems programming experience in doing it since you need to use interrupts refactor the code a little bit and add a new Task and some other config stuff in order to integrate it properly. But I will not be able to do that in the next days/weeks since I have a lot of other stuff to do. If you need it urgent maybe someone else here in the forum with C++ knowledge can do it for you. If I did it I would need the sensor too in order to be able to test it properly.

Sure there’s also a possibility to quick and dirty hack it into the firmware. But from my experience in the long term it often takes as much or even more time than doing it right at the first time. But If you know somebody with C++ knowlegde and embedded systems he should be able to do it for you.

Or if you only need to use this Flowmeter I recommend you to check the forum here for arduino Lora Firmware. I’m pretty sure there is an Arduino project somewhere that uses Lora. Then you would only need to add the flowmeter stuff. Arduino has a big beginner friendly community its likely that you’ll find people here or in the internet who can help you if you struggle.

Edit: maybe worth a try: How to build your first TTN node: Arduino + RN2483

Thank you so much , I can send you a sensor if you have free time after a month or so, my deadline is beginning of December.? , I’ll try start working on it just one question what pin can I use as interrupt for flowmeter on mdot ? Am using UDK