Skip to content

raspberry pi serialRead doesn't work #10

@qweasd7924

Description

@qweasd7924

Hello, I have same error, link below

https://www.raspberrypi.org/forums/viewtopic.php?t=223658

I call serailRead(int x) and after thap app is looping forever(serialWrite work fine)

    Arduino a = new Arduino("/dev/ttyUSB0",115200);
    boolean isOpen = a.openConnection();
    Thread.sleep(1500);
    if (isOpen) {
        System.out.println("Start,led on");
        a.serialWrite('1');
        System.out.println(a.serialRead());
        wait1(1000);
        a.serialWrite('0');
        wait1(1000);
        a.closeConnection();
    }else {
        System.out.println("No connection");
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions