mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
update readme.md
This commit is contained in:
parent
d830bc16ba
commit
ac95aef851
@ -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.1.2] - 2023-11-09
|
||||
- update readme.md
|
||||
- add derived class MAX7221 (identical for now).
|
||||
- minor edits
|
||||
|
||||
|
||||
## [0.1.1] - 2023-07-29
|
||||
- update AVR performance (from FastShiftOut)
|
||||
- add **writeZero()** (generic improvement)
|
||||
@ -15,10 +21,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- update readme.md
|
||||
- update keywords.txt
|
||||
|
||||
|
||||
## [0.1.0] - 2023-07-28
|
||||
- initial version
|
||||
|
||||
----
|
||||
|
||||
## [0.0.1] - eons ago
|
||||
- first tests
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: MATRIX7219.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.1
|
||||
// VERSION: 0.1.2
|
||||
// DATE: 2023-07-28
|
||||
// PURPOSE: Arduino Library for 8x8 LED MATRIX MAX7219
|
||||
// URL: https://github.com/RobTillaart/MATRIX7219
|
||||
@ -214,7 +214,7 @@ bool MATRIX7219::getSwap()
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
//
|
||||
// PRIVATE
|
||||
// PROTECTED
|
||||
//
|
||||
void MATRIX7219::_write(uint8_t b)
|
||||
{
|
||||
@ -237,7 +237,7 @@ void MATRIX7219::_write(uint8_t b)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
uint8_t clk = _clockPin;
|
||||
uint8_t dat = _dataPin;
|
||||
for (uint8_t mask = 0x80; mask > 0; mask >>= 1)
|
||||
@ -260,9 +260,9 @@ void MATRIX7219::_writeZero()
|
||||
uint8_t cbmask2 = ~_clockBit;
|
||||
// uint8_t outmask1 = _dataOutBit;
|
||||
uint8_t outmask2 = ~_dataOutBit;
|
||||
|
||||
|
||||
*_dataOutRegister &= outmask2;
|
||||
|
||||
|
||||
for (uint8_t mask = 0x80; mask > 0; mask >>= 1)
|
||||
{
|
||||
uint8_t oldSREG = SREG;
|
||||
@ -273,7 +273,7 @@ void MATRIX7219::_writeZero()
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
uint8_t clk = _clockPin;
|
||||
digitalWrite(_dataPin, LOW);
|
||||
for (uint8_t mask = 0x80; mask > 0; mask >>= 1)
|
||||
@ -281,7 +281,7 @@ void MATRIX7219::_writeZero()
|
||||
digitalWrite(clk, LOW);
|
||||
digitalWrite(clk, HIGH);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -296,5 +296,16 @@ uint8_t MATRIX7219::_reverse8(uint8_t in)
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DERIVED MATRIX7221 CLASS
|
||||
//
|
||||
MATRIX7221::MATRIX7221(uint8_t dataPin, uint8_t selectPin, uint8_t clockPin, uint8_t matrices)
|
||||
: MATRIX7219(dataPin, selectPin, clockPin, matrices)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: MATRIX7219.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.1
|
||||
// VERSION: 0.1.2
|
||||
// DATE: 2023-07-28
|
||||
// PURPOSE: Arduino Library for 8x8 LED MATRIX MAX7219
|
||||
// URL: https://github.com/RobTillaart/MATRIX7219
|
||||
@ -11,7 +11,7 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
|
||||
#define MATRIX7219_LIB_VERSION (F("0.1.1"))
|
||||
#define MATRIX7219_LIB_VERSION (F("0.1.2"))
|
||||
|
||||
|
||||
class MATRIX7219
|
||||
@ -40,7 +40,7 @@ public:
|
||||
void setSwap(bool swap);
|
||||
bool getSwap();
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
void _write(uint8_t b);
|
||||
void _writeZero(); // optimized writing of all 0
|
||||
@ -56,7 +56,7 @@ private:
|
||||
uint8_t _clockBit;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
uint8_t _dataPin;
|
||||
uint8_t _selectPin;
|
||||
uint8_t _clockPin;
|
||||
@ -69,5 +69,16 @@ private:
|
||||
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
///////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DERIVED MATRIX7221 CLASS
|
||||
//
|
||||
class MATRIX7221 : public MATRIX7219
|
||||
{
|
||||
public:
|
||||
MATRIX7221(uint8_t dataPin, uint8_t selectPin, uint8_t clockPin, uint8_t matrices = 1);
|
||||
};
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -2,13 +2,16 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/MATRIX7219/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/MATRIX7219/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/MATRIX7219/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/MATRIX7219/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/MATRIX7219/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/MATRIX7219.svg)](https://github.com/RobTillaart/MATRIX7219/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/MATRIX7219/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/MATRIX7219.svg?maxAge=3600)](https://github.com/RobTillaart/MATRIX7219/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/MATRIX7219.svg)](https://registry.platformio.org/libraries/robtillaart/MATRIX7219)
|
||||
|
||||
|
||||
# MATRIX7219
|
||||
|
||||
Arduino Library for controlling one or more 8x8 LED MATRIX with a MAX7219.
|
||||
Arduino Library for controlling one or more 8x8 LED MATRIX with a MAX7219 / MAX7221.
|
||||
|
||||
|
||||
## Description
|
||||
@ -21,6 +24,8 @@ For the future two (derived) classes are planned:
|
||||
- a class that is optimized to use for a single 8x8 matrix.
|
||||
- a class that buffers the state of the LEDS, allowing more functionality.
|
||||
|
||||
MAX7221 derived class is identical (for now).
|
||||
|
||||
|
||||
#### Tests
|
||||
|
||||
@ -32,7 +37,7 @@ implementation of the **inverse, reverse** and **swap** functions.
|
||||
|
||||
#### Related
|
||||
|
||||
- TODO
|
||||
- https://embed.plnkr.co/3VUsekP3jC5xwSIQDVHx Sprite Generator by Miro Božík
|
||||
|
||||
|
||||
#### Tested
|
||||
@ -42,12 +47,16 @@ Tested on Arduino UNO.
|
||||
|
||||
## Interface
|
||||
|
||||
**\#include "MATRIX7219.h"**
|
||||
```cpp
|
||||
#include "MATRIX7219.h"
|
||||
```
|
||||
|
||||
Not all functionality works, matrix parameter et al.
|
||||
|
||||
- **MATRIX7219(uint8_t dataPin, uint8_t selectPin, uint8_t clockPin, uint8_t matrices)**
|
||||
Constructor, initializes IO pins and the number of 8x8 matrices on same pins.
|
||||
- **MATRIX7221(uint8_t dataPin, uint8_t selectPin, uint8_t clockPin, uint8_t matrices)**
|
||||
Constructor (derived class) idem as above.
|
||||
- **void begin()** resets the internals of the connected device.
|
||||
- **uint8_t getMatrixCount()** returns number of matrices set in constructor.
|
||||
Convenience function.
|
||||
@ -151,3 +160,12 @@ First test ESP32
|
||||
- **uint8_t getBrightness()**
|
||||
- not needed yet
|
||||
|
||||
|
||||
## 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,
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
# Data types (KEYWORD1)
|
||||
MATRIX7219 KEYWORD1
|
||||
MATRIX7221 KEYWORD1
|
||||
|
||||
|
||||
# Methods and Functions (KEYWORD2)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "MATRIX7219",
|
||||
"keywords": "MATRIX, 8x8, LED, 7219, 7221",
|
||||
"description": "Arduino Library for 8x8 LED MATRIX MAX7219.",
|
||||
"description": "Arduino Library for 8x8 LED MATRIX MAX7219, MAX7221.",
|
||||
"authors":
|
||||
[
|
||||
{
|
||||
@ -15,9 +15,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/MATRIX7219.git"
|
||||
},
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"headers": "MATRIX7219.h"
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
name=MATRIX7219
|
||||
version=0.1.1
|
||||
version=0.1.2
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino Library for 8x8 LED MATRIX MAX7219.
|
||||
sentence=Arduino Library for 8x8 LED MATRIX MAX7219, MAX7221.
|
||||
paragraph=
|
||||
category=Display
|
||||
url=https://github.com/RobTillaart/MATRIX7219
|
||||
|
Loading…
x
Reference in New Issue
Block a user