Skip to content

Commit 701a713

Browse files
committed
Merge branch 'release/1.2.1'
2 parents 5a44675 + 7e798fc commit 701a713

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Servo Hardware PWM
2-
version=1.2.0
2+
version=1.2.1
33
author=Daniel Duller <daniel.duller@gmx.net>
44
maintainer=Daniel Duller <daniel.duller@gmx.net>
55
sentence=Allows Arduino/Genuino Mega boards to control up to 6 servos with the integrated 16-bit hardware PWM timer/counter.

src/Servo_Hardware_PWM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
For information about the library, license and author, see Servo_Hardware_PWM.h - file.
33
*/
44

5-
#if defined(ARDUINO_ARCH_AVR)
5+
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
66

77
#include <Arduino.h>
88
#include <Servo_Hardware_PWM.h>

src/Servo_Hardware_PWM.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Servo_Hardware_PWM.h - This Library allows Arduino/Genuino Mega boards to control up to 6 servos with the integrated 16-bit hardware PWM timer/counter.
33
Created by Daniel Duller, 11. January, 2019.
4-
Changed by Daniel Duller, 11. October, 2019.
4+
Changed by Daniel Duller, 14. October, 2019.
55
66
###############################################################################
77
MIT License
@@ -67,11 +67,13 @@
6767

6868
#include <inttypes.h>
6969

70-
#if !defined(ARDUINO_ARCH_AVR)
71-
#error "This library only supports boards with an AVR processor."
70+
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
71+
#warning "INFO: Servos can only be connected to the following pins: 2, 3, 7, 8, 44, and 45"
72+
#else
73+
#error "ERROR: This library only supports boards with an ATmega1280 or ATmega2560 processor. (Arduino/Genuino Mega/Mega1280/Mega2560)"
7274
#endif
7375

74-
#define Servo_VERSION 1.0.1 //software version of this library
76+
#define Servo_VERSION 1.2.1 //software version of this library
7577

7678
#define MIN_PULSE_WIDTH 500 //the shortest pulse sent to a servo
7779
#define MAX_PULSE_WIDTH 2500 //the longest pulse sent to a servo

0 commit comments

Comments
 (0)