You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-7Lines changed: 39 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
JT65/JT9/WSPR Encoder Library for Arduino
2
-
=========================================
3
-
This library very simply generates a set of channel symbols for JT65, JT9, or WSPR based on the user providing a properly formatted Type 6 message for JT65or JT9 (which is 13 valid characters) or a callsign, Maidenhead grid locator, and power output for WSPR. When paired with a synthesizer that can output frequencies in fine, phase-continuous tuning steps (such as the Si5351), then a beacon or telemetry transmitter can be created which can change the transmitted characters as needed from the Arduino.
1
+
JT65/JT9/JT4/WSPR Encoder Library for Arduino
2
+
=============================================
3
+
This library very simply generates a set of channel symbols for JT65, JT9, JT4, or WSPR based on the user providing a properly formatted Type 6 message for JT65, JT9, or JT4 (which is 13 valid characters) or a callsign, Maidenhead grid locator, and power output for WSPR. When paired with a synthesizer that can output frequencies in fine, phase-continuous tuning steps (such as the Si5351), then a beacon or telemetry transmitter can be created which can change the transmitted characters as needed from the Arduino.
4
4
5
5
Please feel free to use the issues feature of GitHub if you run into problems or have suggestions for important features to implement.
6
6
@@ -16,11 +16,11 @@ Include the JTEncode library into your instance of the Arduino IDE. Download a Z
16
16
17
17
Example
18
18
-------
19
-
There is a simple example that is placed in your examples menu under JTEncode. Open this to see how to incorporate this library with your code. The example provided with with the library is meant to be used in conjuction with the [Etherkit Si5351A Breakout Board](https://www.etherkit.com/rf-modules/si5351a-breakout-board.html), although it could be modified to use with other synthesizers which meet the technical requirements of the JT65/JT9/WSPR modes.
19
+
There is a simple example that is placed in your examples menu under JTEncode. Open this to see how to incorporate this library with your code. The example provided with with the library is meant to be used in conjuction with the [Etherkit Si5351A Breakout Board](https://www.etherkit.com/rf-modules/si5351a-breakout-board.html), although it could be modified to use with other synthesizers which meet the technical requirements of the JT65/JT9/JT4/WSPR modes.
20
20
21
21
To run this example, be sure to download the [Si5351Arduino](https://github.com/etherkit/Si5351Arduino) library and follow the instructions there to connect the Si5351A Breakout Board to your Arduino. In order to trigger transmissions, you will also need to connect a momentary pushbutton from pin 12 of the Arduino to ground.
22
22
23
-
The example sketch itself is fairly straightforward. JT65, JT9, and WSPR modes are modulated in same way: phase-continuous multiple-frequency shift keying (MFSK). The message to be transmitted is passed to the JTEncode method corresponding to the desired mode, along with a pointer to an array which holds the returned channel symbols. When the pushbutton is pushed, the sketch then transmits each channel symbol sequentially as an offset from the base frequency given in the sketch define section.
23
+
The example sketch itself is fairly straightforward. JT65, JT9, JT4, and WSPR modes are modulated in same way: phase-continuous multiple-frequency shift keying (MFSK). The message to be transmitted is passed to the JTEncode method corresponding to the desired mode, along with a pointer to an array which holds the returned channel symbols. When the pushbutton is pushed, the sketch then transmits each channel symbol sequentially as an offset from the base frequency given in the sketch define section.
24
24
25
25
An instance of the JTEncode object is created:
26
26
@@ -44,6 +44,12 @@ On sketch startup, the mode parameters are set based on which mode is currently
44
44
symbol_count = JT65_SYMBOL_COUNT; // From the library defines
45
45
tone_spacing = JT65_TONE_SPACING;
46
46
break;
47
+
case MODE_JT4:
48
+
freq = JT4_DEFAULT_FREQ;
49
+
ctc = JT4_CTC;
50
+
symbol_count = JT4_SYMBOL_COUNT; // From the library defines
51
+
tone_spacing = JT4_TONE_SPACING;
52
+
break;
47
53
case MODE_WSPR:
48
54
freq = WSPR_DEFAULT_FREQ;
49
55
ctc = WSPR_CTC;
@@ -65,12 +71,15 @@ During transmit, the proper class method is chosen based on the desired mode, th
65
71
case MODE_JT65:
66
72
jtencode.jt65_encode(message, tx_buffer);
67
73
break;
74
+
case MODE_JT4:
75
+
jtencode.jt4_encode(message, tx_buffer);
76
+
break;
68
77
case MODE_WSPR:
69
78
jtencode.wspr_encode(call, loc, dbm, tx_buffer);
70
79
break;
71
80
}
72
81
73
-
Once the channel symbols have been generate, it is a simple matter of transmitting them in sequence, each of the correct amount of time:
82
+
Once the channel symbols have been generated, it is a simple matter of transmitting them in sequence, each the correct amount of time:
74
83
75
84
// Now transmit the channel symbols
76
85
for(i = 0; i < symbol_count; i++)
@@ -111,6 +120,21 @@ Public Methods
111
120
*/
112
121
```
113
122
123
+
###jt4_encode()
124
+
```
125
+
/*
126
+
* jt4_encode(char * message, uint8_t * symbols)
127
+
*
128
+
* Takes an arbitrary message of up to 13 allowable characters and returns
129
+
* a channel symbol table.
130
+
*
131
+
* message - Plaintext Type 6 message.
132
+
* symbols - Array of channel symbols to transmit retunred by the method.
133
+
* Ensure that you pass a uint8_t array of size JT4_SYMBOL_COUNT to the method.
134
+
*
135
+
*/
136
+
```
137
+
114
138
###wspr_encode()
115
139
```
116
140
/*
@@ -132,8 +156,16 @@ Here are the defines, structs, and enumerations you will find handy to use with
Many thanks to Joe Taylor K1JT for his innovative work in amateur radio. We are lucky to have him. The algorithms in this program were derived from the source code in the [WSJT](http://sourceforge.net/projects/wsjt/) suite of applications. Also, many thanks for Andy Talbot G4JNT for [his paper](http://www.g4jnt.com/JTModesBcns.htm) on the WSPR coding protocol, which helped me to understand the WSPR encoding process, which in turn helped me to understand the related JT protocols.
164
+
165
+
License
166
+
-------
167
+
JTEncode is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
168
+
169
+
JTEncode is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
170
+
171
+
You should have received a copy of the GNU General Public License along with JTEncode. If not, see <http://www.gnu.org/licenses/>.
0 commit comments