Search wiring.org.co:

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.

Class | Serial
Name |

### print()

Examples |
    int data = 0;

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

    void loop() {
      data = analogRead(0);
      data = data / 4;
      // Print the value stored in
      // the variable data to the serial port
      Serial.print(data);
    }
Description | The print() method writes data to the serial port. This is often helpful for looking at the data a program is producing or to write data to other devices connected to the serial port. The companion method `println` works like `print`, but sends a new line character for each call to the function. Data can either be a single int, float, byte, long, char, char[], String or a number in decimal (DEC), hexadecimal (HEX) , octal (OCT), or binary (BIN) base.
Syntax |
    serial.print(data)
    serial.print(data, base)
Parameters |

data | int, float, long, byte, char, char[] or String
base | DEC, HEX, OCT or BIN
serial | The hardware serial port, it can be Serial, Serial1 or if available Serial 2, Serial3.

Returns | None
Usage | Application

Updated on July 07, 2011 11:08:55pm PDT