Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

MicroPython, how to DIY automatic watering system

Shulou Source: shulou.com Published: 2022-06-01 04:00:41 09月30日 Update

This article mainly explains "MicroPython how to DIY automatic watering system", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "MicroPython how to DIY automatic watering system" bar!

1. Experimental purpose:

Learn the method of extending the simple Icano interface in the PC system

Learn TurnipBit splicing programming

Learn the working principle and application method of soil sensor

two。 Required original devices:

TurnipBit together

TurnipBit expansion board

One usb cable

Soil moisture detection module

Some DuPont lines

3. The principle of soil moisture detection module:

The soil moisture detection module is mainly used to measure the soil volume water content. Based on the principle of electromagnetic pulse, the apparent dielectric constant (ε) of soil is measured according to the propagation frequency of electromagnetic wave in the medium, and the soil volumetric water content (θ v) is obtained. when the soil moisture reaches a certain standard, it begins to water.

4. Connection method:

The TurnipBit expansion board corresponds to the LED interface as follows:

5. Source code:

Open the TurnipBit visual programming address http://www.turnipBit.com

The code is as follows:

From microbit import * while True: if pin5.read_digital (): pin8.write_digital (0) display.show (Image) else: pin8.write_digital (1) display.show (Image.HAPPY)

Visual programming chart

Thank you for your reading, the above is the content of "MicroPython how to DIY automatic watering system". After the study of this article, I believe you have a deeper understanding of the problem of MicroPython how to DIY automatic watering system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Soil learning system humidity detection principle method module programming content water content volume interface electromagnetic expansion board visualization measurement diode medium code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker OPPO Reno vpn Apple