FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Preparing to dig the c / c ++ wall corner, Micropython is not worth learning?--Pyboard evaluation

     

    When you mention micropython, you may first think of it will be Python. What is the difference between the two? Python is our common computer programming language. It is an easy-to-play scripting language, mainly for the development of the upper application, but it is not suitable for hardware underlying control. And Micropython is a spiotic Python, a person named Damien George spends a monthly time, based on ANSI C (C language standard), and then follows Python's specification in grammar, mainly in embedded The hardware (herein referring to the microcontroller level) is easier to implement the underlying operation. As of now, many embedded hardware have successfully transplanted micropython, such as Pyboard, ESP8266, WIPY, ESPRUINO PICO, STM32F4 Discovery, etc. The author got a Pyboard for some time, just able to understand the operation of Micropython on this platform. This article originally address: https://www.eeboard.com/evaluation/pyboard.com/evaluation/pyboard.com Pyboard To put it, Pyboard is the true love of Micropython. After all, this board is also from the Damien George. Pyboard is very small, the size is only 40mm * 33mm, the portability is very ok, and it can be developed in the box in the box. But ... I really see the board, you will feel that this board is too simple, this is the same thing to sell 28 pounds, but pure look hard, you can't put it on such a simple "posture" "Match, ok, this seems to be attached to Micropython, which seems to be more worthy of our expectations. Pybv1.1 version, Made in Germany Pyboard Based on the STM32F405RG microcontroller, Pyboard is powered by the onboard MicroSB interface and data transmission. The onboard peripheral includes a MicroSD card interface, 4 LED lights, two mechanical buttons, an acceleration sensor, clock module, others The signal is set by the metal through hole on the plate, and the specific signal definition can be refer to the figure below. STM32F405RGT6 microcontroller The main controlled Semiconductor's STM32F4 series microcontroller should be unfamiliar. The specific model is STM32F405RGT6, and the detailed parameters can be referred to the table below, this article does not have more introduced. Pyboard development Key to actually experience Tyboard running Micropython, learned from the official understanding, users can easily implement control of microcontrollers through micropython, most intuitive, you don't need to be complicated, you can directly follow the micropyton scripting language. This allows more computer beginners to do hardware DIY, users can implement access and control of hardware underlying through the micropython language, such as controlling LED bulbs, LCD displays, read voltage, control motors, access SD cards Wait, it will experience it in the next thing. Two changes can be seen after connecting to the computer with the MicroSB cable, one is a virtual serial port that needs to be installed by the computer device manager. The other is a U disk that can be seen from the computer. There are several important files in the U disk boot.py, main.py, pybcdc.inf. If the board is started normally, the power will run boot.py first, then configure the USB, and finally run main.py. Where Pybcdc is the drive to be installed above. You can see the corresponding serial number after the virtual serial port is installed. Then we can realize serial communication through the serial tool (following PUTTY as an example). It can be seen that the built-in micropython system is V1.8.7, which is a version published earlier. View the basic command operation by help (), the operation command is not too much, it looks simple look. Microcontroller programming generally begins with a lightning, how is the Pyboard board that runs McIropython achieves lighting operation? There are 4 LEDs on Pyboard, which can be clear from the schematic. Controlling the LED is relatively easy, the basic method is as follows: Pyb.Lled (ID), defines an LED object, ID is the LED serial number, 1-4. (one is to pay attention to the ID number has been decided when compiling Micropython, unless we recompilated the firmware, otherwise it is impossible Change the corresponding sequence number corresponding to the LED) Led.on (), light Led.off (), turn light Led.Toggle (), flip LED.INTENSITY ([Value]), set LED brightness, value is the brightness value, 0-255, 0 is the close, 255 brightened, only LED3 and LED4 support Implement light / simple addition and subtraction Different from traditional microcontroller control requires us to re-modify / compile / burn the program, Micropython scripting language allows you to achieve real-time operation, even if you don't understand C language, simple control is also very easy to get started, This is also convenient than Arduino. If the microSD card is inserted into power-on, Pyboard will start from the SD card by default, instead of starting in the ROM in the original microcontroller, and if there is no corresponding boot.py, main.py file in the SD card, then it will result in abnormal Run, the solution is also very simple, just copy the original boot.py, the main.py file to the MicroSD card. In addition to implementing script control directly in the serial terminal tool, you can also run the procedure you want on a power-up power on the Pyboard, which involves the secure start mode. In safe start mode, Pyboard does not run boot.py, main.py, then we can edit the main.py file through Notepad, add the script code you want to run, you can implement the operation of the running program. In addition, Pyboard's USB can implement USB HID mode in addition to power supply / serial / storage, this needs to modify the boot.py file, as follows Then we can control the movement of the cursor through the script Or further, we can achieve such applications such as mouse cursors through onboard triaxial accelerometers. If you frequently modify the boot.py, main.py file, you may damage these files without uninterrupted, causing Pyboard to start abnormal, or if you fail to implement the script, then what? Here is two ways, one is to restore factory settings, and the other is to recover the firmware. Restore the factory settings simple, step reference official introduction: Http://docs.micropython.org/en/latest/pyboard/pyboard/tutorial/reset.html Another re-burning firmware will trouble more, of course, if you want to actually play Micropython, this method is not in the past. Pyboard provides Micropython's source code on GitHub, you can use to compile firmware or ported to other boards, and the official also provides ready-to-range firmware, and in continuous updates, so you can download firmware. Firmware Download first needs to let Pyboard enter bootloader mode, step: connect Boot0 to 3.3V, press Reset button to enter BootLoArder also needs to install the corresponding trend. Download specific software tools are ST DFU SE tools, driven under the installed DRIVERS folder. Drive installation DFUSE interface, choose the corresponding firmware Click Upgrade to download It can be seen that the latest firmware is compiled 2017.5.4 summary In the end, for the development of the microcontroller, it is generally rarely involved in the upper development, many of them are collecting data, doing control and other underlying development, although C / C ++ is also enough, but more choices have not been tasted, Moreover, Micropyth has a more concise development method that C / C ++ does not have. So, in synthesis, for Micropython, individuals expressed recognition, which brought more efficient development for the majority of electronic enthusiasts, which can be applied to DIY in life. However, in the current market environment, for the development of product, Micropython's long-term stability is unable to adopt, and there is no support for JTAG / SW debugging, and only a few microcontroller library support, almost these The disadvantage is more deadly for products that need mass production now. If you are more interested in Micropython, consider buying the STM32F4 Discovery development board first, this board already has official ported firmware, relative to Pyboard, prices are more advantageous. In short, if you are an embedded industry practitioner, learn C / C ++, have a good force, and learn micropython. This article originally address: https://www.eeboard.com/evaluation/pyboard.com/evaluation/pyboard.com Original declaration: This article is originally created by the panel network, declined!

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us