Skip to content

Commit 91a9129

Browse files
committed
0.3.1 KT0803
1 parent 93d47aa commit 91a9129

File tree

18 files changed

+126
-47
lines changed

18 files changed

+126
-47
lines changed

libraries/KT0803/.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: arduino/arduino-lint-action@v1
9+
- uses: actions/checkout@v5
10+
- uses: arduino/arduino-lint-action@v2
1111
with:
1212
library-manager: update
1313
compliance: strict

libraries/KT0803/.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
timeout-minutes: 20
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- uses: ruby/setup-ruby@v1
1313
with:
1414
ruby-version: 2.6

libraries/KT0803/.github/workflows/jsoncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
paths:
66
- '**.json'
77
pull_request:
8+
paths:
9+
- '**.json'
810

911
jobs:
1012
test:
1113
runs-on: ubuntu-latest
1214
timeout-minutes: 5
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1517
- name: json-syntax-check
1618
uses: limitusus/json-syntax-check@v2
1719
with:

libraries/KT0803/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.3.1] - 2025-11-26
10+
- update GitHub actions
11+
- add derived classes KT0803L and KT0803M (wrappers for now)
12+
- update readme.md
13+
- minor edits
14+
915
## [0.3.0] - 2024-03-27
1016
- fix #5, getChannel()
1117
- fix KT0803K setChannel()

libraries/KT0803/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023-2024 Rob Tillaart
3+
Copyright (c) 2023-2025 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

libraries/KT0803/README.md

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ device like the KT0803 in your projects, either hobby, commercial or otherwise.
2525

2626
## Description
2727

28-
This **experimental** library allows basic control of the KT0803 and / or the KT0803K
28+
**Experimental**
29+
30+
This experimental library allows basic control of the KT0803 and / or the KT0803K
2931
FM transmitter device.
3032
It is primary written to understand the possibilities and the interface of the device.
3133

3234
The library is not tested by me with hardware yet. See future below.
35+
However it is verified to work by others.
3336

3437
There are newer, more capable, follow up devices like model K, L and M.
3538
From these only the KT0803K is supported as a derived class.
@@ -44,7 +47,7 @@ For ATTinyX5 series there exists the TinyKT0803 class which is derived from this
4447
It uses a different I2C implementation. See - https://github.com/RobTillaart/TinyKT0803
4548

4649

47-
#### Hardware
50+
### Hardware
4851

4952
Read datasheet for details.
5053

@@ -68,7 +71,7 @@ The KT0803 is an 3.3 Volt device and cannot be connected directly to 5V MCU's.
6871
```
6972

7073

71-
#### Frequency range
74+
### Frequency range
7275

7376
The frequency range stated on the front page of the datasheet ==> 70 MHz - 108 MHz.
7477
The frequency range stated in table 2 ==> 76 MHz - 108 MHz.
@@ -78,7 +81,7 @@ Keep in mind that the frequency range allowed differs per country.
7881
The library does not provide this filtering, explicit responsibility of the user.
7982

8083

81-
#### Differences
84+
### Differences
8285

8386
The KT0803K device has far more options, which are not all implemented.
8487
There is one important, the resolution or step-size of the frequency.
@@ -93,7 +96,7 @@ According to the datasheet code for the KT0803 should work for the KT0803K.
9396
Code with the KT0803K class will probably not work on a KT0803.
9497

9598

96-
#### Transmit frequency
99+
### Transmit frequency
97100

98101
The transmit frequency can be set with **setFrequency(MHz)** or by **setChannel(channel)**.
99102
Note that the channel and frequency math of the KT0803 and the KT0803K is aligned
@@ -117,7 +120,7 @@ Some examples:
117120
| 108.00 MHz | 2160 |
118121

119122

120-
#### Related
123+
### Related
121124

122125
- https://github.com/RobTillaart/KT0803
123126
- https://github.com/RobTillaart/TinyKT0803
@@ -133,20 +136,24 @@ Some examples:
133136
#include "KT0803.h"
134137
```
135138

136-
#### Constructor
139+
### Constructor
137140

138141
- **KT0803(TwoWire \*wire = &Wire)** constructor,
139142
optional Wire interface.
140143
- **KT0803K(TwoWire \*wire = &Wire)** constructor,
141144
optional Wire interface.
145+
- **KT0803L(TwoWire \*wire = &Wire)** constructor,
146+
optional Wire interface.
147+
- **KT0803M(TwoWire \*wire = &Wire)** constructor,
148+
optional Wire interface.
142149
- **bool begin(float freq = 90.0, bool mute = true)** initializes the library.
143150
Furthermore it checks if the deviceAddress is available on the I2C bus.
144151
Default it sets the frequency to 90 MHz and **mutes the signal**.
145152
Returns true if deviceAddress is found on the bus, false otherwise.
146153
- **bool isConnected()** test to see if deviceAddress is found on the I2C-bus.
147154

148155

149-
#### Frequency
156+
### Frequency
150157

151158
- **bool setFrequency(float MHz)** converts the frequency in MHz to
152159
call **setChannel(channel)**. The value of channel is rounded off depending
@@ -161,7 +168,7 @@ This involves two or three writes to different device registers.
161168
returns it.
162169

163170

164-
#### PGA
171+
### PGA
165172

166173
Read Datasheet.
167174

@@ -185,7 +192,7 @@ Returns false if pga is out of range (0..7).
185192
| 011 | -12dB |
186193

187194

188-
#### RFGain
195+
### RFGain
189196

190197
Read Datasheet.
191198

@@ -218,7 +225,7 @@ Returns false if rfgain is out of range (0..15).
218225
| 1111 | 108.0 dBuV | 112.5 dBuV | default
219226

220227

221-
#### Region selection
228+
### Region selection
222229

223230
Read datasheet for details.
224231

@@ -241,15 +248,15 @@ a wrapper for it.
241248
| 1 | 50 μs | Europe, Australia
242249

243250

244-
#### PilotToneAdjust
251+
### PilotToneAdjust
245252

246253
Read datasheet.
247254

248255
- **bool setPilotToneAdjust(uint8_t mode)** HIGH = 1 LOW = 0
249256
- **uint8_t getPilotToneAdjust()**
250257

251258

252-
#### Mute
259+
### Mute
253260

254261
Default the device is not muted, but **begin()** will default mute it.
255262
See interface section above.
@@ -271,32 +278,31 @@ A minimal hardcoded preset sketch is in the examples.
271278

272279
## Derived classes
273280

274-
A derived class KT0803K class is created, with some extended
275-
functions.
281+
Three derived classes are made:
276282

277-
The KT0803L will work as it is backwards compatible with KT0803K.
278-
It has far more registers in use than the KT0803/K.
283+
- KT0803K has some extended functions.
284+
- KT0803L is backwards compatible with KT0803K.
285+
It has far more registers in use than the KT0803/KT0803K.
286+
For now it is a wrapper around KT0803K.
287+
- KT0803M is identical to the KT0803K (no new registers).
279288

280-
The KT0803M is identical to the KT0803K (no new registers), so
281-
a derived class is straightforward.
282289

283-
284-
## Interface KT0803K
290+
## Interface KT0803K / KT0803L / KT0803M
285291

286292
Added functions in 0.3.0 (not tested), check datasheet.
287293

288-
#### Mono Stereo
294+
### Mono Stereo
289295

290296
- **bool setMono()** idem
291297
- **bool setStereo()** idem
292298
- **bool isStereo()** idem
293299

294-
#### Bass
300+
### Bass
295301

296302
- **bool setBass(uint8_t bass); // 0..3 = 0, 5, 11, 17 dB
297303
- **uint8_t getBass()** idem
298304

299-
#### Misc
305+
### Misc
300306

301307
- **bool powerOK()** idem
302308
- **bool silenceDetected()** idem
@@ -313,21 +319,17 @@ Added functions in 0.3.0 (not tested), check datasheet.
313319

314320
#### Should
315321

316-
- update readme.md
317-
- KT0803K specific functions.
318322
- add examples for KT0803K specific functions.
319-
320-
321-
#### Could
322-
323+
- investigate KT0803L
323324
- RESET pin as optional parameter in constructor?
324325
- SW pin (ON/OFF) as optional parameter in constructor?
325326
- add functions for sw on/off,
326327
- what is impact on settings?
327328
- call begin () again? => default
328329
- explain well doc.
329-
- derived class KT0803M == KT0803K
330-
- derived class KT0803L >= KT0803K (compatible)
330+
331+
#### Could
332+
331333
- improve error handling
332334
- unit tests possible?
333335
- extend settings upon request **bold** are interesting, see table
@@ -353,7 +355,7 @@ Added functions in 0.3.0 (not tested), check datasheet.
353355

354356
#### Wont (for now)
355357

356-
- investigate tea5767 FM receiver (Out of scope for this lib).
358+
- investigate tea5767 FM receiver (Out of scope for this library).
357359
- investigate efficiency of register access.
358360
- caching all (allowed) registers in **begin()**
359361
- 3 bytes for KT0803

libraries/KT0803/examples/KT0803K_minimal/KT0803K_minimal.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ void setup()
1717
{
1818
Serial.begin(115200);
1919
while(!Serial);
20+
Serial.println();
21+
Serial.println(__FILE__);
22+
Serial.print("KT0803_LIB_VERSION: ");
23+
Serial.println(KT0803_LIB_VERSION);
24+
Serial.println();
2025

2126
Wire.begin();
2227

libraries/KT0803/examples/KT0803K_presets/KT0803K_presets.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "KT0803.h"
1111

1212

13-
KT0803K FM_SEND;
13+
KT0803L FM_SEND;
1414

1515
// hardcoded presets adjust to your need.
1616
// note: presets by channel would take half the memory
@@ -24,7 +24,12 @@ float preset[10] =
2424
void setup()
2525
{
2626
Serial.begin(115200);
27-
while (!Serial);
27+
while(!Serial);
28+
Serial.println();
29+
Serial.println(__FILE__);
30+
Serial.print("KT0803_LIB_VERSION: ");
31+
Serial.println(KT0803_LIB_VERSION);
32+
Serial.println();
2833

2934
Wire.begin();
3035

libraries/KT0803/examples/KT0803K_setFrequency/KT0803K_setFrequency.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ void setup()
1717
{
1818
Serial.begin(115200);
1919
while(!Serial);
20+
Serial.println();
21+
Serial.println(__FILE__);
22+
Serial.print("KT0803_LIB_VERSION: ");
23+
Serial.println(KT0803_LIB_VERSION);
24+
Serial.println();
2025

2126
Wire.begin();
2227

libraries/KT0803/examples/KT0803_minimal/KT0803_minimal.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ void setup()
1717
{
1818
Serial.begin(115200);
1919
while(!Serial);
20+
Serial.println();
21+
Serial.println(__FILE__);
22+
Serial.print("KT0803_LIB_VERSION: ");
23+
Serial.println(KT0803_LIB_VERSION);
24+
Serial.println();
2025

2126
Wire.begin();
2227

0 commit comments

Comments
 (0)