Using PWMServo_v2 lib with ATtiny84
with slight modification pwmservo.h pwmservo_v2 library found here: http://arduiniana.org/pwmservo/pwmservo_v2.zip
works fine attiny84. after unzipping folder open pwmservo.h in text editor. towards top of file, @ bottom of bunch of 'ifdefs' after #else label, change lines #define servo_pin_a 9 , #define servo_pin_b 10 #define servo_pin_a 6 , #define servo_pin_b 5. of course save file. access servo outputs on physical pin 7(servo_pin_a) , physical pin 8(servo_pin_b). i'm using attiny84's internal 8mhz clock , working great.
works fine attiny84. after unzipping folder open pwmservo.h in text editor. towards top of file, @ bottom of bunch of 'ifdefs' after #else label, change lines #define servo_pin_a 9 , #define servo_pin_b 10 #define servo_pin_a 6 , #define servo_pin_b 5. of course save file. access servo outputs on physical pin 7(servo_pin_a) , physical pin 8(servo_pin_b). i'm using attiny84's internal 8mhz clock , working great.
this works , maybe more proper mod. make 1 of #elif's before #else label:
#elif defined(__avr_attiny84__)
#define servo_pin_a 6
#define servo_pin_b 5
#elif defined(__avr_attiny84__)
#define servo_pin_a 6
#define servo_pin_b 5
Arduino Forum > Using Arduino > Microcontrollers > Using PWMServo_v2 lib with ATtiny84
arduino
Comments
Post a Comment