119 lines
5.2 KiB
HTML
119 lines
5.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Serial \ Libraries \ Processing 2+</title>
|
|
|
|
<link rel="icon" href="./img/favicon.ico" type="image/x-icon" />
|
|
<link rel="shortcut icon" href="./img/favicon.ico" type="image/x-icon" />
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="Author" content="Processing Foundation" />
|
|
<meta name="Publisher" content="Processing Foundation" />
|
|
<meta name="Keywords" content="Processing, Sketchbook, Programming, Coding, Code, Art, Design" />
|
|
<meta name="Description" content="Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology." />
|
|
<meta name="Copyright" content="All contents copyright the Processing Foundation, Ben Fry, Casey Reas, and the MIT Media Laboratory" />
|
|
|
|
<script src="../../javascript/MM_functions.js" type="text/javascript"></script>
|
|
|
|
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body id="Libraries" onload="" >
|
|
|
|
<!-- ==================================== PAGE ============================ -->
|
|
<div id="container">
|
|
|
|
<!-- ==================================== HEADER ============================ -->
|
|
<div id="header">
|
|
<a href="http://processing.org/" title="Processing.org"><div class="processing-logo" alt="Processing cover"></div></a>
|
|
<form name="search" action="//www.google.com/search" method="get" >
|
|
<!--<label>Search processing.org:</label>-->
|
|
<p><input type="hidden" name="as_sitesearch" value="processing.org" />
|
|
<input type="text" name="as_q" value="" size="20" class="text" />
|
|
<input type="submit" value=" " /></p>
|
|
</form>
|
|
</div>
|
|
<div id="navigation">
|
|
<div class="navBar" id="mainnav">
|
|
<a href="../../index.html">Language</a><br>
|
|
<a href="../../libraries/index.html" class="active">Libraries</a><br>
|
|
<a href="../../tools/index.html">Tools</a><br>
|
|
<a href="../../environment/index.html">Environment</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="TOP" name="TOP"></a>
|
|
|
|
<!-- ==================================== CONTENT - Headers ============================ -->
|
|
<div class="content">
|
|
|
|
|
|
<div class="librarytitle"><h3>Serial</h3></div>
|
|
|
|
<div class="full-alt">
|
|
<p>
|
|
The Serial library reads and writes data to and from external devices one byte at a time. It allows two computers to send and receive data. This library has the flexibility to communicate with custom microcontroller devices and to use them as the input or output to Processing programs. The serial port is a nine pin I/O port that exists on many PCs and can be emulated through USB.
|
|
</p>
|
|
<p>
|
|
Issues related to the Serial library on different platforms are documented on the <a href="https://github.com/processing/processing/wiki/Serial-Issues">Processing Wiki</a>. The source code is available on the <a href="https://github.com/processing/processing/tree/master/java/libraries/serial">processing</a> GitHub repository.
|
|
</p>
|
|
<p>
|
|
When sending data to the console, such as via print() or println(), note that the console is relatively slow. It does not support high-speed, real-time output (such as at 60 frames per second). For real-time monitoring of serial values, render those values to the Processing window during draw().
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="colone-alt">
|
|
<p>
|
|
<h5>Serial</h5>
|
|
<p>
|
|
<a href="Serial.html">Serial</a><br />
|
|
<a href="Serial_available_.html">available()</a><br />
|
|
<a href="Serial_read_.html">read()</a><br />
|
|
<a href="Serial_readChar_.html">readChar()</a><br />
|
|
<a href="Serial_readBytes_.html">readBytes()</a><br />
|
|
<a href="Serial_readBytesUntil_.html">readBytesUntil()</a><br />
|
|
<a href="Serial_readString_.html">readString()</a><br />
|
|
<a href="Serial_readStringUntil_.html">readStringUntil()</a> <br />
|
|
<a href="Serial_buffer_.html">buffer()</a><br />
|
|
<a href="Serial_bufferUntil_.html">bufferUntil()</a><br />
|
|
<a href="Serial_last_.html">last()</a><br />
|
|
<a href="Serial_lastChar_.html">lastChar()</a> <br />
|
|
<a href="Serial_write_.html">write()</a><br />
|
|
<a href="Serial_clear_.html">clear()</a><br />
|
|
<a href="Serial_stop_.html">stop()</a><br />
|
|
<a href="Serial_list_.html">list()</a><br />
|
|
<br />
|
|
</p>
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="twocol-alt">
|
|
|
|
<p>
|
|
<h5>Serial Event</h5>
|
|
<p>
|
|
<a href="serialEvent_.html">serialEvent()</a><br />
|
|
</p>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- ==================================== FOOTER ============================ -->
|
|
<div id="footer">
|
|
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="../../about/people.html">small team of volunteers</a>.</div>
|
|
<div id="colophon">
|
|
|
|
<a href="../../copyright.html">© Info</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|