Skip to content

Commit

Permalink
Bumped version to 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Aug 5, 2022
1 parent 204503f commit ce1c484
Show file tree
Hide file tree
Showing 10 changed files with 478 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/LibraryBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ jobs:
#############################################################################################################
include:
- arduino-boards-fqbn: arduino:avr:uno
required-libraries: NeoPatterns,PlayRtttl # for QuadrupedControl: -DQUADRUPED_1_WITH_DVD_REMOTE
build-properties: # the flags were put in compiler.cpp.extra_flags
OneServo: -DUSE_PCA9685_SERVO_EXPANDER -DDISABLE_PAUSE_RESUME
SymmetricEasing: -DDISABLE_COMPLEX_FUNCTIONS -DDEBUG
AsymmetricEasing: -DTRACE
Simple: -DPRINT_FOR_SERIAL_PLOTTER
PCA9685_ExpanderFor32Servos: -DTRACE -DDISABLE_MICROS_AS_DEGREE_PARAMETER
PCA9685_ExpanderAndServo: -DUSE_SOFT_I2C_MASTER
QuadrupedControl: -DQUADRUPED_1_WITH_DVD_REMOTE
QuadrupedControl: -DQUADRUPED_1_WITH_DVD_REMOTE -mrelax

- arduino-boards-fqbn: arduino:avr:leonardo
sketches-exclude: TwoServos,RobotArmControl # No LightweightServoLib and TinyReceiver available
Expand Down Expand Up @@ -146,7 +147,7 @@ jobs:

# First of all, we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@master

- name: Arduino Lint
uses: arduino/arduino-lint-action@v1
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [ServoEasing](https://github.com/ArminJo/ServoEasing) - move your servo more natural
A library for smooth servo movements. It uses the standard Arduino Servo library and therefore has its restrictions regarding pins and platform support.

### [Version 3.0.1](https://github.com/ArminJo/ServoEasing/archive/master.zip) - work in progress
### [Version 3.1.1](https://github.com/ArminJo/ServoEasing/archive/master.zip) - work in progress

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Installation instructions](https://www.ardu-badge.com/badge/ServoEasing.svg?)](https://www.ardu-badge.com/ServoEasing)
Expand Down Expand Up @@ -325,11 +325,12 @@ This will print internal information visible in the Arduino *Serial Monitor* whi
If you see errors like this `Simple.ino:57: undefined reference to ServoEasing::attach(int, int)`, you included *ServoEasing.h* instead of *ServoEasing.hpp*.

# Revision History
### Version 3.0.1
### Version 3.1.0
- SAMD51 support by Lutz Aumüller.
- Added support to pause and resume and `DISABLE_PAUSE_RESUME`.
- Fixed some bugs for PCA9685 expander introduced in 3.0.0.
- Feather Huzzah support with the help of Danner Claflin.
- Added `ENABLE_EXTERNAL_SERVO_TIMER_HANDLER` macro.

### Version 3.0.0
- Added target reached callback functionality, to enable multiple movements without loop control.
Expand Down
2 changes: 2 additions & 0 deletions examples/QuadrupedControl/QuadrupedConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ extern ServoEasing USServo;
#endif

#if defined(QUADRUPED_HAS_NEOPIXEL)
// Must be defined here, since we still have *.cpp sources
#define DO_NOT_SUPPORT_BRIGHTNESS
#define DO_NOT_SUPPORT_RGBW // saves up to 428 bytes additional program memory for the AllPatternsOnMultiDevices() example.

// patterns always used if Neopixel are enabled
Expand Down
7 changes: 4 additions & 3 deletions examples/QuadrupedControl/QuadrupedControl.ino
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,22 @@
#define QUADRUPED_MOVEMENT_BREAK_FLAG (doShutDown)
#endif

#define USE_NO_RTX_EXTENSIONS // Disables RTX format definitions `'s'` (style) and `'l'` (loop). Saves up to 332 bytes program memory
#define ENABLE_EXTERNAL_SERVO_TIMER_HANDLER // Evaluated by ServoEasing.hpp
#include "QuadrupedControlCommands.hpp" // In turn includes ServoEasing. Commands can also be used e.g. in loop().
#if defined(QUADRUPED_HAS_NEOPIXEL)
#include "QuadrupedNeoPixel.hpp"
#endif
#if defined(QUADRUPED_ENABLE_RTTTL)
#include <PlayRtttl.hpp>
#endif

#include "ADCUtils.hpp" // for getVCCVoltageMillivoltSimple() and printVCCVoltageMillivolt()

#if defined(QUADRUPED_HAS_US_DISTANCE_SERVO)
ServoEasing USServo;
#endif

#if defined(QUADRUPED_ENABLE_RTTTL)
#include <PlayRtttl.hpp>
#endif

//#define INFO // activate this to see serial info output

Expand Down
57 changes: 57 additions & 0 deletions examples/QuadrupedControl/QuadrupedNeoPixel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* QuadrupedNeoPixel.h
*
* Created on: 18.09.2019
* Author: Armin
*/

#ifndef _QUADRUPED_NEOPIXEL_H
#define _QUADRUPED_NEOPIXEL_H

#if defined(QUADRUPED_HAS_NEOPIXEL)
#include <NeoPatterns.h>

#define PIN_NEOPIXEL 4
// How many NeoPixels are mounted?
#define NUM_PIXELS 24

#define PIXELS_ON_ONE_BAR 8
#define PIXEL_OFFSET_RIGHT_BAR 0
#define PIXEL_OFFSET_FRONT_BAR PIXELS_ON_ONE_BAR
#define PIXEL_OFFSET_LEFT_BAR (2*PIXELS_ON_ONE_BAR)

void initNeoPatterns();

#if defined(HAS_ADDITIONAL_REMOTE_COMMANDS)
void doPattern1();
void doPattern2();
void doPatternStripes();
void doPatternHeartbeat();
void doPatternFire();
#endif

void doWipeOutPatterns();

bool isAtLeastOnePatternActive();

void showPatternSynchronizedWithServos();

void handleAutomaticMovementPattern();
void handleQuadrupedNeoPixelUpdate();
void handleServoTimerInterrupt();

uint16_t getDelayFromSpeed();

extern NeoPatterns QuadrupedNeoPixelBar; // The main 24 pixel bar containing all the other 3 logical NeoPatterns objects.
extern NeoPatterns RightNeoPixelBar; // 8 Pixel bar at the right
extern NeoPatterns FrontNeoPixelBar;
extern NeoPatterns LeftNeoPixelBar;
extern color32_t sBarBackgroundColorArrayForDistance[]; // // The color background for front distance bar

extern bool sAtLeastOnePatternsIsActive; // True if at least one pattern is active => call update()
extern bool sCleanPatternAfterEnd; // Do a wipe out after pattern ended
extern bool sShowPatternSynchronizedWithServos; // Flag set e.g. by main loop to force to show the pattern (e.g.distance value) synchronized with servo interrupts.

#endif // #if defined(QUADRUPED_HAS_NEOPIXEL)

#endif // _QUADRUPED_NEOPIXEL_H
Loading

0 comments on commit ce1c484

Please sign in to comment.