compile error when moving project from development board to ATtiny85 chip

Hello,

Hope you can help with a newbee question.

I've been working on a speed control program based on the "sweep.io" from the example for the Digispark SoftRcPulseOut library, this compiles and uploads fine onto a Digispark ATtiny85 development board.

I'm now trying to upload the code onto a raw ATtiny85 chip using a UNO board and a home made ISP programmer. Switched to the ATtiny 25/45/85 board and ATtiny85 processor as found in some instructions and the blink program uploads fine.

When I now open the sweep example I just get a compile error

Arduino: 1.8.13 (Windows 10), Board: "ATtiny25/45/85, ATtiny85, Internal 8 MHz"
Sweep:7:10: fatal error: SoftRcPulseOut.h: No such file or directory
#include <SoftRcPulseOut.h>
         ^~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
SoftRcPulseOut.h: No such file or directory

I don't understand why the change to the ATtiny25/45/85 board would not find the library. Am I trying to doing something that cannot be done or is it a simple fix.

Many thanks

Dave

// Sweep
// by BARRAGAN <http://barraganstudio.com>
// Adapted to SoftRcPulseOut library by RC Navy (http://p.loussouarn.free.fr)
// This sketch can work with ATtiny and Arduino UNO, MEGA, etc...
// This example code is in the public domain.

#include <SoftRcPulseOut.h>

SoftRcPulseOut myservo;  // create servo object to control a servo
// a maximum of eight servo objects can be created
#define SERVO_PIN         3

#define REFRESH_PERIOD_MS 20

#define NOW               1

int pos = 0;    // variable to store the servo position

void setup()
{
  myservo.attach(SERVO_PIN);  // attaches the servo on pin defined by SERVO_PIN to the servo object
}


void loop()
{
  for (pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
  { // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(REFRESH_PERIOD_MS);        // waits 20ms for refresh period
    SoftRcPulseOut::refresh(NOW);    // generates the servo pulse Now
  }
  for (pos = 180; pos >= 1; pos -= 1) // goes from 180 degrees to 0 degrees
  {
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(REFRESH_PERIOD_MS);        // waits 20ms for for refresh period
    SoftRcPulseOut::refresh(NOW);    // generates the servo pulse Now
  }
}

ATtiny85 board.jpg

digispark board.jpg

ATtiny85 board.jpg

digispark board.jpg

The error means the compiler can’t find the library.

Where did you install the library?

#include <SoftRcPulseOut.h>

The <> brackets means that the library is installed in the default include directory.

if the library is local, that is placed on your sketch folder use “”

#include "SoftRcPulseOut.h"

The double quotes causes the compiler to look in the current working directory for the include file. If the compiler does not find the include file there, it will then look in the default include directory.

Thanks for the help Steve,

The library was installed in a strange folder. Don't know if it was me or the Digispark install.

It took me a little while but I now have an updated library and its all working fine now.

Cheers

Dave