micropython

Learn about micropython, we have the largest and most updated micropython information on alibabacloud.com

TPYBOARDV102 automatic watering system of Micropython example

1. System functionsMonitoring of soil moisture, ambient temperature, light intensityAutomatic watering according to current environment, cold weather automatically heats soil2. Required ComponentsTpyboard Board 1 piecesPhotosensitive Module 1 BlocksDS18B20 Module 1 BlockSoil Moisture Detection Module 1 blockDuPont Line severalRelays 2 X3. Wiring methodAfter the wiring is complete, main.py, boot.py, ds18x20.py, onewire.py are imported into the Tpyboard v102 drive letter to run. Automatic watering

Experiment on automatic watering of Micropython Tpyboard v102

: Print (' \ t light intensity: ', gl.read (), ' \ t soil humidity: ', sd.read (), ' \ t current temperature: ', wd.read_temp ()) Pyb.delay (200) If Gl.read () If Sd.read () >800: #多浇水 Ks.value (1) else: Ks.value (0) Elif Gl.read () >=1300: #阳光不足 If Sd.read () >1200: #少浇水 Ks.value (1) else: Ks.value (0) else: #阳光一般 If Sd.read () >1000: #正常浇水 Ks.value (1) else: Ks.value (0) If Wd.read_temp () Jr.value (1) else: Jr.value (0) Experiment on automatic watering o

How to use the Micropython Tpyboard ADC

Basic usageImport PybADC = Pyb. ADC (Pin (' Y11 ')) # Create an analog object from a PINADC = Pyb. ADC (Pyb. PIN.BOARD.Y11)val = Adc.read () # read an analog valueADC = Pyb. Adcall (resolution) # Creale an Adcall objectval = Adc.read_channel (channel) # Read the given channelval = adc.read_core_temp () # Read MCU temperatureval = Adc.read_core_vbat () # Read MCU Vbatval = Adc.read_core_vref () # Read MCU VrefPyb. ADC (PIN)Defining an ADC with a GpioPyb. Adcall (resolution)Defines the resolution

Micropython example of Tpyboard v102 colorful lantern ws2812b

) green = INT (GRE En * intensity) blue = Int (blue * intensity) buf[index] = Buf_bytes[green >> 6 Mask] BUF[INDEX+1] = Buf_bytes[green >> 4 mask] buf[index+2] = Buf_bytes[green >> 2 Mask] buf[index+3] = buf_bytes[green mask] buf[index+4] = buf_bytes[red >> 6 mask] buf[index+5] = buf_bytes[red >> 4 mask] buf[index+6] = buf_bytes[red Gt;> 2 mask] buf[index+7] = buf_bytes[red mask] buf[index+8] = buf_bytes[blue Gt;> 6 mask] buf[index+9] = Buf_bytes[blue >> 4 mask] buf[inde

Micropython Tpyboard v102 Drive 28byj-48 Stepper Motor

)angle_per_round=steper_round/360#1-degree rotation cyclePrint('Angle_per_round:', Angle_per_round)defsteperwritedata (data): Count=0 forIinchData:pin_all[count].value (i) Count+=1defSteperfrontturn ():GlobalSpeed Steperwritedata ([The, 0,0]) Pyb.delay (Speed) Steperwritedata ([0,The, 0]) Pyb.delay (Speed) steperwritedata ([0,0,The]) Pyb.delay (speed) steperwritedata ([1,0,0,1]) Pyb.delay (speed)defSteperbackturn ():GlobalSpeed Steperwritedata ([The, 0,0]) Pyb.delay (Speed) steperwritedata ([1,0

Micropython turnipbit automatic Curtain simulation system

) Steperwritedata ([0, 0,1,1]) sleep (speed) steperwritedata ([0,1,1,0]) sleep (speed) def steperstop (): Steperwritedata ([0,0,0,0]) d EF Steperrun (angle): Global angle_per_round val=angle_per_round*abs (angle) if (angle>0): For I in range (0,val): SteperfrontturN () else:for I in Range (0,val): Steperbackturn () steperstop () while True:light=pin0.read_an Alog () #读取光敏传感器传递过来的模拟量数据 #数值越大说明光照度越小 if Light>400:if isopen:isopen=false steperru N ( -360) #光照小于设定的值, close the curtains else:if isop

Micropython Tutorial Tpyboard Development Board DIY small Home weather station

(Self.get2reg (0xAE)) self. AC4 = Self.get2reg (0xb0) self. AC5 = Self.get2reg (0xb2) self. AC6 = Self.get2reg (0xb4) self. B1 = Self.short (Self.get2reg (0xb6)) self. B2 = Self.short (Self.get2reg (0XB8)) self. MB = Self.short (Self.get2reg (0xBA)) self. MC = Self.short (Self.get2reg (0xBC)) self. MD = Self.short (Self.get2reg (0xBE)) self. UT = 0 self. Up = 0 self. B3 = 0 self. B4 = 0 self. B5 = 0 self. B6 = 0 self. B7 = 0 self. X1 = 0 self. X2 = 0 self. X3 = 0 def short (self, DAT):

Micropython the problem of the tease error

Today engaged in a day, found a variety of problems, the first final solution is to reproduce the brush firmware!!!!The firmware will need to be cleaned flash! When you clear flash, press and hold the Flash key, then press the RST key, then

Python meets embedded: Several main python development boards at a glance!

tasks.comparison of several mainstream Python development boardsThe following formally enters our subject. With the growing popularity and popularity of the Python language, the boards of some microcontrollers dedicated to the Python language have been presented to the public. A python that can be run on a microcontroller also known as Micropython,micro Python is a simple and fast implementation of the Python 3 programming language, specifically opti

Tpyboard V102: STM32 Development Board capable of running Python

Recently Micropython language hardware programming is very fire, followed by the start to support the development of Micropython language programming board also started fire hot, today small series on and we introduce a very classic Micropython Development Board-tpyboardv102 Development Board.  A Onboard Hardware Resources IntroductionIn accordance with the Conve

Python's five main roles in real-time embedded system development-Yue Tak Wealth

can be used to receive very important embedded system data, then stored in a database or locally for analysis. Developers can also use Python to develop real-time visualizations to show critical parameters, or to store these parameters for subsequent analysis. One of the advantages of using Python for data analysis is that when basic work is done, the placement of new features is straightforward.function # 4– Real-time softwarePython has proven its strength and ease of use, and even found it as

ESP32 Getting Started experience-windows

This post is suitable for entry-level personnel, but at the same time welcome new and old readers to criticize.A treasure bought a esp32, there is a ESP32 development guide book.And then the environment is built. The above is written mainly on Linux, I built a half-day on my orange Pi PC Development Board, there are some areas behind the problem, not ready. After the time to deal with the process, after all, an orange pie price is so low, plus a display price is not high, and it itself can be ha

Summarize the complete steps of esp8266 brush Python (Ultimate Summary)

2018-04-0319:12:02From playing Micropython to the present, all the way the thorns all the way bumpy.I do not know that only I encountered such a problem or micropython too unstable, or I bought the board is too rough. In short, there are too many problems.The most important, but also the most annoying problem is: brush does not enter the program, brush not into the program.I use a lot of software:In the end

Python Open Source Project Top30

efficient Python implementation, primarily to enable easier implementation of the underlying operations on embedded hardware, specifically at the microcontroller level. [Github 5728 stars]Https://github.com/micropython/micropythonNo 9:prophetThe tool is an open source Facebook tool for generating high-quality predictions for multi-cyclical linear or nonlinear time series data. [Github 4369 stars, provided by Facebook]Https://github.com/facebook/proph

C + + Resource Encyclopedia

applications. Thrift: Efficient cross-language ipc/rpc for c++,java,python,php,c# and many other languages, originally developed by Twitter. Video LIBVPX:VP8/VP9 encoding and decoding SDK FFmpeg: A complete, cross-platform solution for recording, converting video and audio streams. LIBDE265: The implementation of an open h.265 video codec. OpenH264: Open source h.364 codec. Theora: Free open source video compression format. Virtual machines Intere

2017 30 stunning Python open source project __python

industrial intensity[7663 stars on GitHub]. Provided by Matthew Honnibal Seventh place PIPENV: Human python development Workflow [GitHub 7273 stars]. Provided by Kenneth Reitz eighth place Micropython: Simple and efficient python implementation of micro-control and constraint system [GitHub 5728 stars] Nineth Place Prophet: A high-quality predictive tool for generating multiple seasonal time-series data with linear or non-linear growth [GitH

Recommended C/+ + frameworks and libraries (RPM)

Simplebinaryencoding: Encoding and decoding of application information in binary format for low-latency applications. Thrift: Efficient cross-language ipc/rpc for c++,java,python,php,c# and many other languages, originally developed by Twitter. Video LIBVPX:VP8/VP9 encoding and decoding SDK FFmpeg: A complete, cross-platform solution for recording, converting video and audio streams. LIBDE265: The implementation of an open h.265 video codec. OpenH264: Open sour

Turn: the C/C ++ framework and library that are worth recommending (really powerful), and the recommended framework

serialization Library MessagePack: Efficient binary serialization library of C/C ++, such as JSON Protobuf: Protocol buffer, Google's data exchange format. Protobuf-c: Protocol buffer implementation in c Language SimpleBinaryEncoding: used to encode and decode application information in binary format for low-latency applications. Thrift: efficient cross-language IPC/RPC, used in C ++, Java, Python, PHP, C # and other languages, initially developed by Twitter. Video Libvpx: VP8/VP9 encodi

"Dry" foreign programmers compiled C + + resources Daquan (GO)

: Efficient cross-language ipc/rpc for c++,java,python,php,c# and many other languages, originally developed by Twitter. Video LIBVPX:VP8/VP9 encoding and decoding SDK FFmpeg: A complete, cross-platform solution for recording, converting video and audio streams. LIBDE265: The implementation of an open h.265 video codec. OpenH264: Open source h.364 codec. Theora: Free open source video compression format. Virtual machines Interesting VMs in Carpvm:c, le

C + + Open source Encyclopedia

other languages, originally developed by Twitter. Video LIBVPX:VP8/VP9 encoding and decoding SDK FFmpeg: A complete, cross-platform solution for recording, converting video and audio streams. LIBDE265: The implementation of an open h.265 video codec. OpenH264: Open source h.364 codec. Theora: Free open source video compression format. Virtual machines Interesting VMs in Carpvm:c, let's take a look at this. Mic

Related Keywords:
Total Pages: 5 1 2 3 4 5 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.