B4J Programming Press on the image to return to the main documentation page.

jMRAA

List of types:

MraaAio
MraaController
MraaI2c
MraaPinDigitalInput
MraaPinDigitalOutput
MraaPwm
MraaSpi
MraaUart

MraaAio


Events:

None

Members:


  Bit As Int

  Initialize (Pin As Long)

  IsInitialized As Boolean

  Read As Int

  ReadFloat As Float

Members description:

Bit As Int
Initialize (Pin As Long)
IsInitialized As Boolean
Read As Int
ReadFloat As Float

MraaController


Events:

None

Members:


  Initialize

Members description:

Initialize

MraaI2c


Events:

None

Members:


  Address (Address As Short)

  Frequency (Mode As String)

  Initialize (Bus As Int)

  IsInitialized As Boolean

  Read (Buffer() As Byte) As Int

  ReadByte As Short

  Write (Data() As Byte)

  WriteByte (Data As Short)

Members description:

Address (Address As Short)
Frequency (Mode As String)
Mode - STD, FAST or HIGH
Initialize (Bus As Int)
IsInitialized As Boolean
Read (Buffer() As Byte) As Int
ReadByte As Short
Write (Data() As Byte)
WriteByte (Data As Short)

MraaPinDigitalInput


Events:

StateChange(State As Boolean)

Members:


  Initialize (EventName As String, PinNumber As Int)

  IsInitialized As Boolean

  State As Boolean [read only]

Members description:

Initialize (EventName As String, PinNumber As Int)
IsInitialized As Boolean
State As Boolean [read only]

MraaPinDigitalOutput


Events:

None

Members:


  Blink (Delay As Long)

  Initialize (PinNumber As Int, State As Boolean)

  IsInitialized As Boolean

  Pulse (Delay As Long)

  State As Boolean

Members description:

Blink (Delay As Long)
The pin state will be set to low for the specified interval (measured in milliseconds).
Initialize (PinNumber As Int, State As Boolean)
Initializes the given pin and sets its initial state.
IsInitialized As Boolean
Pulse (Delay As Long)
The pin state will be set to high for the specified interval (measured in milliseconds).
State As Boolean
Gets or sets the pin state.

MraaPwm


Events:

None

Members:


  Config_Ms (Period As Int, Duty As Float)

  Config_Percent (Period As Int, Duty As Float)

  Enable As Boolean [write only]

  Initialize (Pin As Int)

  IsInitialized As Boolean

  MaxPeriod As Int [read only]

  MinPeriod As Int [read only]

  Period (Period As Float)

  Period_Ms (Ms As Int)

  Period_Us (Us As Int)

  PulseWidth (Seconds As Float)

  PulseWidth_Ms (Ms As Int)

  PulseWidth_Us (Us As Int)

  Read As Float

  Write (Percentage As Float)

Members description:

Config_Ms (Period As Int, Duty As Float)
Config_Percent (Period As Int, Duty As Float)
Enable As Boolean [write only]
Initialize (Pin As Int)
IsInitialized As Boolean
MaxPeriod As Int [read only]
MinPeriod As Int [read only]
Period (Period As Float)
Period_Ms (Ms As Int)
Period_Us (Us As Int)
PulseWidth (Seconds As Float)
PulseWidth_Ms (Ms As Int)
PulseWidth_Us (Us As Int)
Read As Float
Write (Percentage As Float)

MraaSpi


Events:

None

Members:


  BitPerWord (Bits As Long)

  Frequency (Hz As Int)

  Initialize (Bus As Int)

  IsInitialized As Boolean

  LsbMode As Boolean [write only]

  Mode (Mode As Int)

  Write (Data() As Byte) As Byte()

  WriteByte (Data As Short) As Int

Members description:

BitPerWord (Bits As Long)
Frequency (Hz As Int)
Initialize (Bus As Int)
IsInitialized As Boolean
LsbMode As Boolean [write only]
Mode (Mode As Int)
Mode - 0 - 3
Write (Data() As Byte) As Byte()
WriteByte (Data As Short) As Int

MraaUart


Events:

None

Members:


  DataAvailable (Millis As Long) As Boolean

  DevicePath As String [read only]

  Flush

  Initialize (Uart As Int)

  Initialize2 (Path As String)

  IsInitialized As Boolean

  ReadStr (Length As Int) As String

  SetBaudRate (Baud As Long)

  SetFlowControl (XonXoff As Boolean, RtsCts As Boolean)

  SetMode (ByteSize As Int, Parity As String, StopBits As Int)

  SetTimeout (Read As Int, Write As Int, Interchar As Int)

  WriteStr (Data As String) As Int

Members description:

DataAvailable (Millis As Long) As Boolean
Tests whether there is data available.
Millis - Number of milliseconds to wait. Pass 0 to return immediately.
DevicePath As String [read only]
Returns the tty device path.
Flush
Initialize (Uart As Int)
Uart - The index of the uart.
Initialize2 (Path As String)
Path - The path of the serial interface.
IsInitialized As Boolean
ReadStr (Length As Int) As String
SetBaudRate (Baud As Long)
SetFlowControl (XonXoff As Boolean, RtsCts As Boolean)
SetMode (ByteSize As Int, Parity As String, StopBits As Int)
ByteSize - Data bits.
Parity - One of the following values: "NONE", "EVEN", "ODD", "MARK" or "SPACE".
StopBits - Stop bits.
SetTimeout (Read As Int, Write As Int, Interchar As Int)
Read - Read timeout.
Write - Write timeout.
Interchar - Inbetween char timeout.
WriteStr (Data As String) As Int
Writes the string and returns the number of bytes written or -1 if an error occurred.
Top