Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Sep 17, 2023
1 parent 060e498 commit 801206c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AS5600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool AS5600::begin(int dataPin, int clockPin, uint8_t directionPin)
#endif


#if defined (STM32)
#if defined (ARDUINO_ARCH_STM32)

bool AS5600::begin(int dataPin, int clockPin, uint8_t directionPin)
{
Expand Down
2 changes: 1 addition & 1 deletion AS5600.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class AS5600
public:
AS5600(TwoWire *wire = &Wire);

#if defined (ESP8266) || defined(ESP32) || (STM32)
#if defined (ESP8266) || defined(ESP32) || defined(ARDUINO_ARCH_STM32)
// AS5600_SW_DIRECTION_PIN is software controlled direction pin
bool begin(int dataPin, int clockPin, uint8_t directionPin = AS5600_SW_DIRECTION_PIN);
#endif
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.4.1] - 2023-09-16
- fix #45 support STM32 set I2C pins
- fix #45 support STM32 set I2C pins ARDUINO_ARCH_STM32
- update readme badges
- minor edits

Expand Down
1 change: 1 addition & 0 deletions examples/AS5600_demo_radians/AS5600_demo_radians.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void setup()

Wire.begin();

// as5600.begin(11, 12, 4); // test for STM32 or ESP32
as5600.begin(4); // set direction pin.
as5600.setDirection(AS5600_CLOCK_WISE); // default, just be explicit.
}
Expand Down

0 comments on commit 801206c

Please sign in to comment.