chrisys / mini-lora-weatherstation

A mini battery powered LoRa weather station to measure temperature, humidity and barometric pressure.
MIT License
34 stars 17 forks source link

Added PlatformIO support #2

Closed alexcorvis84 closed 2 years ago

alexcorvis84 commented 4 years ago

Added PlatformIO support Source code in /src Updated README.md with PlatformIO support as optional

chrisys commented 4 years ago

@alexcorvis84 thanks for working on this 🙏

Is there a way we could utilise the same source files for both PlatformIO and ArduinoIDE? I think we're making the project harder to maintain by duplicating both files and it'll end up causing some pain or user confusion in the future.

alexcorvis84 commented 4 years ago

@chrisys You're right but I as far as I know, there's no way to have both versions (Arduino & PlatformIO) compatible with the same folders structure.

Keep in mind that PlatformIO projects add below files/folders:

platformio.ini - Project Configuration File src - Source files lib - Project specific (private) libraries

So, the only thing I can think of is leaving the original source code files (Arduino Sketch & TTN params) into /src folder. Just tried to build & it works.

Arduino users then will need to open mini-lora-weatherstation.ino from that folder, receiving a message from Arduino IDE in order to create (automatically) a folder called mini-lora-weatherstation including both files.

alexcorvis84 commented 2 years ago

Hi @chrisys,

I'm closing this PR as my fork will support PlatformIO only and it has been updated to use TTNV3 payload decodeUplink format. Thank you!