LG01 Use and configuration
The LG01 is configured by default as a WiFi AP. Users can access and configure the LG01 after connecting to its WiFi network.
In the first boot of LG01, it will automatically generate an unsecured WiFi
Network, called dragino2-xxxxxx
Users can use a laptop to connect to this WiFi network. This laptop
The brain will get an IP address 10.130.1.xxx, the default IP of LG01 is 10.130.1.1
Open the laptop browser and type 10.130.1.1
The user will see the login screen of the LG01.
The web login account is:
User Name: root
MCU (Microcontroller) The ATMega328P is used to communicate with the LoRa module and the Dragino Linux module. The programming language of the MCU is based on the C language, and the programming tool is the Arduino IDE.
Let us know how to program.
Download and install Arduino IDE
Download the latest Arduino software (IDE) from the official Arduino website:
Install the IDE on your PC, open and click File –> Preference, add the following URL to the Additional Boards Manager URLs http://www.dragino.com/downloads/downloads/YunShield/package_dragino_yun_test_index.json
Go to tools –> Boards –> Boards Manager, find the Dragino boards information and install it.
After installing the Dragino board information in the IDE, we can see the information from the IDE Board, just like the screenshot below. For LG01, we should choose: Arduino Uno – Dragino Yun.
Note: If the user has problems installing the Dragino Boards automatically, the user can manually add the configuration file.
Upload a firmware to the MCU
First, we can upload a simple firmware to the MCU.
If you are already connected to the LG01 WiFi SSID, make sure your computer and LG01 are on the same network, and then both devices are on the same WiFi network. In the IDE, select the correct port as shown below:
Select the example upload from IDE –> File –> Examples –> Dragino –> Basic –> Blink , click Upload to upload the firmware to LG01. If LG01 prompts for password, please enter LG01 password.
The Blink example will set the A2 pin of the MCU to a periodic high and low level. This pin is connected to the HEART lamp of the LG01. If the firmware is successfully uploaded, the user can see that the HEART lamp is periodically lit and Extinguished