SmoothLED  v1.0.0
Zanduino Arduino Library for controlling 8-bit PWM on any pin
Arduino Library Header to use 8-bit PWM on any pin

Description

Hardware PWM on the Atmel ATMega microprocessors can only be done on certain pins, and these are attached to specific timers. This library allows doing 8-bit PWM with 256 levels on any pin, regardless of whether they support hardware PWM or not. By default, if the pin can support hardware PWM this library will use, although that can be disabled during the begin() call.

Since the PWM is done in software, it "steals" CPU cycles from the main sketch and the more LEDs defined in the library the more CPU cycles it consumes.

User documentation is located at https://github.com/Zanduino/SmoothLED_8bit/wiki

Doxyygen configuration

This library is built with the standard "Doxyfile", which is located at https://github.com/Zanduino/Common/blob/main/Doxygen. As described on that page, there are only 5 environment variables used, and these are set in the project's actions file, located at https://github.com/Zanduino/SmoothLED_8bit/blob/master/.github/workflows/ci-doxygen.yml Edit this file and set the 5 variables: PRETTYNAME, PROJECT_NAME, PROJECT_NUMBER, PROJECT_BRIEF and PROJECT_LOGO so that these values are used in the doxygen documentation. The local copy of the doxyfile should be in the project's root directory in order to do local doxygen testing, but the file is ignored on upload to GitHub.

clang-format

Part of the GitHub actions for CI is running every source file through "clang-format" to ensure that coding formatting is done the same for all files. The configuration file ".clang-format" is located at https://github.com/Zanduino/Common/tree/main/clang-format and this is used for CI tests when pushing to GitHub. The local file, if present in the root directory, is ignored when committing and uploading.

GNU General Public License v3.0

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author

Written by Arnd Arnd@.nosp@m.Zand.nosp@m.uino..nosp@m.Com at https://www.github.com/SV-Zanshin

Changelog

VersionDate Developer Comments
1.0.0 2021-01-21 SV-Zanshin Created new library for the class