I did it! I used arduinonunchuk.h and wire.h with digispark attiny85 and it works!
// To use the Wire library:
#include <Wire.h>
// To use the Adafruit's TinyWireM library:
//#include <TinyWireM.h>
// To use the TinyI2C library from GitHub - technoblogy/tiny-i2c: Minimal I2C master routines for all AVR microcontrollers.
//#include <TinyI2CMaster.h>
#include <SoftRcPulseOut.h>
//#include <TinyNunchuk.h>
#include <ArduinoNunchuk.h>
#define SERVO_PIN1 1 //P1
#define SERVO_PIN2 3 //P3
#define REFRESH_PERIOD_MS 20
SoftRcPulseOut myservo1; // create servo object to control a servo
ArduinoNunchuk nunchuk = ArduinoNunchuk();
int pos = 0;
int i = 0;
void setup() {
nunchuk.init();
//nunchuk.begin();
myservo1.attach(SERVO_PIN1);
//myservo.attach(SERVO_PIN1);
// TinyWireM.begin(); // initialize I2C lib
}
void loop() {
//nunchuk.update();
// pos = nunchuk.x;
// pos = map(pos, 26, 228, 0, 180);
nunchuk.update();
pos = nunchuk.analogX;
// for (i = 0; i <= 180; i++) {
// myservo1.write(i); // tell servo to go to position in variable 'pos'
// delay(REFRESH_PERIOD_MS); // waits 20ms for refresh period
// SoftRcPulseOut::refresh(1);
// }
// for (i = 180; i >= 0; i--) {
// myservo1.write(i); // tell servo to go to position in variable 'pos'
// delay(REFRESH_PERIOD_MS); // waits 20ms for refresh period
// SoftRcPulseOut::refresh(1);
// }
myservo1.write(pos); // tell servo to go to position in variable 'pos'
delay(REFRESH_PERIOD_MS); // waits 20ms for refresh period
SoftRcPulseOut::refresh(1);
}