Sewrial::println()\ Serial \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

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

Class | Sewrial
Name | ### println()
Examples |
    int data = 0;

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

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

Updated on November 02, 2009 12:17:40am PST