vtac-terminal 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -166,35 +166,35 @@ To play a simple ascending scale:
166
166
  0x07 // Play
167
167
  ```
168
168
 
169
- ### Note Frequencies
170
-
171
- | Note | Hex | Frequency (Hz) | Note | Hex | Frequency (Hz) | Note | Hex | Frequency (Hz) |
172
- |------|--------|----------------|------|--------|----------------|------|--------|----------------|
173
- | C1 | `$01` | 32.70 | C2 | `$0D` | 65.41 | C3 | `$19` | 130.81 |
174
- | C#1 | `$02` | 34.65 | C#2 | `$0E` | 69.30 | C#3 | `$1A` | 138.59 |
175
- | D1 | `$03` | 36.71 | D2 | `$0F` | 73.42 | D3 | `$1B` | 146.83 |
176
- | D#1 | `$04` | 38.89 | D#2 | `$10` | 77.78 | D#3 | `$1C` | 155.56 |
177
- | E1 | `$05` | 41.20 | E2 | `$11` | 82.41 | E3 | `$1D` | 164.81 |
178
- | F1 | `$06` | 43.65 | F2 | `$12` | 87.31 | F3 | `$1E` | 174.61 |
179
- | F#1 | `$07` | 46.25 | F#2 | `$13` | 92.50 | F#3 | `$1F` | 185.00 |
180
- | G1 | `$08` | 49.00 | G2 | `$14` | 98.00 | G3 | `$20` | 196.00 |
181
- | G#1 | `$09` | 51.91 | G#2 | `$15` | 103.83 | G#3 | `$21` | 207.65 |
182
- | A1 | `$0A` | 55.00 | A2 | `$16` | 110.00 | A3 | `$22` | 220.00 |
183
- | A#1 | `$0B` | 58.27 | A#2 | `$17` | 116.54 | A#3 | `$23` | 233.08 |
184
- | B1 | `$0C` | 61.74 | B2 | `$18` | 123.47 | B3 | `$24` | 246.94 |
185
- | --- | ----- | ----- | ---- | ----- | ------ | --- | ----- | ------ |
186
- | C4 | `$25` | 261.63 | C5 | `$31` | 523.25 | C6 | `$3D` | 1046.50 |
187
- | C#4 | `$26` | 277.18 | C#5 | `$32` | 554.37 | C#6 | `$3E` | 1108.73 |
188
- | D4 | `$27` | 293.66 | D5 | `$33` | 587.33 | D6 | `$3F` | 1174.66 |
189
- | D#4 | `$28` | 311.13 | D#5 | `$34` | 622.25 | D#6 | `$40` | 1244.51 |
190
- | E4 | `$29` | 329.63 | E5 | `$35` | 659.25 | E6 | `$41` | 1318.51 |
191
- | F4 | `$2A` | 349.23 | F5 | `$36` | 698.46 | F6 | `$42` | 1396.91 |
192
- | F#4 | `$2B` | 369.99 | F#5 | `$37` | 739.99 | F#6 | `$43` | 1479.98 |
193
- | G4 | `$2C` | 392.00 | G5 | `$38` | 783.99 | G6 | `$44` | 1567.98 |
194
- | G#4 | `$2D` | 415.30 | G#5 | `$39` | 830.61 | G#6 | `$45` | 1661.22 |
195
- | A4 | `$2E` | 440.00 | A5 | `$3A` | 880.00 | A6 | `$46` | 1760.00 |
196
- | A#4 | `$2F` | 466.16 | A#5 | `$3B` | 932.33 | A#6 | `$47` | 1864.66 |
197
- | B4 | `$30` | 493.88 | B5 | `$3C` | 987.77 | B6 | `$48` | 1975.53 |
169
+ ### Bell Frequencies
170
+
171
+ | Note | Hex | Frequency (Hz) | Note | Hex | Frequency (Hz) | Note | Hex | Frequency (Hz) | Note | Hex | Frequency (Hz) |
172
+ |------|--------|----------------|------|--------|----------------|------|--------|----------------|------|--------|----------------|
173
+ | C1 | `$01` | 32.70 | C2 | `$0D` | 65.41 | C3 | `$19` | 130.81 | C4 | `$25` | 261.63 |
174
+ | C#1 | `$02` | 34.65 | C#2 | `$0E` | 69.30 | C#3 | `$1A` | 138.59 | C#4 | `$26` | 277.18 |
175
+ | D1 | `$03` | 36.71 | D2 | `$0F` | 73.42 | D3 | `$1B` | 146.83 | D4 | `$27` | 293.66 |
176
+ | D#1 | `$04` | 38.89 | D#2 | `$10` | 77.78 | D#3 | `$1C` | 155.56 | D#4 | `$28` | 311.13 |
177
+ | E1 | `$05` | 41.20 | E2 | `$11` | 82.41 | E3 | `$1D` | 164.81 | E4 | `$29` | 329.63 |
178
+ | F1 | `$06` | 43.65 | F2 | `$12` | 87.31 | F3 | `$1E` | 174.61 | F4 | `$2A` | 349.23 |
179
+ | F#1 | `$07` | 46.25 | F#2 | `$13` | 92.50 | F#3 | `$1F` | 185.00 | F#4 | `$2B` | 369.99 |
180
+ | G1 | `$08` | 49.00 | G2 | `$14` | 98.00 | G3 | `$20` | 196.00 | G4 | `$2C` | 392.00 |
181
+ | G#1 | `$09` | 51.91 | G#2 | `$15` | 103.83 | G#3 | `$21` | 207.65 | G#4 | `$2D` | 415.30 |
182
+ | A1 | `$0A` | 55.00 | A2 | `$16` | 110.00 | A3 | `$22` | 220.00 | A4 | `$2E` | 440.00 |
183
+ | A#1 | `$0B` | 58.27 | A#2 | `$17` | 116.54 | A#3 | `$23` | 233.08 | A#4 | `$2F` | 466.16 |
184
+ | B1 | `$0C` | 61.74 | B2 | `$18` | 123.47 | B3 | `$24` | 246.94 | B4 | `$30` | 493.88 |
185
+ | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- |
186
+ | C5 | `$31` | 523.25 | C6 | `$3D` | 1046.50 | C7 | `$49` | 2093.00 | | | |
187
+ | C#5 | `$32` | 554.37 | C#6 | `$3E` | 1108.73 | C#7 | `$4A` | 2217.46 | | | |
188
+ | D5 | `$33` | 587.33 | D6 | `$3F` | 1174.66 | D7 | `$4B` | 2349.32 | | | |
189
+ | D#5 | `$34` | 622.25 | D#6 | `$40` | 1244.51 | D#7 | `$4C` | 2489.02 | | | |
190
+ | E5 | `$35` | 659.25 | E6 | `$41` | 1318.51 | E7 | `$4D` | 2637.02 | | | |
191
+ | F5 | `$36` | 698.46 | F6 | `$42` | 1396.91 | F7 | `$4E` | 2793.83 | | | |
192
+ | F#5 | `$37` | 739.99 | F#6 | `$43` | 1479.98 | F#7 | `$4F` | 2959.96 | | | |
193
+ | G5 | `$38` | 783.99 | G6 | `$44` | 1567.98 | G7 | `$50` | 3135.96 | | | |
194
+ | G#5 | `$39` | 830.61 | G#6 | `$45` | 1661.22 | G#7 | `$51` | 3322.44 | | | |
195
+ | A5 | `$3A` | 880.00 | A6 | `$46` | 1760.00 | A7 | `$52` | 3520.00 | | | |
196
+ | A#5 | `$3B` | 932.33 | A#6 | `$47` | 1864.66 | A#7 | `$53` | 3729.31 | | | |
197
+ | B5 | `$3C` | 987.77 | B6 | `$48` | 1975.53 | B7 | `$54` | 3951.07 | | | |
198
198
 
199
199
  ## Installation
200
200
 
@@ -285,6 +285,26 @@ npm run build
285
285
  node ./dist/index.js -p /dev/ttyUSB0
286
286
  ```
287
287
 
288
+ ### Run Test Suite
289
+
290
+ Run all unit tests:
291
+
292
+ ```
293
+ npm test
294
+ ```
295
+
296
+ Run tests in watch mode:
297
+
298
+ ```
299
+ npm run test:watch
300
+ ```
301
+
302
+ Run tests with coverage output (text summary + lcov):
303
+
304
+ ```
305
+ npm run test:coverage
306
+ ```
307
+
288
308
  ### Release Build
289
309
 
290
310
  ```
package/demo/README.md ADDED
@@ -0,0 +1,61 @@
1
+ VT-AC DEMO
2
+ ==========
3
+
4
+ This folder contains a PlatformIO Arduino demo that streams VT-AC instructions over serial to render a startup screen.
5
+
6
+ What the demo does
7
+ ------------------
8
+
9
+ - Resets VT-AC and enables a blinking cursor
10
+ - Prints the VT-AC logo and tagline
11
+ - Draws a 16-color bar using VT-AC foreground color commands
12
+ - Turns the cursor off when finished
13
+
14
+ Project target
15
+ --------------
16
+
17
+ - PlatformIO environment: `nanoatmega328`
18
+ - Board: Arduino Nano (ATmega328, new bootloader)
19
+ - Framework: Arduino
20
+ - Serial baud rate: `9600`
21
+
22
+ Prerequisites
23
+ -------------
24
+
25
+ 1. PlatformIO CLI installed (`pio`) or VS Code + PlatformIO extension.
26
+ 2. Arduino Nano connected by USB.
27
+ 3. VT-AC installed or built from source.
28
+
29
+ Build and upload (PlatformIO CLI)
30
+ ---------------------------------
31
+
32
+ From the repository root:
33
+
34
+ 1. Build the demo:
35
+ - `pio run -d ./demo`
36
+ 2. Upload to the Arduino Nano:
37
+ - `pio run -d ./demo -t upload`
38
+
39
+ If auto-detect fails, specify the upload port:
40
+
41
+ - `pio run -d ./demo -t upload --upload-port /dev/tty.usbserial-XXXX`
42
+
43
+ Run with VT-AC
44
+ --------------
45
+
46
+ 1. Find your serial port on macOS:
47
+ - `ls /dev/tty.usb* /dev/tty.wchusb*`
48
+ 2. Start VT-AC and connect to the same port at `9600` baud:
49
+ - Global install: `vtac -p /dev/tty.usbserial-XXXX -b 9600`
50
+ - From source: `node ./dist/index.js -p /dev/tty.usbserial-XXXX -b 9600`
51
+
52
+ You should see the VT-AC logo, tagline, and color bar rendered by the Arduino sketch.
53
+
54
+ Using VS Code PlatformIO UI
55
+ ---------------------------
56
+
57
+ - Open the `demo` folder in PlatformIO.
58
+ - Select environment `nanoatmega328`.
59
+ - Run **Build**, then **Upload**.
60
+ - Launch VT-AC with the Arduino serial port as shown above.
61
+