public class Arduino
extends org.sintef.jarduino.JArduino
Constructor and Description |
---|
Arduino(java.lang.String portName)
standard constructor for the Arduino class
|
Modifier and Type | Method and Description |
---|---|
void |
close()
closes the device
|
java.lang.String |
getDeviceName()
returns the name of the device
|
java.lang.String |
getDeviceType()
returns the type of the device
|
java.lang.String |
getDeviceVersion()
returns the version of the device
|
static float |
getLibraryVersion() |
int |
getMotorCount()
returns the number of servo motors controlled by the Arduino
|
int |
getSensorRawValue(int theChannel)
returns the sensor value for the device on one channel.
|
int |
getSerialNumber()
returns the serial number of the device
|
void |
initialize() |
static void |
listLibraryVersion() |
protected void |
loop() |
static void |
main(java.lang.String[] args) |
void |
setDeviceName(java.lang.String deviceName)
sets the sname of the device
|
void |
setDeviceType(java.lang.String deviceType)
sets the type of the device
|
void |
setDeviceVersion(java.lang.String deviceVersion)
sets the version of the device
|
void |
setLibraryVersion(float libraryVersion) |
void |
setPosition(int channel,
double position) |
void |
setSerialNumber(int serialNumber)
sets the serial number of the device
|
protected void |
setup() |
delay, interrupt0, interrupt1, map, receiveInterruptNotification, runArduinoProcess, stopArduinoProcess
public Arduino(java.lang.String portName)
public void initialize()
public java.lang.String getDeviceName()
public void setDeviceName(java.lang.String deviceName)
name
- public java.lang.String getDeviceType()
public void setDeviceType(java.lang.String deviceType)
type
- public java.lang.String getDeviceVersion()
public void setDeviceVersion(java.lang.String deviceVersion)
version
- public int getSerialNumber()
public void setSerialNumber(int serialNumber)
serial
- numberpublic int getSensorRawValue(int theChannel)
theChannel
- index of the channelpublic int getMotorCount()
public void setPosition(int channel, double position)
public void close()
public static float getLibraryVersion()
public void setLibraryVersion(float libraryVersion)
public static void listLibraryVersion()
protected void setup()
setup
in class org.sintef.jarduino.JArduino
protected void loop()
loop
in class org.sintef.jarduino.JArduino
public static void main(java.lang.String[] args)
RH, 2017