With my ATTinyCore, the included Servo library should just work (i include versions of Wire and SPI that also work on all the supported parts, transparently handling the differences in underlying hardware). If it doesnt, thats a bug that should be reported to me to be fixed (it should be an easy fix)
https://github.com/SpenceKonde/ATTinyCore
Wow, didn't realize the library dev would be responding himself! I'm honored haha.
Alright well sad thing is that's the first thing I tried.
This is the example I used.
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup() {
myservo.attach(6);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
myservo.write(10);
delay(2000);
myservo.write(170);
delay(2000);
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(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
To make troubleshooting easier I can guarantee that the servo is functional, powered by a separate source other than the Arduino which is already powering the attiny via 3.3v.
When I upload the code the servo activates and only holds it's position where it doesn't want to move. I attached it to physical pin 6 (arduino code pin 7). It also has a 100uf capacitor on the same line just in case.
The settings I'm using are:
Board: ATtiny24/44/84
Chip: ATtiny 84
Clock: 8MHz
B.O.D level: disabled (unchanged)
Save EEPROM: EEPROM retained (unchanged)
Pin Mapping: Clockwise
LTO: disabled
I've tested with other pwm pins but still no change.