Score:0

Minicom not responding for UART communication, Slow response Ubuntu 22.04

rs flag

I am trying to implement a UART communication using Raspberry Pi Pico (RP2040) board. I have run some demo codes which is provided in https://github.com/raspberrypi/pico-examples. I was able to establish UART communication.

#include <stdio.h>
#include "pico/stdlib.h"
#include <string.h>
#include "pico/bootrom.h"

const uint LED_PIN = PICO_DEFAULT_LED_PIN;

int main() {
    stdio_init_all();
      
    char buffer[1024];
    gpio_init(LED_PIN);
    gpio_set_dir(LED_PIN, GPIO_OUT);
    char name[25];
     
    while(1){
        printf("b - blink the LED\nr - reboot the Pico\n");
        scanf("%1024s",buffer);
        printf("%s\n",buffer);
        if(strcmp(buffer,"b")==0)
        {
        int i = 0;
            while(i<10)
            {
            i++;
            gpio_put(LED_PIN,1);
            sleep_ms(250);
            gpio_put(LED_PIN,0);
            sleep_ms(250);
            }
  
        }
        else if(strcmp(buffer, "r") == 0)
        {
            reset_usb_boot(0,0);
        }
        
    }
    return 0;
}

This is the code that I am trying to run now, where LED should blink or boot according to the character entered. It was working fine but suddenly I had an issue where minicom couldn't find the port ttyACM0 and was not displaying any port while running dmesg command. I have fixed it but now minicom screen is displaying,

Welcome to minicom 2.8

OPTIONS: I18n                                                                
Port /dev/ttyACM0, 14:39:20                                                  
                                                                             
Press CTRL-A Z for help on special keys

but it's not reading any character and even if I enter character 'b' to blink LED it takes more than 10 minutes to display and again some minutes to blink the LED. So its getting difficult to test any other code. Please help me I have searched every possible sites but didn't got any solution and some solutions I tried was not working (like changing Hardware flow to No,Checking my port by connecting and disconnecting USB to ensure whether I have given right port etc...). Any suggestions will be appreciated and Thanks in advance.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.