Skip to content

Commit

Permalink
Add Wire1 support for ESP32
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Sep 24, 2023
1 parent 44f0ece commit 8754e31
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.5.1] - 2023-09-23
- add Wire1 support for ESP32
- update readme.md
- minor edits


## [0.5.0] - 2023-07-16
- fix #21, remove PCA9685_MODE2_BLINK
- is breaking (for some)
Expand Down
5 changes: 2 additions & 3 deletions PCA9685.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// FILE: PCA9685.cpp
// AUTHOR: Rob Tillaart
// DATE: 24-apr-2016
// VERSION: 0.5.0
// PURPOSE: Arduino library for I2C PCA9685 16 channel PWM
// VERSION: 0.5.1
// PURPOSE: Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit.
// URL: https://github.com/RobTillaart/PCA9685_RT


Expand All @@ -27,7 +27,6 @@ PCA9685::PCA9685(const uint8_t deviceAddress, TwoWire *wire)
#if defined (ESP8266) || defined(ESP32)
bool PCA9685::begin(uint8_t sda, uint8_t scl, uint8_t mode1_mask, uint8_t mode2_mask)
{
_wire = &Wire;
if ((sda < 255) && (scl < 255))
{
_wire->begin(sda, scl);
Expand Down
6 changes: 3 additions & 3 deletions PCA9685.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
// FILE: PCA9685.h
// AUTHOR: Rob Tillaart
// DATE: 24-apr-2016
// VERSION: 0.5.0
// PURPOSE: Arduino library for I2C PCA9685 16 channel PWM
// VERSION: 0.5.1
// PURPOSE: Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit.
// URL: https://github.com/RobTillaart/PCA9685_RT


#include "Arduino.h"
#include "Wire.h"


#define PCA9685_LIB_VERSION (F("0.5.0"))
#define PCA9685_LIB_VERSION (F("0.5.1"))

// ERROR CODES
#define PCA9685_OK 0x00
Expand Down
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
[![Arduino CI](https://github.com/RobTillaart/PCA9685_RT/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/PCA9685_RT/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/PCA9685_RT/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/PCA9685_RT/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/PCA9685_RT/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/PCA9685_RT.svg)](https://github.com/RobTillaart/PCA9685_RT/issues)

[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/PCA9685_RT/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/RobTillaart/PCA9685_RT.svg?maxAge=3600)](https://github.com/RobTillaart/PCA9685_RT/releases)
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/PCA9685_RT.svg)](https://registry.platformio.org/libraries/robtillaart/PCA9685)


# PCA9685_RT

Arduino library for PCA9685 I2C 12 bit PWM LED driver, 16 channel.
Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit.


## Description
Expand All @@ -29,6 +32,9 @@ Lower frequencies do better than higher frequencies.

## Interface

```cpp
#include "PCA9685.h"
```

### Constructor

Expand Down Expand Up @@ -248,24 +254,37 @@ please give feedback, so the documentation can be improved.
For further details of the development, see - #10 (PCA9634 repo)



## Operation

See examples


## Future

#### must
#### Must

- improve documentation

#### should
#### Should

- add unit tests (if possible)

#### could
#### Could

- investigate int vs uint16_t ?
- **setFrequency(), getFrequency(), \_freq**
- sync with PCA9634/35/85 where possible
- error handling?

#### Wont


## Support

If you appreciate my libraries, you can support the development and maintenance.
Improve the quality of the libraries by providing issues and Pull Requests, or
donate through PayPal or GitHub sponsors.

Thank you,


6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "PCA9685",
"keywords": "I2C,PCA9685,PWM,16channel",
"description": "Arduino library for I2C PCA9685 16 channel PWM",
"description": "Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit.",
"authors":
[
{
Expand All @@ -15,9 +15,9 @@
"type": "git",
"url": "https://github.com/RobTillaart/PCA9685_RT.git"
},
"version": "0.5.0",
"version": "0.5.1",
"license": "MIT",
"frameworks": "arduino",
"frameworks": "*",
"platforms": "*",
"headers": "PCA9685.h"
}
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name=PCA9685_RT
version=0.5.0
version=0.5.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for I2C PCA9685 16 channel PWM
sentence=Arduino library for PCA9685 I2C LED driver, 16 channel PWM, 12 bit.
paragraph=
category=Signal Input/Output
url=https://github.com/RobTillaart/PCA9685_RT
Expand Down

0 comments on commit 8754e31

Please sign in to comment.