mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.2.1 M5ROTATE8
This commit is contained in:
parent
41ebc1a3f1
commit
d951a8f2d4
@ -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.2.1] 2023-09-23
|
||||
- add Wire1 support for ESP32
|
||||
- update readme.md
|
||||
- update keywords.txt
|
||||
|
||||
|
||||
## [0.2.0] 2023-08-08
|
||||
- testing with hardware led to a major upgrade
|
||||
- fix keyPressed
|
||||
@ -17,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- update readme.md
|
||||
- minor edits
|
||||
|
||||
----
|
||||
|
||||
## [0.1.0] - 2023-08-03
|
||||
- initial version
|
||||
|
@ -2,8 +2,11 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/M5ROTATE8/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/M5ROTATE8/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/M5ROTATE8/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/M5ROTATE8/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/M5ROTATE8/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/M5ROTATE8.svg)](https://github.com/RobTillaart/M5ROTATE8/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/M5ROTATE8/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/M5ROTATE8.svg?maxAge=3600)](https://github.com/RobTillaart/M5ROTATE8/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/M5ROTATE8.svg)](https://registry.platformio.org/libraries/robtillaart/M5ROTATE8)
|
||||
|
||||
|
||||
# M5ROTATE8
|
||||
@ -126,6 +129,7 @@ channel = 0..8
|
||||
- investigate step size 2 / 1.
|
||||
- An easy patch: divide by 2 resulting in step size 1 or 0
|
||||
|
||||
|
||||
#### Should
|
||||
|
||||
- error handling
|
||||
@ -149,3 +153,12 @@ channel = 0..8
|
||||
#### Wont (unless)
|
||||
|
||||
|
||||
## 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,
|
||||
|
||||
|
||||
|
@ -10,6 +10,10 @@
|
||||
|
||||
M5ROTATE8 MM;
|
||||
|
||||
uint8_t R = 0, G = 0, B = 0; // colors
|
||||
uint16_t D = 0; // delay
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
@ -26,12 +30,25 @@ void loop()
|
||||
{
|
||||
for (int ch = 0; ch < 9; ch++)
|
||||
{
|
||||
D = 1 + (abs(MM.getAbsCounter(0)) & 0xFF);
|
||||
R = MM.getAbsCounter(1) & 0x7F;
|
||||
G = MM.getAbsCounter(2) & 0x7F;
|
||||
B = MM.getAbsCounter(3) & 0x7F;
|
||||
|
||||
Serial.print(ch);
|
||||
MM.writeRGB(ch, 0, 0, 255);
|
||||
delay(MM.getAbsCounter(0));
|
||||
Serial.print('\t');
|
||||
Serial.print(R);
|
||||
Serial.print('\t');
|
||||
Serial.print(G);
|
||||
Serial.print('\t');
|
||||
Serial.print(B);
|
||||
Serial.print('\t');
|
||||
Serial.println(D);
|
||||
|
||||
MM.writeRGB(ch, R, G, B);
|
||||
delay(D);
|
||||
MM.writeRGB(ch, 0, 0, 0);
|
||||
delay(MM.getAbsCounter(0));
|
||||
Serial.println(MM.getAbsCounter(0));
|
||||
delay(D);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@ M5ROTATE8 KEYWORD1
|
||||
# Methods and Functions (KEYWORD2)
|
||||
begin KEYWORD2
|
||||
isConnected KEYWORD2
|
||||
|
||||
setAddress KEYWORD2
|
||||
getAddress KEYWORD2
|
||||
getVersion KEYWORD2
|
||||
@ -21,6 +22,7 @@ resetAll KEYWORD2
|
||||
inputSwitch KEYWORD2
|
||||
|
||||
writeRGB KEYWORD2
|
||||
setAll KEYWORD2
|
||||
allOff KEYWORD2
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/M5ROTATE8"
|
||||
},
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"license": "MIT",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=M5ROTATE8
|
||||
version=0.2.0
|
||||
version=0.2.1
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for M5 8ROTATE 8x rotary encoders
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: m5rotate8.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.0
|
||||
// VERSION: 0.2.1
|
||||
// PURPOSE: Arduino library for M5 8ROTATE 8x rotary encoders
|
||||
// URL: https://github.com/RobTillaart/M5ROTATE8
|
||||
|
||||
@ -29,7 +29,6 @@ M5ROTATE8::M5ROTATE8(uint8_t address, TwoWire *wire)
|
||||
#if defined (ESP8266) || defined(ESP32)
|
||||
bool M5ROTATE8::begin(int dataPin, int clockPin)
|
||||
{
|
||||
_wire = &Wire;
|
||||
if ((dataPin < 255) && (clockPin < 255))
|
||||
{
|
||||
_wire->begin(dataPin, clockPin);
|
||||
@ -255,5 +254,4 @@ uint32_t M5ROTATE8::read32(uint8_t reg)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: m5rotate8.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.0
|
||||
// VERSION: 0.2.1
|
||||
// PURPOSE: Arduino library for M5 8ROTATE 8x rotary encoders
|
||||
// URL: https://github.com/RobTillaart/M5ROTATE8
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "Arduino.h"
|
||||
#include "Wire.h"
|
||||
|
||||
#define M5ROTATE8_LIB_VERSION (F("0.2.0"))
|
||||
#define M5ROTATE8_LIB_VERSION (F("0.2.1"))
|
||||
|
||||
#define M5ROTATE8_DEFAULT_ADDRESS 0x41
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user