Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Nov 13, 2023
1 parent 35a75bf commit e323750
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 18 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.1.6] - 2023-11-13
- update readme.md


## [0.1.5] - 2022-11-18
- add RP2040 in build-CI
- add changelog.md
- clean up unit test
- update keywords.txt to match .h file
- move code from .h to .cpp


## [0.1.4] - 2021-12-22
- update library.json
- update license
Expand Down
6 changes: 3 additions & 3 deletions MT8870.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: MT8870.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.1.5
// VERSION: 0.1.6
// DATE: 2019-02-11
// PURPOSE: Arduino library for MT8870 DTMF decoder (breakout)
// URL: https://github.com/RobTillaart/MT8870
Expand All @@ -20,7 +20,7 @@ void MT8870::begin(uint8_t STQ, uint8_t Q1, uint8_t Q2, uint8_t Q3, uint8_t Q4)
_q[3] = Q4;
for (uint8_t p = 0; p < 4; p++)
{
pinMode(_q[p], INPUT); // PULLUP ?
pinMode(_q[p], INPUT); // PULLUP ?
}
pinMode(_STQ, INPUT);
}
Expand Down Expand Up @@ -68,5 +68,5 @@ uint32_t MT8870::lastTimeRead()
};


// -- END OF FILE --
// -- END OF FILE --

7 changes: 3 additions & 4 deletions MT8870.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
//
// FILE: MT8870.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.5
// VERSION: 0.1.6
// DATE: 2019-02-11
// PURPOSE: Arduino library for MT8870 DTMF decoder (breakout)
// URL: https://github.com/RobTillaart/MT8870
// https://www.tinytronics.nl/shop/nl/sensoren/geluid/mt8870-dtmf-module
//


#include "Arduino.h"

#define MT8870_LIB_VERSION (F("0.1.5"))
#define MT8870_LIB_VERSION (F("0.1.6"))


class MT8870
Expand All @@ -36,5 +35,5 @@ class MT8870
};


// -- END OF FILE --
// -- END OF FILE --

37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
[![Arduino CI](https://github.com/RobTillaart/MT8870/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
[![Arduino-lint](https://github.com/RobTillaart/MT8870/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/MT8870/actions/workflows/arduino-lint.yml)
[![JSON check](https://github.com/RobTillaart/MT8870/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/MT8870/actions/workflows/jsoncheck.yml)
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/MT8870.svg)](https://github.com/RobTillaart/MT8870/issues)

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


# MT8870
Expand All @@ -23,10 +26,10 @@ DTMF tones, uses one from A..D and one from E..H.

| Name | Frequency |
|:------:|------------:|
| A | 697 Hz |
| B | 770 Hz |
| C | 852 Hz |
| D | 941 Hz |
| A | 697 Hz |
| B | 770 Hz |
| C | 852 Hz |
| D | 941 Hz |
| E | 1209 Hz |
| F | 1336 Hz |
| G | 1477 Hz |
Expand All @@ -35,6 +38,10 @@ DTMF tones, uses one from A..D and one from E..H.

## Interface

```cpp
#include "MT8870.h"
```

- **MT8870()** constructor
- **void begin(uint8_t STQ, uint8_t Q1, uint8_t Q2, uint8_t Q3, uint8_t Q4)** defines which pins to use.
Technically it is possible to have readout multiple decoders
Expand All @@ -43,7 +50,7 @@ with one MT8870 object by calling **begin()** with other pins.
- **Q1..Q4** = data pins.
- Calling begin resets the **lastRead** char
- **bool available()** returns true if there is a DMTF signal
- **char read()** reads the character available. returns 255 if no signal available.
- **char read()** reads the character available. Returns 255 if no signal available.
- **uint8_t readRaw()** returns 0 .. 15 or 255 if no signal is available.
- **uint8_t lastRaw()** returns the last code read 0 .. 15 or 255 if no signal available.
Note this is a cached value from a readRaw / read call.
Expand All @@ -57,22 +64,36 @@ See examples.

## Future

#### must
#### Must

- improve documentation
- keypad matrix, which key generates which tones

#### should
#### Should

- test setup
- add examples
- DMTF with a PCF8574
- DMTF as secret key
- DMTF with less keys (less pins)
- DMTF over interrupt triggered by STQ line

#### could
#### Could

- buffer like Serial? (how to fill? interrupt? example sketch?)
- read part of stream interface?
- DMTF tone generation?
- MCP_DAC
- PWM + HW?

#### 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,

2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/MT8870.git"
},
"version": "0.1.5",
"version": "0.1.6",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MT8870
version=0.1.5
version=0.1.6
author=Rob Tillaart <[email protected]>
maintainer=Rob Tillaart <[email protected]>
sentence=Arduino library for MT8870 DTMF decoder
Expand Down

0 comments on commit e323750

Please sign in to comment.