IDE Can not locate Libraries


i installed ide , libraries. opened blink, uploaded it, , worked fine.

when opened new sketch, morse example, ide takes file sos from

c:\users\jim\documents\arduino\libraries\morse\examples\sos , loads.

code: [select]
#include <morse.h>

morse morse(13);

void setup()
{
}

void loop()
{
  morse.dot(); morse.dot(); morse.dot();
  morse.dash(); morse.dash(); morse.dash();
  morse.dot(); morse.dot(); morse.dot();
  delay(3000);
}


when verify / compile or upload, message...

quote
c:\users\jim\documents\arduino\libraries\morse/morse.h:10:22: error: wprogram.h: no such file or directory
in file included sos.pde:1:

the files morse.h, morse.cpp, , keywords.txt in folder c:\users\jim\documents\arduino\libraries\morse

note forward slash in compiler error message.

any assistance appreciated.

the original morse library not work version 1 of ide , above.
revised version of morse.h
code: [select]
/*
  morse.h - library flashing morse code.
  created david a. mellis, november 2, 2007.
  released public domain.
*/
#ifndef morse_h
#define morse_h

#include "arduino.h"

class morse
{
  public:
    morse(int pin);
    void dot();
    void dash();
  private:
    int _pin;
};

#endif


revised version of morse.cpp
code: [select]
/*
  morse.cpp - library flashing morse code.
  created david a. mellis, november 2, 2007.
  released public domain.
*/

#include "arduino.h"
#include "morse.h"

morse::morse(int pin)
{
  pinmode(pin, output);
  _pin = pin;
}

void morse::dot()
{
  digitalwrite(_pin, high);
  delay(250);
  digitalwrite(_pin, low);
  delay(250);
}

void morse::dash()
{
  digitalwrite(_pin, high);
  delay(1000);
  digitalwrite(_pin, low);
  delay(250);
}


Arduino Forum > Using Arduino > Programming Questions > IDE Can not locate Libraries


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62