RCA Unit
Unit RCA is a female jack terminal block for transmitting composite video (audio or video), one of the most common A/V connectors, which transmits video or audio signals from a component device to an output device (i.e., a display or speaker).
Support the following products:
Micropython Example:
1# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD 2# 3# SPDX-License-Identifier: MIT 4 5import os, sys, io 6import M5 7from M5 import * 8from unit import RCAUnit 9 10 11label0 = None 12label1 = None 13rca_0 = None 14 15 16def setup(): 17 global label0, label1, rca_0 18 19 M5.begin() 20 Widgets.fillScreen(0x222222) 21 label0 = Widgets.Label("Core2", 133, 109, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18) 22 23 rca_0 = RCAUnit( 24 (36, 26), 25 216, 26 144, 27 output_width=0, 28 output_height=0, 29 signal_type=RCAUnit.NTSC, 30 use_psram=0, 31 output_level=0, 32 ) 33 label1 = Widgets.Label("RCA", 88, 61, 1.0, 0xFFFFFF, 0x222222, Widgets.FONTS.DejaVu18, rca_0) 34 35 36def loop(): 37 global label0, label1, rca_0 38 M5.update() 39 40 41if __name__ == "__main__": 42 try: 43 setup() 44 while True: 45 loop() 46 except (Exception, KeyboardInterrupt) as e: 47 try: 48 from utility import print_error_msg 49 50 print_error_msg(e) 51 except ImportError: 52 print("please update to latest firmware")
UIFLOW2 Example:
class RCAUnit
Constructors
- class RCAUnit(port: tuple =(36, 26), width: int = 216, height: = int 144, output_width: int = 216, output_height: = int 144, signal_type: int = 0, use_psram: int = 0, output_level: int = 0)
Initialize the Unit RCA
- 参数:
port (tuple) – The port to which the Unit RCA is connected. port[0]: not used, port[1]: dac pin.
width (int) – The width of the RCA display.
height (int) – The height of the RCA display.
output_width (int) – The width of the output of the RCA display.
output_height (int) – The height of the output of the RCA display.
signal_type (int) – The signal type of the RCA display. NTSC=0, NTSC_J=1, PAL=2, PAL_M=3, PAL_N=4.
use_psram (int) – The use of psram of the RCA display.
output_level (int) – The output level of the RCA display.
UIFLOW2:


