'NewPing' library for ultrasonic sensor

Discussion in 'Programmer's Corner' started by tanmay2001, Mar 20, 2015.

  1. tanmay2001

    Thread Starter New Member

    Mar 20, 2015
    2
    0
    hi, I compiled the same sketch using the same New Ping library downloaded from the arduino website. But intea of compiling it showed an error message which is -

    Arduino: 1.6.1 (Windows 8.1), Board: "Arduino Due (Programming Port)"
    In file included from NewPing15Sensors.pde:1:0:
    C:\Users\dell\Documents\Arduino\libraries\NewPing/NewPing.h:113:20: fatal error: avr/io.h: No such file or directory
    #include <avr/io.h>
    ^
    compilation terminated.
    Error compiling.
    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.
     
  2. tanmay2001

    Thread Starter New Member

    Mar 20, 2015
    2
    0
    if u have any suggestions pls share those with me.
    Thanx
     
  3. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    In the Arduino folder under "Program files", search for io.h

    I found it in .../Arduino/hardware/tools/avr/avr/include/avr
    Phew! If you can't find it, perhaps you should re-install the Arduino IDE.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
  5. HopWorks

    New Member

    Jul 29, 2015
    1
    0
    I went to the thread you linked and did not see anything about the error issue posted here. I found this thread by looking for answers as to why I also have an issue with avr/io.h not found. It was that the library did not support the board I am using.

    I just wanted to add that. Maybe I read the OP issue incorrectly, but the first post google-searches as a result to the common issue of avr/io.h not being found while compiling. And this issue with me also made me wonder why the Arduino IDE could not find it even though io.h is located just where it should be on my system.

    Thank you for the awesome forum!
     
  6. ranch vermin

    Member

    May 20, 2015
    85
    2
    make sure your VC++ include directory is set, but youll have to set the lib files too.
     
Loading...