19. nqDiscovery
The nqDiscovery object is a built-in object that provides STM32 Discovery specific features.
Functional overview:
- Provides functions to acquire device specific information.
- Provides functions to control device specific configurations.
nqDiscovery Global Object
Methods()/Properties | Summary | Version | Note |
---|---|---|---|
nqDiscovery.getVersion() | Gets the firmware version. | 01.00.00+ | |
nqDiscovery.getSerialID() | Gets the serial ID. | 01.00.00+ | |
nqDiscovery.getModuleType() | Gets the module type. | 01.00.00+ | |
nqDiscovery.getNetType() | Gets the communication type. | 01.00.00+ | |
nqDiscovery.configureSystemLED() | Sets the operation of the system LEDs. | 02.00.00+ |
Details
nqDiscovery.getVersion()
Gets the firmware version.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Firmware version |
nqDiscovery.getSerialID()
Gets the serial ID.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Serial ID |
nqDiscovery.getModuleType()
Gets the module type.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Module type'WiFi' |
nqDiscovery.getNetType()
Gets the communication type.
Name | Type | M/O | Summary | Note |
---|---|---|---|---|
return | string | - | Communication type'WiFi' |
nqDiscovery.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 = nqDiscovery.getVersion();
var serialID = nqDiscovery.getSerialID();
var modType = nqDiscovery.getModuleType();
var netType = nqDiscovery.getNetType();
print('<<<' + fwVersion + '>>>');
print('<<<' + serialID + '>>>');
print('<<<' + modType + '>>>');
print('<<<' + netType + '>>>');
Updated: 2022-06-03