obniz Docs
  • obniz.com
  • Developer's Console
  • Guides
  • Reference

obniz.js, Device Control

  • Overview
  • Class Obniz
    • Obniz.M5StickC
    • Obniz.M5StackBasic
  • Connection
    • Disconnection And Reset
    • Multiple Connection
    • Local Connect
    • Closed Network
    • compatibility
  • Wait and Repeat
  • PartsLibrary
    • Import hosted parts
    • Create owned parts
  • IO
    • Output
    • Input
    • DriveMethod
    • Pull-up-down
  • IO-Animation
  • AD
  • PWM
    • Modulation
  • UART
    • Send
    • Receive
  • SPI
    • Master Read/Write
  • I2C
    • Master Read/Write
    • Slave Read
  • LogicAnalyzer
  • Measurement
  • Display
  • Switch
  • Sleep
  • TCP
  • Wi-Fi
  • BLE
    • Central: Scan
    • Central: Advanced conditional scanning
    • Central: Connection
    • Central: Pairing
    • Central: Services and characteristics
    • Central: Read and Write
    • Central: Receiving change notifications
    • Peripheral: Advertisement
    • Peripheral: Services and characteristics registration
    • Peripheral: Monitoring update
    • Peripheral: Update values
    • Peripheral: Notification of value change
  • Connected Network
  • Metadata
  • Messaging
  • App
  • Plugin
  • Changelog
obniz Docs Reference obniz.js, Device Control Plugin

Plugin

Plug-in class リファレンス

The plugin allows you to create an obnizOS with your own code.
This class allows you to send and receive data to and from your program running on the device.

onreceive

Receives the binary sequence sent by the plugin.

obniz.plugin.onreceive = (data) => {
  console.log(data);
};

send()

obniz.js sends a binary sequence to the plugin.

obniz.plugin.send("obniz.js send data get device?")
obniz.plugin.send([0x00, 0x01, 0x02])

Doc navigation

← App Changelog →
© 2020 obniz Docs
IoT for all developer with just obniz | iot.obniz.com

タイトル

本文