19. nqSpresense
The nqSpresense object is a built-in object that provides Spresense specific features.
Functional overview:
- Provides functions to acquire device specific information.
- Provides functions to control device specific configurations.
nqSpresense Global Object
Methods()/Properties | Summary | Version | Note |
---|---|---|---|
nqSpresense.getVersion() | Gets the firmware version. | 01.00.00+ | |
nqSpresense.getSerialID() | Gets the serial ID. | 01.00.00+ | |
nqSpresense.getModuleType() | Gets the module type. | 01.00.00+ | |
nqSpresense.getNetType() | Gets the communication type. | 01.00.00+ | |
nqSpresense.configureSystemLED() | Sets the operation of the system LEDs. | 02.00.00+ |
Details
nqSpresense.getVersion()
Gets the firmware version.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Firmware version |
nqSpresense.getSerialID()
Gets the serial ID.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Serial ID |
nqSpresense.getModuleType()
Gets the module type.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Module type'WiFi' ,'LteM' |
nqSpresense.getNetType()
Gets the communication type.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Communication type'WiFi' ,'LteM' |
nqSpresense.configureSystemLED(config)
Sets the operation of the system LEDs.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
config | number | mandatory | System LED operation setting 0: Normal operation 1: Forced off | This setting value is stored on the device's backup RAM, so the operation based on the setting value be maintained as long as the power supply continues. If the power supply is lost, it returns to the default value 0 . |
return | undefined | - | - |
Object Usage Examples
Sample 1
This is a sample that gets and displays the firmware version, serial ID, module type, and communication type.
var fwVersion = nqSpresense.getVersion();
var serialID = nqSpresense.getSerialID();
var modType = nqSpresense.getModuleType();
var netType = nqSpresense.getNetType();
print('<<<' + fwVersion + '>>>');
print('<<<' + serialID + '>>>');
print('<<<' + modType + '>>>');
print('<<<' + netType + '>>>');
Updated: 2022-06-03