User Tools

Site Tools


tutorials:arduino:uart

This is an old revision of the document!


Table of Contents

Uart

About this Article

Abstract

Use the arduino commuication with through uart.It is an expamle test the uart inter

re

    String comdata = "";

    void setup()
    {
        Serial.begin(9600);
    }

    void loop()
    {
        while (Serial.available() > 0)
        {
            comdata += char(Serial.read());
            delay(2);
        }
        if (comdata.length() > 0)
        {
            Serial.println(comdata);
            comdata = "";
        }
    }

Headline

Headline

See Also

tutorials/arduino/uart.1395307941.txt.gz · Last modified: 2014/03/20 17:32 by allen