Giter Club home page Giter Club logo

Comments (7)

etulupov avatar etulupov commented on May 21, 2024 10

@civet You should add Servo library in platformio.ini

lib_deps =
     arduino-libraries/Servo @ 1.1.8

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

Ooops... Sorry... 😢 I've not seen it earlier. Arduino changed a structure for "built-in" libraries in 1.5.x branch. Now, the source code of the library is located in src directory and is split to "architectures" directories within src directory.

I will fix it as soon as possible. You can try this solution to fix it now:

  1. Copy from https://github.com/arduino/Arduino/tree/ide-1.5.x/libraries/Servo/src all content to %_your_platformio_based_project_dir%/lib/Servo. It should look like:
lib/Servo/Servo.h
lib/Servo/avr/...
lib/Servo/sam/...
  1. Add additional flag to your build environment in "platformio.ini":
[env:mybaseenv]
platform = atmelavr
framework = arduino
board = %YOU_BOARD_HERE%
build_flags = "-DARDUINO_ARCH_AVR"
  1. Use in your source code *.ino/c/h/cpp like:
#include <Servo.h>
...

from platformio-core.

anthgur avatar anthgur commented on May 21, 2024

I tried something similar that worked but I didn't have the build_flags field in my env, is that a problem for me? Thank you!

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

If you don't see "red compile errors", then you can use it without -DARDUINO_ARCH_AVR build flag

from platformio-core.

ivankravets avatar ivankravets commented on May 21, 2024

Please run platformio upgrade
https://twitter.com/platformiotool/status/539533696404299776

from platformio-core.

anthgur avatar anthgur commented on May 21, 2024

Works great, thanks!

from platformio-core.

civet avatar civet commented on May 21, 2024

@ivankravets
platformio version 4.1.0
Servo.h not found (for arduino) again.

from platformio-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.