BLE::UART class of PicoRuby

Singleton methods

new

BLE::UART.new(
      ?role: :peripheral | :central,
      ?name: String,
      ?service_uuid: String,
      ?rx_uuid: String,
      ?tx_uuid: String
    ) -> void

Instance methods

available

instance.available() -> Integer

available?

instance.available?() -> bool

central?

instance.central?() -> bool

connected?

instance.connected?() -> bool

gets_nonblock

instance.gets_nonblock() -> (String | nil)

heartbeat_callback

instance.heartbeat_callback() -> void

packet_callback

instance.packet_callback(String event_packet) -> void

peripheral?

instance.peripheral?() -> bool

puts

instance.puts(?untyped data) -> nil

read_nonblock

instance.read_nonblock(?Integer nbytes) -> (String | nil)

start

instance.start(?Integer? timeout_ms) ?{ () -> void } -> Integer

write

instance.write(untyped data) -> Integer
Tags: class