Navigation

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

    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