Skip to content

Handling serial disconnect #2

Open

Description

@alexcroox

I'm using this with a Bluetooth module and everything is working great. I'd like to be able to detect when the BT serial loses connection though so I can stop my robot from moving, is this possible?

Activity

  1. sworteu commented on Dec 27, 2013

    @sworteu

    I Believe it's best to use a timer or some kind of timeout function.

    There is no way to know if bluetooth has lost the connection other than
    using system apis on a host computer.
    If you do two-way-timeout it will be much better.

    For example on your host computer software setup a timer for 500ms. and on
    the arduino use milliseconds in a loop or so.
    Then you might know it has lost connection.

    2013/12/27 Alex Crooks notifications@github.com

    I'm using this with a Bluetooth module and everything is working great.
    I'd like to be able to detect when the BT serial looses connection though
    so I can stop my robot from moving, is this possible?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/2
    .

    Met vriendelijke groet,
    Derk Jochems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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