EasyManuals Logo

Arduino uno User Manual

Arduino uno
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #273 background imageLoading...
Page #273 background image
rather pragmatic approach. (Guess why were using it?) Also, it doesnt have
a lot of bells and whistles yet, but it runs on many platforms and works per-
fectly with the Arduino.
jSSC is completely self-containedthat is, you only need the
jssc.jar
file to get
started with your first project. Download the most current release and make
sure that
jssc.jar
is on your class path. Then enter the following code in your
favorite IDE or text editor:
SerialProgramming/Java/AnalogReader.java
import jssc.SerialPort;
import jssc.SerialPortList;
import jssc.SerialPortException;
public class AnalogReader {
public static void main(String[] args) throws Exception {
if (args.length != 1) {
System.out.println(
"You have to pass the name of a serial port."
);
System.exit(1);
}
try {
SerialPort serialPort = new SerialPort(args[0]);
serialPort.openPort();
Thread.sleep(2000);
serialPort.setParams(
SerialPort.BAUDRATE_9600,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE
);
while (true) {
serialPort.writeString("a0\n");
System.out.println(readLine(serialPort));
}
}
catch (SerialPortException ex) {
System.out.println(ex);
}
}
private static String readLine(SerialPort serialPort) throws Exception {
final int MAX_LINE = 10;
final byte NEWLINE = 10;
byte[] line = new byte[MAX_LINE];
int i = 0;
Appendix 3. Advanced Serial Programming 260
report erratum discuss
www.it-ebooks.info

Table of Contents

Other manuals for Arduino uno

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino uno and is the answer not in the manual?

Arduino uno Specifications

General IconGeneral
Form factorArduino
CertificationRoHS, FC, CE
Processor model-
Processor frequency- MHz
Microcontroller modelATmega328
Microcontroller frequency16 MHz
DC input voltage7-12 V
Operating voltage5 V
DC current per I/O pin40 mA
Flash memory0.032 MB
Maximum internal memory- GB
SRAM (Static Random Access Memory)2 KB
EEPROM (Electrically Erasable Programmable Read-Only Memory)1 KB
Wi-FiNo
Number of analog I/O pins6
Number of digital I/O pins14
Weight and Dimensions IconWeight and Dimensions
Board dimensions53.4 x 68.6 mm

Related product manuals