Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. ivankravets
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    ivankravets

    @ivankravets

    9
    Reputation
    15
    Posts
    486
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website platformio.org

    ivankravets Follow

    Best posts made by ivankravets

    • RE: Best IDE to use for MySensors projects

      @Daniel-Oliveira We have some problems with previous PlatformIO 2.0 Build System and MySensor Library structure. All these issues are resolved in PlatformIO 3.0 where are introduced new build system and library manager with support for 3-rd party manifests (Arduino's library.properties, ARM mbed module.json).

      PlatformIO 3.0 has not been finally released. We released the first public alpha version. How to use it?

      1. Install PlatformIO IDE or PlatformIO CLI and switch it to development version.
      2. Menu: PlatformIO > Initialize new project
      3. Open platformio.ini project configuration files (will be created in the project)
      4. Specify project dependencies. See docs for lib_deps option.
      5. Press build/upload button.

      For example, the final project configuration file for the Arduino Uno will look like:

      [env:uno]
      platform = atmelavr
      framework = arduino
      board = uno
      lib_deps = MySensors
      

      You can also specify Semantic Versioning rules and depend on the specific version or range of versions. For example, lib_deps = MySensors@~2.0.1-beta means that any version of 2.0.x (including beta and higher) is allowed for your project.

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @tbowmo

      I'll have to dig into it 🙂 would be awesome to get platformio in as supported build environment as well (as standard arduino IDE is not that good).

      I recommend keeping CI with Arduino IDE builder no matter it is good or bad. A lot of developers use Arduino IDE and you need to be sure that your code compiles well. In PlatformIO we also have a lot of Arduino-IDE specific sketches that we test on each build. I understand that it sounds strange from me but we should think about users.

      We are using jenkins CI at the moment, to verify PRs to mysensors repositories at github

      I think that you can continue use Jenkins for Arduino IDE builder and Travis CI for PlatformIO Builder. As I've said before, I can prepare .travis.yml for you.

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @hek

      .travis.yml config (should be placed in the root of project)

      language: python
      python:
          - "2.7"
      
      # Cache PlatformIO packages using Travis CI container-based infrastructure
      sudo: false
      cache:
          directories:
              - ~/.platformio
      
      env:
          - PLATFORMIO_CI_SRC=examples/AirQualitySensor
          - PLATFORMIO_CI_SRC=examples/BatteryPoweredSensor
          - PLATFORMIO_CI_SRC=examples/BinarySwitchSleepSensor
          - PLATFORMIO_CI_SRC=examples/ClearEepromConfig
          - PLATFORMIO_CI_SRC=examples/CO2Sensor
          - PLATFORMIO_CI_SRC=examples/DimmableLEDActuator
          - PLATFORMIO_CI_SRC=examples/DimmableLight
          - PLATFORMIO_CI_SRC=examples/DustSensor
          - PLATFORMIO_CI_SRC=examples/DustSensorDSM
          - PLATFORMIO_CI_SRC=examples/EnergyMeterPulseSensor
          - PLATFORMIO_CI_SRC=examples/GatewayESP8266 PLATFORMIO_CI_BOARDS_ARGS="--board esp01 --board nodemcuv2"
          - PLATFORMIO_CI_SRC=examples/GatewayESP8266MQTTClient PLATFORMIO_CI_BOARDS_ARGS="--board esp01 --board nodemcuv2"
          - PLATFORMIO_CI_SRC=examples/GatewayESP8266OTA PLATFORMIO_CI_BOARDS_ARGS="--board esp01 --board nodemcuv2"
          - PLATFORMIO_CI_SRC=examples/GatewaySerial
          - PLATFORMIO_CI_SRC=examples/GatewaySerialRS485
          - PLATFORMIO_CI_SRC=examples/GatewayW5100
          - PLATFORMIO_CI_SRC=examples/GatewayW5100MQTTClient
          - PLATFORMIO_CI_SRC=examples/LightSensor
          - PLATFORMIO_CI_SRC=examples/MockMySensors
          - PLATFORMIO_CI_SRC=examples/MotionSensor
          - PLATFORMIO_CI_SRC=examples/MotionSensorRS485
          - PLATFORMIO_CI_SRC=examples/PHSensor
          - PLATFORMIO_CI_SRC=examples/PingPongSensor
          - PLATFORMIO_CI_SRC=examples/RelayActuator
          - PLATFORMIO_CI_SRC=examples/RepeaterNode
          - PLATFORMIO_CI_SRC=examples/SecretKnockSensor
          - PLATFORMIO_CI_SRC=examples/SecureActuator
          - PLATFORMIO_CI_SRC=examples/SecurityPersonalizer
          - PLATFORMIO_CI_SRC=examples/SoilMoistSensor
          - PLATFORMIO_CI_SRC=examples/UVSensor
          - PLATFORMIO_CI_SRC=examples/VibrationSensor
          - PLATFORMIO_CI_SRC=examples/WaterMeterPulseSensor
      
      install:
          # Don't forget to switch to stable PlatformIO 3.0 (line below) when it will be released
          # - pip install -U platformio
          - pip install -U https://github.com/platformio/platformio/archive/develop.zip
      
      script:
          - if [[ $PLATFORMIO_CI_BOARDS_ARGS ]]; then bash -c 'platformio ci --lib="." $PLATFORMIO_CI_BOARDS_ARGS'; else platformio ci  --lib="." --board uno --board megaatmega2560 --board esp01 --board nodemcuv2 --board zero; fi
      

      Here are test results. Some examples are failed because I don't know if they should be compatible with all boards or just AVR-based. You can specify custom boards per example using $PLATFORMIO_CI_BOARDS_ARGS. See example above for examples/GatewayESP8266.

      Also, you can add a lot of boards as you need. Please check PlatformIO Board Manager.

      To enable project for Travis CI please follow the steps 1, 2 and 5 here http://docs.travis-ci.com/user/getting-started/#To-get-started-with-Travis-CI

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @TD22057 thanks a lot for your feedback. If you have any problems with software (including open-source), don't forget to report them to developers.

      I'm a founder of PlatformIO and will try to answer on the all questions.

      I can't get platformio to include a custom include path and it's not obvious how it's managing build directories

      See documentation for it http://docs.platformio.org/en/latest/projectconf.html#build-flags

      The problem with all these "auto" systems is that when they break, they don't tell you enough to figure out how to fix it.

      The default behaviour of PlatformIO's builder is to build all *.c, *.cpp, *.S files. If this behaviour isn't good for your project, then you can control it via http://docs.platformio.org/en/latest/projectconf.html#src-filter

      I understand that developers like to "adopt" own source code (libraries) for the specified builder and then claim other builders that they What a pain in the a$. If someone like car which works using petrol, then it doesn't mean that people who use diesel cars are What a pain in the a$.


      I've just added to PlatformIO FAQ the answer for question Can not compile a library that compiles without issue with Arduino IDE.

      P.S: Friends, we spent our spare time to improve this embedded world. Our users don't understand that we do it totally FOR FREE and share all efforts via OPEN-SOURCE. Let's respect each other.


      Regards, Ivan Kravets

      • Ph.D, Researcher and Software Architect
      • "Creativity comes from talent and never from knowledge" (c)

      http://www.ikravets.com

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @stedew

      1. Choose Dir (only existing dir no create possible) (First make MKDIR BatteryPoweredSensor )

      Atom uses your system file manager and should allow creating a new directory. In most cases, the button in file manager is named as "New Folder". What is your OS?

      1. Add PATH string variable in settings (Good explanation anyway)

      Why do you need that? It should work with empty field if "Use built-in PlatformIO CLI" is checked. This option is for advanced using when you want to use custom PlatformIO CLI that is installed in Python virtualenv outside IDE.

      1. Start cmd (Powershell in Windoze) from PlatformIO
      2. Execute the cmd >> platformio lib install 548 (For Mysensors 2.0 lib)

      No need to do that. See my comment https://forum.mysensors.org/topic/1369/best-ide-to-use-for-mysensors-projects/24 . Just add 1 line to your platformio.ini config: lib_deps = MySensors

      -This being sayed for these additional steps you get something what is non existing in Arduino ide:

      Yep, that is our big disadvantage. We don't have similar behaviour as Arduino IDE. Arduino IDE allows building 1 sketch for the 1 board. PlatformIO is another planet. You can build the same source with the multiple build environments(platforms, boards) and upload it simultaneously.

      Is there a quick way to refractor over source files (not readed the manual)?

      We have Menu: PlatformIO > Import Arduino IDE based project.... It allows keeping compatibility between 2 IDEs (you need to check a special checkbox in import wizard).

      Goto declaration does not work (maybe my fault) Clang is installed however.

      We have some issue under Windows OS. It should work under macOS/Linux.

      Local version control?

      PlatformIO IDE is based on Atom text editor. You can extend IDE with hundreds cool packages and themes. Please visit https://atom.io/packages
      Here is plugin what do you need https://atom.io/packages/local-history

      Specify wich serial port for upload (and not use the default first one)

      See upload_port option.

      P.S: Thanks a lot for the feedback! What we should improve?

      posted in Development
      ivankravets
      ivankravets

    Latest posts made by ivankravets

    • RE: Best IDE to use for MySensors projects

      @stedew said:

      6 ) Compile info: on my Laptop (slow one) compiles MySerialGw in 2sec!! (record for PIO)

      How many seconds to you need for Arduino IDE builder?

      I believe it is maybe handy to have a write up with screenshots "Adventures migration from Arduino to PIO".

      Would be thankful for contribution. Our documentation is open source and everyone can edit it. For example, Documentation for PlatformIO IDE, click on Edit on GitHub.

      --Improvements ?? Don't know i already own you a couple of beers i think.

      Happy coding with PlatformIO! 😊

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @stedew

      1. Choose Dir (only existing dir no create possible) (First make MKDIR BatteryPoweredSensor )

      Atom uses your system file manager and should allow creating a new directory. In most cases, the button in file manager is named as "New Folder". What is your OS?

      1. Add PATH string variable in settings (Good explanation anyway)

      Why do you need that? It should work with empty field if "Use built-in PlatformIO CLI" is checked. This option is for advanced using when you want to use custom PlatformIO CLI that is installed in Python virtualenv outside IDE.

      1. Start cmd (Powershell in Windoze) from PlatformIO
      2. Execute the cmd >> platformio lib install 548 (For Mysensors 2.0 lib)

      No need to do that. See my comment https://forum.mysensors.org/topic/1369/best-ide-to-use-for-mysensors-projects/24 . Just add 1 line to your platformio.ini config: lib_deps = MySensors

      -This being sayed for these additional steps you get something what is non existing in Arduino ide:

      Yep, that is our big disadvantage. We don't have similar behaviour as Arduino IDE. Arduino IDE allows building 1 sketch for the 1 board. PlatformIO is another planet. You can build the same source with the multiple build environments(platforms, boards) and upload it simultaneously.

      Is there a quick way to refractor over source files (not readed the manual)?

      We have Menu: PlatformIO > Import Arduino IDE based project.... It allows keeping compatibility between 2 IDEs (you need to check a special checkbox in import wizard).

      Goto declaration does not work (maybe my fault) Clang is installed however.

      We have some issue under Windows OS. It should work under macOS/Linux.

      Local version control?

      PlatformIO IDE is based on Atom text editor. You can extend IDE with hundreds cool packages and themes. Please visit https://atom.io/packages
      Here is plugin what do you need https://atom.io/packages/local-history

      Specify wich serial port for upload (and not use the default first one)

      See upload_port option.

      P.S: Thanks a lot for the feedback! What we should improve?

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @hek

      .travis.yml config (should be placed in the root of project)

      language: python
      python:
          - "2.7"
      
      # Cache PlatformIO packages using Travis CI container-based infrastructure
      sudo: false
      cache:
          directories:
              - ~/.platformio
      
      env:
          - PLATFORMIO_CI_SRC=examples/AirQualitySensor
          - PLATFORMIO_CI_SRC=examples/BatteryPoweredSensor
          - PLATFORMIO_CI_SRC=examples/BinarySwitchSleepSensor
          - PLATFORMIO_CI_SRC=examples/ClearEepromConfig
          - PLATFORMIO_CI_SRC=examples/CO2Sensor
          - PLATFORMIO_CI_SRC=examples/DimmableLEDActuator
          - PLATFORMIO_CI_SRC=examples/DimmableLight
          - PLATFORMIO_CI_SRC=examples/DustSensor
          - PLATFORMIO_CI_SRC=examples/DustSensorDSM
          - PLATFORMIO_CI_SRC=examples/EnergyMeterPulseSensor
          - PLATFORMIO_CI_SRC=examples/GatewayESP8266 PLATFORMIO_CI_BOARDS_ARGS="--board esp01 --board nodemcuv2"
          - PLATFORMIO_CI_SRC=examples/GatewayESP8266MQTTClient PLATFORMIO_CI_BOARDS_ARGS="--board esp01 --board nodemcuv2"
          - PLATFORMIO_CI_SRC=examples/GatewayESP8266OTA PLATFORMIO_CI_BOARDS_ARGS="--board esp01 --board nodemcuv2"
          - PLATFORMIO_CI_SRC=examples/GatewaySerial
          - PLATFORMIO_CI_SRC=examples/GatewaySerialRS485
          - PLATFORMIO_CI_SRC=examples/GatewayW5100
          - PLATFORMIO_CI_SRC=examples/GatewayW5100MQTTClient
          - PLATFORMIO_CI_SRC=examples/LightSensor
          - PLATFORMIO_CI_SRC=examples/MockMySensors
          - PLATFORMIO_CI_SRC=examples/MotionSensor
          - PLATFORMIO_CI_SRC=examples/MotionSensorRS485
          - PLATFORMIO_CI_SRC=examples/PHSensor
          - PLATFORMIO_CI_SRC=examples/PingPongSensor
          - PLATFORMIO_CI_SRC=examples/RelayActuator
          - PLATFORMIO_CI_SRC=examples/RepeaterNode
          - PLATFORMIO_CI_SRC=examples/SecretKnockSensor
          - PLATFORMIO_CI_SRC=examples/SecureActuator
          - PLATFORMIO_CI_SRC=examples/SecurityPersonalizer
          - PLATFORMIO_CI_SRC=examples/SoilMoistSensor
          - PLATFORMIO_CI_SRC=examples/UVSensor
          - PLATFORMIO_CI_SRC=examples/VibrationSensor
          - PLATFORMIO_CI_SRC=examples/WaterMeterPulseSensor
      
      install:
          # Don't forget to switch to stable PlatformIO 3.0 (line below) when it will be released
          # - pip install -U platformio
          - pip install -U https://github.com/platformio/platformio/archive/develop.zip
      
      script:
          - if [[ $PLATFORMIO_CI_BOARDS_ARGS ]]; then bash -c 'platformio ci --lib="." $PLATFORMIO_CI_BOARDS_ARGS'; else platformio ci  --lib="." --board uno --board megaatmega2560 --board esp01 --board nodemcuv2 --board zero; fi
      

      Here are test results. Some examples are failed because I don't know if they should be compatible with all boards or just AVR-based. You can specify custom boards per example using $PLATFORMIO_CI_BOARDS_ARGS. See example above for examples/GatewayESP8266.

      Also, you can add a lot of boards as you need. Please check PlatformIO Board Manager.

      To enable project for Travis CI please follow the steps 1, 2 and 5 here http://docs.travis-ci.com/user/getting-started/#To-get-started-with-Travis-CI

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @dpressle

      1. Do you use the latest http://docs.platformio.org/en/stable/installation.html#development-version ?
      2. Do you have #include <Arduino.h> in one of your project file?
      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @tbowmo

      I'll have to dig into it 🙂 would be awesome to get platformio in as supported build environment as well (as standard arduino IDE is not that good).

      I recommend keeping CI with Arduino IDE builder no matter it is good or bad. A lot of developers use Arduino IDE and you need to be sure that your code compiles well. In PlatformIO we also have a lot of Arduino-IDE specific sketches that we test on each build. I understand that it sounds strange from me but we should think about users.

      We are using jenkins CI at the moment, to verify PRs to mysensors repositories at github

      I think that you can continue use Jenkins for Arduino IDE builder and Travis CI for PlatformIO Builder. As I've said before, I can prepare .travis.yml for you.

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @hek , @tbowmo would you like to integrate you project with Travis CI and PlatformIO? See example. The config for this example is very simple.

      Here is documentation for multiple continuous integration systems. If you want, I can prepare PR for you. It will allow you to test examples or unit tests over more than 250+ embedded boards without additional steps.

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @tbowmo said:

      There is no problem to add your custom board to existing development platform. What MCU is used in the board?
      See existing SAM/SAMD manifests https://github.com/platformio/platform-atmelsam/tree/develop/boards

      In PlatformIO you have to specify platform type for the build environment in platformio.ini. board and framework options are optional. You don't need to keep framework/SDK code within library. Development platform depends on it. See

      See project examples:

      • https://github.com/platformio/platformio-examples
      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @stedew my congrats for your wife 😊 💐 🎂

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @stedew said:

      Can you give a hint/short explanation why Mysensors 2.0 Compiles ok in the upgraded version (the development branch). I can understand its maybe one off your internal secrets but i think that it can be benificial for others.

      This is not a secret. PlatformIO 2.0 doesn't support 3-rd party library manifests. These different manifests are suitable for the own builders. For example, Arduino IDE builder has own behaviour. If library doesn't contain src folder, then it will build only source files from the root of library (other folders are ignored). If src directory exists, then only the source code from src should be built. The another story is with ARM mbed compiler.

      PlatformIO 3.0 is an unique cross-platform ecosystem that replaces all builders above and allows you to build different project in the same manner. We wrote different extensions for PlatformIO 3.0 Build System that allow handling 3-rd party manifests and "configure" build system on-the-fly. What is more, we don't depend on Arduino IDE, Java or ARM mbed yotta. PlatformIO is written in pure Python and doesn't depend on OS software. The only 1 requirement is Python interpreter (that is installed everywhere except Windows).

      -I Also tested the build and it took severall attempt to get it compiling. Unfotunatly i cannot reproduce it (Windows usr 😉 ) I had to fiddle severall times in the PATH var and settings and restart the IDE ....

      Could you explain in details? Thanks.

      posted in Development
      ivankravets
      ivankravets
    • RE: Best IDE to use for MySensors projects

      @tbowmo Sure, it is possible in PlatformIO 2.0 too. However, we don't recommend to make integration with it. PlatformIO 2.0 has not been changed since 2014 year. It was as hobby/experimental project.

      PlatformIO 3.0 is a new PlatformIO where all hardware related parts were moved to separated repositories. PlatformIO 3.0 is closer to open source. You don't need to contact with The PlatformIO Team (as you need to do it with PlatformIO 2.0) because you can create own development platform, clone existing or just add an own board to the existing development platform. Feel free to make PR and we will merge it.

      We will create "Development Platforms Registry" later. It will 3-rd party developers to register own development platforms and hardware in the public registry.

      The core idea of PlatformIO 3.0 is to provide professional cross-platform build system without dependencies with powerful library manager. It will allow others developers/companies to create awesome software basing on PlatformIO Tools.

      P.S: Here is docs (beta) how to create development platform or integrate custom embedded board: http://docs.platformio.org/en/latest/platforms/custom_platform_and_board.html

      posted in Development
      ivankravets
      ivankravets