Example Code for Mind+-Graphical Programming
This project demonstrates how to use Mind+ (based on Scratch3.0) graphical programming to read ultraviolet (UV) data from the Gravity: 240370 Ultraviolet Index Sensor with an Arduino UNO. Users will learn to add the UV module to Mind+, create a graphical program, and upload it to the Arduino UNO.
Hardware Preparation
- DFRduino UNO Controller x1
- Gravity: 240370 Ultraviolet Index Sensor x1
Software Preparation
- Mind+ programming software Click to download Mind+
- Detailed installation tutorial: Mind+ Basic Wiki Tutorial - Software Download and Installation
Wiring Diagram

Other Preparation Work
- Open Mind+ software, select the upload mode, choose "Arduino Uno" in "Master Board" under "Extensions", then click on the user library.
- Copy the following link: https://gitee.com/dfrobotcd/ext-uvindex240370sensor, paste it into the user library search bar, then search and add the UV module.
Sample Code
Start programming, the program is as shown in the following figure:

Result
- Go to "Connect Device", "Upload to Device".
- After the program is uploaded, open the serial port to see the data output. Detailed tutorial: Mind+ Basic Wiki Tutorial - Serial Printing
Was this article helpful?
