Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* Pleasedontcode.com **********
- Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- - Terms and Conditions:
- You have a non-exclusive, revocable, worldwide, royalty-free license
- for personal and commercial use. Attribution is optional; modifications
- are allowed, but you're responsible for code maintenance. We're not
- liable for any loss or damage. For full terms,
- please visit pleasedontcode.com/termsandconditions.
- - Project: "Serial Display"
- - Source Code NOT compiled for: Arduino Uno
- - Source Code created on: 2025-06-14 22:45:56
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* It reads video input from pin 9. It processes */
- /* graphics. It outputs composite video from pin 9 */
- /* and pin 7 */
- /****** END SYSTEM REQUIREMENTS *****/
- /* START CODE */
- /****** DEFINITION OF LIBRARIES *****/
- #include <TVout.h> // Include the TVout library for video output
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- /***** DEFINITION OF DIGITAL INPUT PINS *****/
- const uint8_t pico_PIN_D2 = 2; // Define input pin for video input
- const uint8_t videoOutputPin1 = 9; // Define output pin for composite video
- const uint8_t videoOutputPin2 = 7; // Define second output pin for composite video
- /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
- TVout TV; // Create an instance of the TVout class
- void setup(void)
- {
- // put your setup code here, to run once:
- pinMode(pico_PIN_D2, INPUT); // Set the input pin for video input
- pinMode(videoOutputPin1, OUTPUT); // Set the first output pin for composite video
- pinMode(videoOutputPin2, OUTPUT); // Set the second output pin for composite video
- // Initialize TV output
- TV.begin(PAL, 120, 96); // PAL or NTSC
- TV.select_font(font6x8);
- TV.println("Booting...");
- Serial.begin(9600); // Initialize serial communication
- }
- void loop(void)
- {
- // put your main code here, to run repeatedly:
- if (Serial.available()) {
- String msg = Serial.readStringUntil('\n');
- TV.clear_screen();
- TV.println(msg);
- }
- }
- /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement