Skip to content

ThinkNode M6 Outdoor Solar Power for LoRa, Powered By nRF52840 Supports GPS


Model LMM14606D

thinknode_m6_1

Hardware Overview

thinknode_m6_2

Dual SP11 waterproof aviation interfaces support IIC/UART, enabling quick access to various sensors, such as temperature, humidity, gas, and soil sensors etc. the IIC interface is located near the antenna, while the UART interface is positioned further down. You may connect appropriate sensors according to your requirements.

**SP11 waterproof aviation interfaces **Pin Definition Standard:

M6-SP11

IIC Interface:

Pin 1 2 3 4
Function Power Supply+ Ground Signal (SDA) Signal (SCL)
IO port VCC(3.3v) GND P1.09 P0.08

UAR Interface:

Pin 1 2 3 4
Function Power Supply+ Ground Signal (TX) Signal (RX)
IO port VCC(3.3v) GND P0.24 P0.22

Signal load ≤ 0.5A

Commonly used in weather stations, smart agriculture, and outdoor monitoring equipment:

Temperature and Humidity:

SHT20/SHT30/SHT31 Industrial Probe Version (I²C)

AM2315C Industrial Version (I²C)

Gas-related:

CO₂: MH-Z19, SenseAir S8(uart)

TVOC/Formaldehyde: ZG09, ZE08-CH₂O(uart)

Factory Firmware Update Procedure

Currently, based on practical application operations and user feedback, we have completed in-depth optimization and testing of the issue. The new optimized firmware has been uploaded to the cloud server. You can update it by following the steps below:

img

ThinkNode-M6 LoRaWAN Factory Firmware Download and Case Study Videos:

Step-by-Step Factory Firmware Upgrade Tutorial for ThinkNode M6 Lora Outdoor Solar Power

ThinkNode-M6 LoRaWAN Onboarding Full Process: Gateway Network Configuration & Sensor Data Analysis

1. Download the Latest Firmware: https://github.com/Elecrow-RD/ThinkNode-M6-Outdoor-Solar-Power-for-LoRa/tree/master/factory_firmware

factory-firmware-1

2.Update the Firmware:

Connect the USB-C cable, double-click the "Reset" button to enter the programming mode, and wait for the disk to appear. Place the latest firmware file onto the disk.

factory-firmware-2

(Note: Do not delete any original files on the disk. Simply place the new firmware file. The firmware file will not be visible in the disk. After placing the file, restart the device to complete the update.)

firmware-2

Operation Instructions

BUTTON Operation Description
Function Buttoon Single click: Power on Red LED stays on for 5s then turns off
Double click: connect to LoRaWAN network Waiting for connection: Blue LED slow breathing;Connection succeeded: Blue LED flashes quickly 3 times;Connection failed: Red LED flashes quickly 3 times;
Long press for 5 seconds: Power off Red LED flashes quickly 2 times then turns off
Reset Button Single click: Force reset Red LED stays on for 5s then turns off
Double click: enter programming mode /
Operation Description
Device operates normally Red LED flashes once every 5 minutes
Transmit/Receive LoRa data Blue indicator flashes quickly twice
Battery status indicator Charging: Red LED flashes quickly;Fully charged: Red LED stays solid on;Low battery: Red LED flashes 3 times every 2 minutes;

Copy the serial port tool to the desktop and double-click to open it.

image

image

Open the serial port, select the corresponding port, enter the appropriate AT command, and perform the network connection operation.

image

Note: First register your lorawan node on TTN and record the three key elements of the node.

AT Command Introduction:

Set AppEUI:

AT+APPEUI=7777777777777777

Set DevEUI:

AT+DEUI=70B3D57ED0074BFB

Set APPKey:

AT+APPKEY=56A8C1FD08777F2A0D5E64C7A128EF51

Switch Channel:

AT +BAND=0

Join Network OTAA:

AT +JOIN

Send data:

AT +SEND=1:0:1234567893

Set transmission rate after joining network:

AT +DR=2

Project Introduction

ThinkNode-M6 Multi-Sensor Data Collection and TTN Upload Full Process

Case 1: Display Temperature and Humidity Sensor Data via SP11-UART Interface and View It Through Arduino IDE Serial Port

1.1 Hardware Overview

image1

The ThinkNode-M6 is equipped with dual SP11 waterproof aviation connectors, natively supporting IIC/UART communication protocols. It can be quickly adapted to various sensors such as temperature and humidity sensors, gas sensors, and soil sensors, meeting data collection requirements in multiple scenarios. The UART interface is located near the antenna, while the IIC interface is situated close to the Type-C USB port. Users can flexibly select the connection interface according to the communication type of the sensor.

1.2 Hardware Preparation

  1. Core Device: ThinkNode-M6 development board

  2. Peripheral Module: Temperature and humidity sensor module (AHT20,supporting UART communication protocol)

  3. Connection Accessories: Type-C USB data cable

image2

image3

1.3 Hardware Connection Operations

  1. Connect the temperature and humidity sensor module to the SP11-UART interface.

  2. Connect the ThinkNode-M6 to the computer via a Type-C USB data cable (for code burning/debugging).

image4

Align the white alignment marks on both ends of the interface one-to-one.

image5

SP11 Waterproof Aviation Connector Pinout Standard:

image6

SP11-UART Interface Pins:

Pin Function IO port Connection Description
1 Power Supply+ VCC(3.3v) Connect to the positive terminal of the sensor power supply
2 Ground GND Ground connection
3 Signal (TX) P0.24 Connect to the sensor TX pin (data reception)
4 Signal (RX) P0.22 Connect to the sensor RX pin (data transmission)

1.4 Download Arduino IDE

  1. Open the official Arduino website

https://www.arduino.cc/en/software/

  1. Select the corresponding installation package according to your operating system (Windows/macOS/Linux). For Windows systems, or other respective systems, prioritize the stable version of the installation package.

image7

  1. I selected the first option "Windows Win 10 or newer (64-bit)" for download and installation.

image8

  1. Wait for the download to complete.

image9

  1. After the download is finished, double-click the installation package to launch the installer.

  2. Click the "I Agree" option.

image10

  1. As shown in the figure, confirm and click "Next".

image11

  1. Customize the installation path (it is recommended to avoid the C drive system directory, e.g., D:\Arduino), then click "Install" to start the installation.

image12

  1. After the installation is completed, click "Finish" and launch the Arduino IDE.

image13

1.5 Install Adafruit nRF52 BSP Version 1.6.1

Step 1: Configure Additional Boards Manager URLs

1. Open the Arduino IDE and click File → Preferences in the top menu bar.

image13

2. In the Additional Boards Manager URLs input box, paste the following address:

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

3. Click OK to save the settings, then restart the Arduino IDE for the configuration to take effect.

image15

Step 2: Install the Specified BSP Version

  1. After restarting, click Tools → Board → Boards Manager in the top menu bar.

image16

  1. Enter Adafruit nRF52 in the search box to filter out Adafruit nRF52 by Adafruit;Click the version drop-down menu, select 1.6.1, then click Install to start the installation.

image17

  1. After installation is complete, click Tools → Board → Adafruit nRF52 → Nordic nRF52840 DK again to finish the board configuration.

image18

Troubleshooting Common Issues:

If Adafruit nRF52 cannot be found in the search results:

1. Check the computer proxy settings: Open Settings → Network & Internet → Proxy in the system, and record the local address (e.g., 127.0.0.1) and port number (e.g., 1080).

image19

2. Return to the Arduino IDE Preferences, click Network Config, and enter the recorded local host address and port number.

image20

3. Click OK, restart the Arduino IDE, then open the Boards Manager again to search for Adafruit nRF52 and proceed with the installation.

1.6 Library Installation

*Step 1: Download Required Libraries*

Two core libraries are required for the four cases: BH1750 (light sensor) and RadioLib (LoRaWAN communication). Obtain them through the following methods:

image21

*Download links for libraries in the case project:*https://github.com/Elecrow-RD/ThinkNode-M6-Outdoor-Solar-Power-for-LoRa/tree/master/demo_code/libraries

*Method 1: Install via Arduino IDE Library Manager (Recommended)*

Click *Sketch → Include Library → Manage Libraries*, search for *BH1750* and *RadioLib* respectively, and select the latest stable version for installation.

*Method 2: Manual Download and Installation*

Download the library zip files from the official repositories (BH1750:https://github.com/claws/BH1750;RadioLib:https://github.com/jgromes/RadioLib),unzip them, and copy the folders to the Arduino library directory.

*Step 2: Verify Library File Path*

  1. Open Arduino IDE Preferences and check the Sketchbook location. The default paths are as follows:

image22

Windows:C:\Users [Username]\Documents\Arduino

macOS:/Users/[Username]/Documents/Arduino

  1. Navigate to the libraries folder under this path and confirm that the downloaded libraries (BH1750, RadioLib) have been placed inside. If not, copy them manually and restart the Arduino IDE.

Copy the required library files to the libraries folder.

image23

image24

1.7 Configure Programming Environment

1. Download the sample project files via the link below.

Sample project link:https://github.com/Elecrow-RD/ThinkNode-M6-Outdoor-Solar-Power-for-LoRa/tree/master/demo_code

Open and unzip the downloaded project to get the Serial2_test folder (which contains the core code for temperature and humidity collection).

image25

2. Launch the Arduino IDE.

3. Board Selection: Click「Tools」→「Board」→「Adafruit nRF52」→「Nordic nRF52840 DK」

image26

4. Serial Port Selection:

Connect the ThinkNode-M6 to the computer using a Type-C USB data cable. After the system recognizes the serial port, click Tools → Port and select the corresponding serial port number (the port used here is COM24, which can be viewed in Device Manager → Ports (COM & LPT) on the computer).

image27

1.8 Upload Code and Verify

  1. Click the Upload button at the top of the Arduino IDE and wait for the code to compile and upload to the ThinkNode-M6.

image28

  1. After the upload is completed, click Tools → Serial Monitor, and set the baud rate to 9600.

image29

  1. Verify the result: The serial monitor prints temperature and humidity data every second, with the format example as follows.

image30

*Core Logic:* Use SoftwareSerial to perform two-way communication with external sensors (temperature and humidity sensor) /devices:

Send a command every second to trigger data reading, parse the received temperature and humidity data, and finally output the parsed results to the hardware serial monitor, thus successfully printing the data information of the temperature and humidity sensor.

Case 2: Display Light Intensity Data Based on the SP11 - IIC Interface and View It via the Arduino IDE Serial Port

1.1 Hardware Preparation

  1. Core Device: ThinkNode - M6 Development Board
  2. Peripheral Module: Crowtail Light Sensor (BH1750 Digital Light Intensity Sensor)
  3. Connection Accessory: USB Type - C Data Cable

image31

image32

1.2 Hardware Connection Operations

  1. Connect the light sensor module to the SP11-IIC interface.
  2. Connect the ThinkNode-M6 to the computer via a Type-C USB data cable (for code burning/debugging).

image33

Align the white alignment marks on both ends of the interface one-to-one.

image34

SP11 Waterproof Aviation Connector Pinout Standard:

image35

SP11-IIC Interface Pins:

*Pin* *Function* *IO port* *Connection Description*
1 Power Supply+ VCC(3.3v) Connect to the positive terminal of the sensor power supply
2 Ground GND Ground connection
3 Signal (SDA) P1.09 Connect to the sensor SDA pin
4 Signal (SCL) P0.08 Connect to the sensor SCL pin

1.3 *Configure Programming Environment*

1. Click the link below to download the sample project files.

Sample project file download link:https://github.com/Elecrow-RD/ThinkNode-M6-Outdoor-Solar-Power-for-LoRa/tree/master/demo_code

Download the sample project files: Obtain the LightSensor folder (light intensity collection code) and extract it to the local directory.

image36

2. Launch the Arduino IDE.

3. Board Selection:「Tools」→「Board」→「Adafruit nRF52」→「Nordic nRF52840 DK」.

image37

4. Serial Port Selection: After connecting the Type-C data cable, click Tools → Port and select the corresponding serial port number (e.g., COM24).

image38

1.4 Upload Code and Verify

  1. Click the Upload button to upload the code and wait for the upload to complete.

image39

  1. After successful operation, open the Serial Monitor and set the baud rate to 115200.

image40

  1. Verify the result:

The serial monitor continuously prints the light intensity data.

image41

****Core Logic:****Continuously collect ambient light intensity data via the BH1750 digital light intensity sensor, periodically read the raw light intensity data through the IIC interface (once per second), convert the data into the unit of lux, and output the results to the serial monitor.

Case 3: ThinkNode-M6 Uploads Data to TTN Server via ThinkNode G1 (Network Access Detection)

1.1 Hardware Preparation

  1. Gateway Device: ThinkNode G1 LoRa Gateway (including LoRa Antenna and Power Adapter)
  2. Node Device: ThinkNode-M6
  3. Connection Accessories: Type-C USB Data Cable, Ethernet Cable (Ethernet Configuration Optional)

image42

image43

1.2 Hardware Connection Operation

ThinkNode-M6 → Type-C USB Data Cable → Computer (Code Burning / Debugging)

image44

1.3 ThinkNode-G1 Gateway Network Configuration

Step 1: Hardware Startup

Connect the LoRa Antenna and Power Adapter to the gateway. The power indicator will turn green; after approximately 15 seconds, the top indicator will flash green, indicating that the gateway is starting up.

image45

image46

Step 2: Gateway Network Connection Configuration (Three Options Available)

Method 1: Ethernet Connection (Recommended, Highest Stability)

Method 2: Wi-Fi Connection

Method 3: 4G Cellular Network (4G version only)

*Configuration details refer to the official document link below:*

*The LR1262 Node Board uploads data to TTN server via Thinknode G1*

https://www.elecrow.com/wiki/ThinkNode_G1_Indoor_8_Channels_LoRaWAN_Gateway_Powered_By_SX1302_Chip.html#getting-started-quickly-with-the-gateway

1.4 Deploy G1 Gateway on TTN Platform

Step 1: Log in to TTN Platform

Visit the official website of The Things Stack (TTN):

https://console.cloud.thethings.network/

Log in with your existing account; if you do not have an account, click Register to complete the registration (email verification is required).

image47

image48

Step 2: Register Gateway

  1. After logging in, click 「Gateways」→「Add Gateway」in the left-side menu bar.

image49

  1. Register the gateway, fill in the EUI, and then click Confirm.

image50

  • Gateway ID: Generally consists of letters (e.g., eui-gateway-eui) (The ID must contain only lowercase letters, numbers, and hyphens). Note that all letters in the Gateway EUI must be converted to lowercase.
  • Gateway Name: The name assigned to the gateway.
  • Frequency Plan: Select the corresponding frequency based on your gateway version.

image51

  1. Click Register gateway

image52

  1. After successful registration, you can view the gateway information in the Overview page.

image53

Step 3: Activate Gateway

  1. Double-click the gateway settings button; after the restart is completed, the gateway status will change to Connected.

image54

  1. The gateway is now connected to TTN as a packet forwarder

image55

1.5 Create TTN Node Application

Step 1: Create a New Application

  1. Log in to the TTN Platform and click「Applications」→「Add Application」in the left-side menu bar.

image56

  1. Fill in the application information

Enter the Application ID and Application Name, then click Create application.

image57

Step 2: Register End Device

Go to the application overview page, click Register end device at the bottom left corner, and register a new device on the TTN Platform.

image58

Step 3: Select Manual Configuration Mode

On the Register end device page, click the option Enter end device specifics manually.

image59

Step 4: Configure Device Parameters

Set the Frequency Plan, LoRaWAN Version, Regional Parameters Version, and JoinEUI (APPEUI).

*Note: JoinEUI is the Same as AppEUI*

image60

Set the JoinEUI (APPEUI).

image61

Step 5: Configure Advanced Parameters

Click Show advanced activation, LoRaWAN class and cluster settings to configure parameters such as activation mode and device operation mode.

image62

Configure it to OTAA mode (i.e., the default mode).

image63

Then click Confirm.

image64

Step 6: Configure End Device Parameters and Complete Registration:

  1. Click the Generate button to automatically generate DevEUI.

image65

  1. Click the Generate button to automatically generate the Application Key (AppKey).

image66

  1. Enter the End Device ID.

image67

  1. Click Register end device.

image68

*Key Reminder: Be sure to save the three parameters: JoinEUI, DevEUI, and AppKey. The subsequent node code configuration must match them exactly.*

OTAA device registration is successful.

image69

Step 7: Configure Device Network Access Permissions

*Note: Since LoRaWAN does not allow repeated network access, the node can test network access indefinitely when the used DevNonce is ignored.*

1.Click Applications → Application Name.

image70

  1. Click Device Name → Settings.

image71

  1. Scroll down to the bottom of the page and select Join Settings.

image72

  1. Enable Resets join nonces, check the Enabled box, and click Save changes.

image73

1.6 Establish Network Communication Between Gateway and Node

*Prerequisites:*

  1. A ThinkNode-G1 Gateway has been created on the Internet of Things network (TTN), and it has been connected and is operating normally.

  2. A node application (OTAA/ABP) corresponding to the gateway frequency band range has been created on TTN.

  3. The ThinkNode-M6 has been connected to the LoRa Antenna and GPS Antenna.

1.7 *Configure Programming Environment*

  1. Download the sample project file: Obtain the LoRaWAN network access test code folder;

*Sample File Project Link:*https://github.com/Elecrow-RD/ThinkNode-M6-Outdoor-Solar-Power-for-LoRa/tree/master/demo_code

Open the downloaded project: LoRaWAN_Test_868_SX1262

image74

  1. Open the Arduino IDE, load the .ino file in the project, and open the config.h configuration file; modify AppEUI, DevEUI, AppKey and the regional frequency band in the config.h configuration file (replace them with the device information registered on the TTN platform).*(replace them with the device information registered on the TTN platform)*(备注:红色字体加粗)

*The config.h file is the configuration header file for the LoRaWAN terminal, with core functions including:*

Defining the pins of the SX1262 RF module, LoRaWAN network access parameters (JoinEUI/DevEUI/AppKey/NwkKey), regional frequency band (US915 or other regional frequency bands) and uplink transmission interval (5 minutes), encapsulating the LoRaWAN node object, and providing auxiliary functions such as status code parsing, error debugging, and byte array printing. It provides basic configuration and tool support for LoRaWAN terminal network access and data transmission.

*Note: The node information (AppEUI, DevEUI, AppKey) and region must correspond to the configuration file settings.*

image75

image76

image77

  1. Board Selection:「Tools」→「Board」→「Adafruit nRF52」→「Nordic nRF52840 DK」.

image77

  1. After connecting the Type-C USB Data Cable to the host computer, select the serial port number you are using; the port COM24 is selected here.

image79

1.8 Code Upload and Verification

  1. Click Upload to upload the code.

image79

  1. After successful operation, open the Serial Monitor (Baud Rate: 115200).

image81

  1. Serial Output Information Analysis:

*Note: If no information is output on the serial port, close the Serial Monitor, click the RESET button on the ThinkNode-M6, and reopen the serial port to view the printed information.*

image81

Complete status feedback after the LoRaWAN terminal device accesses the TTN network and sends the first uplink data:

  • The terminal has successfully accessed the TTN network (DevAddr assigned normally).

  • The first uplink data (01020304) has been sent, and TTN has replied with MAC commands via the Rx1 window (no service downlink).

  • The wireless link quality is excellent (RSSI/SNR values are ideal), and the transmission parameters comply with the US915 frequency band specifications.

  • It is necessary to wait about 20 minutes before the terminal initiates the next uplink (subject to TTN Fair Use Policy/Duty Cycle Restrictions).

  • TTN Platform Verification: Log in to the TTN application details page and click Live Data; you can view the payload data 01020304 uploaded by the node, indicating that the data has been successfully uploaded.

image81

*Core Logic:*

The ThinkNode-M6 terminal device completes LoRaWAN network access detection and connects to the TTN network via OTAA mode. After configuring the RF module and network parameters, it periodically sends a fixed byte array {0x1,0x2,0x3,0x4} as the uplink payload to the TTN network (the second uplink frame is acknowledged and requests link/time MAC commands). It receives and parses downlink data and prints link status information. Finally, the data 01020304 can be viewed in the Live Data of the ThinkNode-M6 node on TTN.

Case 4: ThinkNode-M6 Uploads Temperature, Humidity and Illuminance Data to TTN Server via ThinkNode G1

1.1 Hardware Preparation

  1. Gateway Device: ThinkNode G1 LoRa Gateway (including Antenna and Power Supply)
  2. Node Device: ThinkNode-M6 Development Board
  3. Sensor Modules: Temperature & Humidity Sensor (UART), Crowtail Light Sensor (BH1750, IIC)
  4. Connection Accessories: Type-C USB Data Cable, Dupont Cables (for sensor adapter connection)

image81

image81

1.2 Hardware Connection Operations

  1. Temperature & Humidity Sensor Module → SP11-UART Interface
  2. Light Sensor Module (BH1750, I2C) → SP11-I2C Interface
  3. ThinkNode-M6 → Type-C USB Data Cable → Computer (for Code Upload / Debugging)

image81

1.3 Preconditions for Network Communication Between Gateway and Node

*Preconditions:*

  1. A ThinkNode-G1 Gateway has been created on The Things Network (TTN), connected and operating normally.
  2. A node application (OTAA/ABP) corresponding to the gateway's frequency band range has been created on TTN.

  3. The ThinkNode-M6 has been connected with LoRa Antenna and GPS Antenna.

1.4 Configure Upload Environment

  1. Download the sample project files: Obtain the folder named *LoRaWAN_LightAndTemperatureAndHumidityTest_868_SX1262* (integrated with temperature/humidity/illuminance data collection and LoRaWAN upload functions).

*Sample Project File Link:* https://github.com/Elecrow-RD/ThinkNode-M6-Outdoor-Solar-Power-for-LoRa/tree/master/demo_code

Open the downloaded project.

image87

  1. Open Arduino IDE, load the.ino file in the project, and modify the config.h configuration file: Update AppEUI, DevEUI, AppKey and regional frequency band in the config.h file .

(replace with the device information registered on the TTN platform)

The config.h file is the configuration header file for the LoRaWAN terminal. Its core functions include:

Defining the pins of the SX1262 RF module, US915 frequency band parameters, authentication information such as JoinEUI/DevEUI/AppKey/NwkKey required for TTN network access, setting a 5-minute uplink interval, creating a LoRaWAN node object, and encapsulating auxiliary functions such as status code parsing, error debugging, and byte array printing, so as to provide basic configuration and tool support for the terminal to access the TTN network and perform data transmission.

*Note: The node information (AppEUI, DevEUI, AppKey) and region must match the settings in the configuration file.*

image88

image88

image88

  1. Board Selection:「Tools」→「Board」→「Adafruit nRF52」→「Nordic nRF52840 DK」;

image88

  1. Serial Port Selection: After connecting the Type-C USB Data Cable to the host computer, select the serial port you are using; COM24 is selected here.

image88

1.5 Code Upload and Local Verification

  1. Click Upload to upload the code.

image88

  1. After successful operation, open the Serial Monitor (Baud Rate: 9600).

image88

  1. Serial Output Verification:

*Note: If no information is output on the serial port, close the Serial Monitor, click the RESET button on the ThinkNode-M6, and reopen the serial port to view the printed information.*

The printed information is the complete status feedback after the LoRaWAN terminal device integrated with light, temperature and humidity collection accesses the TTN network and completes the first data report:

  • The light, temperature and humidity sensors are collecting data normally, and the data is valid.
  • The terminal has successfully accessed the TTN US915 frequency band network, and the uplink data packet transmission is completed.
  • The wireless link quality is excellent, the transmission parameters are compliant, and only MAC command downlinks from the network side are received (no service data).

image95

1.6 ThinkNode-M6 Terminal Node Configuration Parsing Script

  1. Click the ThinkNode-M6 node name and select Payload Formatters.

image95

  1. Select Custom Javascript Formatter.

image95

  1. Open the TTN Data Parsing Script file in the project folder.

JS Parsing Script Function:

After receiving the byte array and port parameters, it parses the illuminance (uint16 type) from bytes 0–1, humidity (uint16 type, actual value obtained by dividing the original value by 10.0) from bytes 2–3, and temperature (uint16 type, actual value obtained by dividing the original value by 10.0) from bytes 4–5 in little-endian order. Finally, it returns a JSON object containing illuminance, humidity (% RH) and temperature (°C), with customizable field names to adapt to TTN integration.

image95

function Decoder(bytes, port) {
  // Decode illuminance (bytes 0-1, little-endian, uint16)
  var lux = (bytes[1] << 8) | bytes[0];

  // Decode humidity (bytes 2-3, little-endian, uint16, actual value = raw value / 10.0)
  var humidityRaw = (bytes[3] << 8) | bytes[2];
  var humidity = humidityRaw / 10.0;

  // Decode temperature (bytes 4-5, little-endian, uint16, actual value = raw value / 10.0)
  var temperatureRaw = (bytes[5] << 8) | bytes[4];
  var temperature = temperatureRaw / 10.0;

  // Return JSON object, field names can be customized, related to subsequent TTN integration
  return {
    lux: lux,
    humidity: humidity,        // Unit: %RH
    temperature: temperature   // Unit: °C
  };
}
  1. Copy the JS parsing script to the *Formatter Code* edit box to realize the parsing of temperature, humidity and illuminance from the 6-byte payload.

image95

  1. Click *Save Changes*.

image95

  1. Verify the parsing effect: After waiting for the ThinkNode-M6 to send uplink data, enter the terminal device *Live Data* page to view the parsed visualized data:

The data fields are displayed correspondingly: illuminance (lux), humidity (% RH) and temperature (°C), completing the visualized parsing of multi-sensor data.

image95

*Core Logic:* The ThinkNode-M6 terminal device collects illuminance data from the BH1750 sensor and temperature & humidity data received via the software serial port. It formats the data into a 6-byte uplink payload, accesses the TTN network via LoRaWAN OTAA mode and sends the payload periodically. Meanwhile, it receives and parses downlink data and prints link status information. Finally, the illuminance, temperature and humidity data can be viewed in the *Live Data* of the ThinkNode-M6 node on TTN.

How to buy

Please visit this page to purchase ThinkNode M6 Outdoor Solar Power for Meshtastic.

Support

If you have any problem about how to use it, you can connect to us at the bottom-right of bazzer or contact to techsupport@elecrow.com to get technology support.