NEQTO Docs
  • Languages iconEnglish
    • 日本語
  • Docs
  • API
  • FAQ

›neqto.js

Getting Started

  • NEQTO Hello World!
  • Tutorial Step 1. NEQTO Console Setting
  • Tutorial Step 2. Device Settings & Launching Service (NEQTO Bridge)
  • Tutorial Step 2. Device Settings & Launching Service (STM32 Discovery)
  • Tutorial Step 2. Device Settings & Launching Service (SPRESENSE)
  • Tutorial Step 3. Application development using scripts

NEQTO

  • NEQTO Account Registration
  • Sub-accounts
  • API Usage
  • NEQTO CloudSync for GCP
  • NEQTO Engine Firmware List
  • Support Guidelines

NEQTO Console

  • Introduction
  • Fundamentals
  • Administrative Actions
  • Device Management
  • Linux-based Device Management
  • Batch Registration
  • Scripts
  • Actions and Contacts
  • View Data from the Console
  • NEQTO Apps

    • About NEQTO Apps
    • NEQTO Infinitypool
    • NEQTO Insights
    • NEQTO Custodia
    • NEQTO Flow
  • Machine Driver
  • Recommended Browsers
  • Billing Information

SPRESENSE

    Hardware Specifications

    • 01. About Spresense

    Software Specifications

    • 01. Operational Flow
    • 02. Initial Installation
    • 03. Spresense Wi-Fi Initial Setup
    • 04. Spresense LTE-M Initial Setup
    • 05. Debug Log Acquisition
    • 06. System LED Indications
    • 07. Event Messages
    • 08. Updating Firmware

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. Sleep
    • 10. RTC
    • 11. GPIO
    • 12. UART
    • 13. SPI
    • 14. I2C
    • 15. ADC
    • 16. GNSS
    • 17. Camera
    • 18. Utils
    • 19. nqSpresense
    • 20. nqService
    • 21. nqMqtt
    • 22. nqFOTA
    • 23. nqWiFi
    • 24. nqLte

STM32 Discovery

    Hardware Specifications

    • 01. About STM32 Discovery Kit (B-L4S5I-IOT01A)

    Software Specifications

    • 01. Operational Flow
    • 02. Initial Installation
    • 03. STM32 Discovery Wi-Fi Initial Setup
    • 04. Debug Log Acquisition
    • 05. System LED Indications
    • 06. Event Messages
    • 07. Updating Firmware

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. Sleep
    • 10. RTC
    • 11. UserSW
    • 12. GPIO
    • 13. UART
    • 14. SPI
    • 15. I2C
    • 16. ADC
    • 18. Utils
    • 19. nqDiscovery
    • 20. nqService
    • 21. nqMqtt
    • 22. nqFOTA
    • 23. nqWiFi

NEQTO Bridge

    Hardware Specifications

    • 01. NEQTO Bridge Module
    • 02. NEQTO Bridge Wi-Fi Module
    • 03. NEQTO Bridge LTE-1 Module
    • 04. NEQTO Bridge LTE-M/NB Module
    • 05. NEQTO Bridge IO Board
    • 06. NEQTO Bridge Digital IO Board
    • 07. NEQTO Bridge Connector Board

    Software Specifications

    • 01. Operational Flow
    • 02. NEQTO Bridge Wi-Fi Module Initial Setup
    • 03. NEQTO Bridge LTE Module Initial Setup
    • 04. Debug Log Acquisition
    • 05. System LED Indications
    • 06. Event Messages
    • 07. Updating Firmware

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. Sleep
    • 10. RTC
    • 11. UserSW
    • 12. GPIO
    • 13. UART
    • 14. SPI
    • 15. I2C
    • 16. ADC
    • 17. BLE
    • 18. Utils
    • 19. nqBridge
    • 20. nqService
    • 21. nqMqtt
    • 22. nqFOTA
    • 23. nqWiFi
    • 24. nqLte
    • 25. nqLAN
    • 26. nqEx

Linux-based device

    Software Specifications

    • 01. System Requirements
    • 02. Installation
    • 03. Software Configurations
    • 04. Operational Flow
    • 05. Debug Log Acquisition
    • 06. Event Messages
    • 07. Updating Software

    neqto.js

    • 01. About neqto.js
    • 02. Log
    • 03. Timers
    • 04. HTTP
    • 05. HTTPS
    • 06. MQTT
    • 07. Secure
    • 08. Storage
    • 09. RTC
    • 10. UNIXSocket
    • 11. FileSystem
    • 12. SubProcess
    • 13. Utils
    • 14. nqLinux
    • 15. nqService
    • 16. nqMqtt
    • 17. nqFOTA
    • 18. nqLAN

neqto.js Libraries

  • About neqto.js Libraries
  • UART

    • GM65 Barcode Reader
    • SRF Ultrasonic Range Finder - Serial Mode

    I2C

    • HTS221 v2 Temperature and Humidity Sensor
    • LIS2DW12 v2 Accelerometer
    • SRF Ultrasonic Range Finder - I2C Mode
    • [Archive] HTS221 Temperature and Humidity Sensor
    • [Archive] LIS2DW12 Accelerometer

    Utils

    • RTC Alarm Synchronized Scheduler

    Integration

    • AWS S3 v2
    • AWS IoT Core v2
    • Azure IoT v2
    • GCP IoT Core
    • [Archive] AWS S3
    • [Archive] AWS IoT Core

neqto.js Snippets

  • About neqto.js Snippets
  • DataDog
  • Dropbox
  • Google Sheets
  • InfluxDB
  • Oracle Cloud Object Storage
  • Salesforce
  • SAP Cloud Platform Internet of Things
  • Splunk
  • Niagara

Release Notes

  • NEQTO Console Updates
  • NEQTO Firmware (Bridge Wi-Fi/LTE Module) Releases
  • NEQTO Firmware (STM32 Discovery Wi-Fi) Releases
  • NEQTO Firmware (Spresense Wi-Fi/LTE-M) Releases
  • NEQTO Engine for Linux Releases

26. nqEx

The nqEx object is a built-in object that controls the hardware interface and functions on NEQTO Bridge IO Board and NEQTO Bridge Digital IO Board.

Limitations:

  • It can be used only when using NEQTO Bridge IO Board or NEQTO Bridge Digital IO Board.
    ".getBoardType()" can be used regardless of the hardware configuration.



nqEx Global Object

Methods()/PropertiesSummaryVersionnote
.getBoardType()Gets the IO Board type.00.00.27+
.enGPIO()Enables/Disables the GPIO port.00.00.15+
.enUART()Enables/Disables the UART port.00.00.15+
.enI2CS()Enables/Disables the I2C Short port.00.00.15+
.enI2CL()Enables/Disables the I2C Long port.00.00.15+
.enSPI()Enables/Disables the SPI port.01.04.00+
.enADC1()Enables/Disables the ADC1 port.00.00.15+
.enOPA()Enables/Disables the OPA port.00.00.15+
.enI2CMIntOutput()Enables/Disables the I2C Module interrupt signal output.00.00.27+
.enI2CSIntOutput()Enables/Disables the I2C Short interrupt signal output.00.00.27+
.enI2CLIntOutput()Enables/Disables the I2C Long interrupt signal output.00.00.27+
.getGPIO()Gets the enabled/disabled state of the GPIO port.00.00.15+
.getUART()Gets the enabled/disabled state of the UART port.00.00.15+
.getI2CS()Gets the enabled/disabled state of the I2C Short port.00.00.15+
.getI2CL()Gets the enabled/disabled state of the I2C Long port.00.00.15+
.getSPI()Gets the enabled/disabled state of the SPI port.01.04.00+
.getADC1()Gets the enabled/disabled state of the ADC1 port.00.00.15+
.getOPA()Gets the enabled/disabled state of the OPA port.00.00.15+
.getI2CMIntOutput()Gets the enabled/disabled state of the I2C Module interrupt signal output.00.00.27+
.getI2CSIntOutput()Gets the enabled/disabled state of the I2C Short interrupt signal output.00.00.27+
.getI2CLIntOutput()Gets the enabled/disabled state of the I2C Long interrupt signal output.00.00.27+
.getI2CMInt()Gets the interrupt status of the I2C Module.00.00.15+
.getI2CSInt()Gets the interrupt status of the I2C Short.00.00.15+
.getI2CLInt()Gets the interrupt status of the I2C Long.00.00.15+
.getBatteryInfo()Gets the battery information.00.00.24+Option



Details

.getBoardType()

Gets the IO Board type.
Returns the IO Board type detected by the NEQTO Bridge module.

NameTypeM/OSummaryNote
returnnumber-IO Board Type
0: None
1: IO Board
2: Digital IO Board

.enGPIO(sts)

Enables/Disables the GPIO port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enUART(sts)

Enables/Disables the UART port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enI2CS(sts)

Enables/Disables the I2C Short port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enI2CL(sts)

Enables/Disables the I2C Long port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enSPI(sts)

Enables/Disables the SPI port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enADC1(sts)

Enables/Disables the ADC1 port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enOPA(sts)

Enables/Disables the OPA port.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enI2CMIntOutput(sts)

Enables/Disables the I2C Module interrupt signal output.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enI2CSIntOutput(sts)

Enables/Disables the I2C Short interrupt signal output.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.enI2CLIntOutput(sts)

Enables/Disables the I2C Long interrupt signal output.

NameTypeM/OSummaryNote
stsbooleanmandatorytrue: Enabled
false: Disabled
returnboolean-true: Success
false: Failure

.getGPIO()

Gets the enabled/disabled state of the GPIO ports.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getUART()

Gets the enabled/disabled state of the UART port.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getI2CS()

Gets the enabled/disabled state of the I2C Short port.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getI2CL()

Gets the enabled/disabled state of the I2C Long port.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getSPI()

Gets the enabled/disabled state of the SPI port.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getADC1()

Gets the enabled/disabled state of the ADC1 port.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getOPA()

Gets the enabled/disabled state of the OPA port.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getI2CMIntOutput()

Gets the enabled/disabled state of the I2C Module interrupt signal output.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getI2CSIntOutput()

Gets the enabled/disabled state of the I2C Short interrupt signal output.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getI2CLIntOutput()

Gets the enabled/disabled state of the I2C Long interrupt signal output.

NameTypeM/OSummaryNote
returnboolean-true: Enabled
false: Disabled

.getI2CMInt()

Gets the interrupt status of the I2C Module.

NameTypeM/OSummaryNote
returnboolean-true: Interrupt present
false: No interrupts

.getI2CSInt()

Gets the interrupt status of the I2C Short.

NameTypeM/OSummaryNote
returnboolean-true: Interrupt present
false: No interrupts

.getI2CLInt()

Gets the interrupt status of the I2C Long.

NameTypeM/OSummaryNote
returnboolean-true: Interrupt present
false: No interrupts

.getBatteryInfo()

Gets the battery information.

NameTypeM/OSummaryNote
return{batInfo}-{batInfo} : Battery information

{batInfo}

NameTypeSummaryNote
.connbooleanBattery connection status
true: Battery connected
false: Battery disconnected
.statusbooleanBattery status
true: Normal
false: Errors detected
.eventLevelstringEvent level
Indicates the importance of the event message.
'fatal' > 'warn' > 'info'
.messagestringEvent message
empty : Battery is empty
low : Battery level low
half : Battery level half
full : Battery full
charging : Battery is charging
malfunction : Battery failed
This value is valid only when the battery is connected.
.levelnumberBattery level
0: Battery is empty
1: Battery level low
2: Battery level half
3: Battery full
4: Battery is charging
5: Battery failed
This value is valid only when the battery is connected.
.tempnumberBattery temperature level
0: Low temperature
1: Normal temperature
2: High temperature
This value is valid only when the battery is connected.



Object Usage Examples

Sample 1

This is a sample that acquires and displays the current battery state.

var battery = nqEx.getBatteryInfo();
if (battery.conn == true) {
  print('[' + battery.eventLevel + ']'+ battery.message);
  if (battery.status == false) {
      print('battery malfunction detected');
  } else {
      print('battery level           : ' + battery.level);
      print('battery temprature level: ' + battery.temp);
  }
} else {
  print('battery is not connected');
}



Updated: 2021-02-19
← 25. nqLAN01. System Requirements →
  • nqEx Global Object
  • Details
    • .getBoardType()
    • .enGPIO(sts)
    • .enUART(sts)
    • .enI2CS(sts)
    • .enI2CL(sts)
    • .enSPI(sts)
    • .enADC1(sts)
    • .enOPA(sts)
    • .enI2CMIntOutput(sts)
    • .enI2CSIntOutput(sts)
    • .enI2CLIntOutput(sts)
    • .getGPIO()
    • .getUART()
    • .getI2CS()
    • .getI2CL()
    • .getSPI()
    • .getADC1()
    • .getOPA()
    • .getI2CMIntOutput()
    • .getI2CSIntOutput()
    • .getI2CLIntOutput()
    • .getI2CMInt()
    • .getI2CSInt()
    • .getI2CLInt()
    • .getBatteryInfo()
    • {batInfo}
  • Object Usage Examples
    • Sample 1
AboutNewsProductsFAQPrivacy Policy}
NEQTO Console
IntroductionFundamentalsAdministrative ActionsDevice Management NEQTO Apps
NEQTO Bridge
NEQTO Bridge ModuleNEQTO Bridge Wi-Fi ModuleNEQTO Bridge LTE-1 ModuleError Logging Event Messages
API Documentation
API UsageGlobal APIRegional APIAPI Terms of Service
Jigsaw, Inc.
© 2023 JIG-SAW INC.