0

members

Easy Basics: Project 083x Sipeed Maixduino board - Uploading script with uPyLoader

of Acoptex.com in Sipeed Maixduino

Basics: Project 083x

Project name: Sipeed Maixduino board - Uploading script with uPyLoader

Tags: Sipeed Maixduino Kit for RISC-V AI and IoT, seeedstudio, Artificial intelligence, AI, IOT, Internet of things, MaixPy, MicroPython, upload micropython script to sipeed maixduino board, how to format Micro SD more than 4GB card to FAT format, Uploading script with uPyLoader, uPyLoader

Attachments: helloworld_1.py

In this project, you need these parts :

1. Sipeed Maixduino Kit for RISC-V AI + IoT 1 pc or Sipeed Maixduino for RISC-V AI + IoT 1 pc

2. USB Type C cable 1 pc

3. Micro SD card and SD card adapter, size 4GB (FAT formatted) 1 pc

General

We will learn how to use uPyLoader to upload the micropython script to the Sipeed Maixduino board and run it. 

Understanding the MaixPy

MaixPy ported MicroPython to K210 (a 64-bit dual-core RISC-V CPU with hardware FPU and convolution accelerator). A project that supports MCU routine operations and integrates machine vision and microphone arrays to quickly develop intelligent applications in the AIOT field that are extremely cost effective and practical.

MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.

K210 created for AIOT(AI+IOT) use, It's powerful performance and low cost are very competitive.

MicroPython makes programming on K210 hardware easier, the code is open source and can be found here.

Maixpy is a scripting language that is completely usable without the need for an IDE. This IDE is for make it easier to view images, pick colors, send files, etc on a computer. The Maixpy IDE is derived from the OpenMV IDE. Because the K210 does not support USB, it uses serial communication instead, so using Maixpy IDE will reduce the frame rate, or if you encounter other problems, please try to use the serial terminal instead.

MaixPy devices have an internal file system which can access both internal and external memories. During boot, the device will mount any external memory cards formatted with either SPIFFS or FAT file systems, and add them to the internal file system as the /flash or /sd directories respectively. SPIFFS cards are by default assigned to 3MB SPIFFS (starting at flash address 0xD00000). When detected at boot, SPIFFS devices automatically appear as the /flash directory within the device's internal file system. Currently the SPIFFS implementation in MaixPy does not support the creation of directories. FAT formatted SD (TF) cards are supported, but FAT32 or exFAT formatted cards are not currently supported. When detected at boot, FAT formatted cards will be automatically mounted and appear as the /sd directory in the device's internal file system. It should be noted that the root directory is only used to mount the SD card or SPIFFS flash card. All other file operations happen in the /flash or /sd directories, as determined by the format of the memory card discovered at boot time.

If a memory card formatted with either a SPIFFS or FAT file system is detected at boot, MaixPy will look for a boot.py file in the root directory of that memory card. If /boot.py is found, the system will immediately execute it. If the /boot.py file is not found, the device will automatically create one on the memory card that offers a basic REPL command line interface. Edit the contents of the /boot.py file on the memory card to determine what the device does when it is reset or rebooted. FAT memory cards will have a mount point of /sd, while SPIFFS cards will appear as /flash.

Understanding the Sipeed Maixduino board

You can read more about it here.

Signals and connections of the Sipeed Maixduino board


Maxduino pinout.



Espressif ESP32-WROOM-32 pinout.



Sipeed M1 pinout. See detailed description about pins here.

ADC - Analog to Digital Converter or Analog pins.This devepment board has 5.

GND - Ground pin.

RST - Reset pin.

Vin - External power supply pin 6V

I2C - It has dedicated pins available for two-wire I2C communication. One pin is used for data transfer (SDA) and another pin is used for clock synchronization (SCL). 

Pin 0, Pin 1 - hardware serial communication pins.

5V, 3V3 - power supply pins.

ESP32-WROOM-32 - ESP32-WROOM-32 module soldered to the development board. Optionally ESP32-WROOM-32D, ESP32-WROOM-32U or ESP32-SOLO-1 module may be soldered instead of the ESP32-WROOM-32.

Reset button - to reset the development board

BOOT button - to upload the firmware/sketch

USB type C port - USB interface. It functions as the power supply for the board and the communication interface between PC and the ESP module.

Wiring

Pay attention to the installation direction of the camera and screen, otherwise it may not work or damage the device. The camera is facing the back:

The screen is facing the front:


Step by step istruction

We are using the Sipeed Maixduino board and have Windows 7 64 bit OS installed on our PC.

1. Preparations

Please check in our Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy

2. Uploading the MaixPy to Sipeed Maixduino board

Please check in our Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy

3. Checking the MaixPy firmware on Sipeed Maixduino board

Please check in our Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy

4. How to install the FT2232 drivers

Please check in our Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy

5. How to format Micro SD card with more than 4GB side to FAT format

Please check in our Basics: Project 083f Sipeed Maixduino board - Using MycroPython

6. Using the uPyLoader

  1. Go here and donload the latest version of uPyLoader. We are using Windows OS so we download the file 
    uPyLoader-win.exe
    uPyLoader-win.exe of version 0.1.4.
  2. You do not need to instalthis app. When downloading completed just double-click on uPyLoader-win.exe file and click on Run button.
  3. Go to Tools->Navigate and select the folder where your scripts located.
  4. Select the serial port (we have COM17) in Connection field, select Baudrate - 115200 and click on Connect button to connect the board. You will have connection wifi if your Sipeed Maixduino board is not connected. Use refresh button to refresh the Connection field serial port list.
  5. The Status will change to Connected.The first time you run the software, you need to initialize it. 
  6. Go to File->Init transfer files to complete the initialization. This will create two files on the Sipeed Maixduino board -  _upload.py and _download.py.
  7. Double-click on your file with script (we used helloworld_1.py) to read and edit.
  8. Click on Save button for Local to save changes in the file with script which is located on your PC/laptop.
  9. Click on Save button for MCU to download and save your file with script to the Sipeed Maixduino board.
  10. Click on X in top right corner to close the window.
  11. You can see that your file with script saved on Sipeed Maixduino board now. You can double-click on this file to open and edit, then click on Save button for MCU to save your changes.
  12. If you want to run the script just select the file with script on Sipeed Maixduino board and click on Execute button.
  13. If you want to delete a file with script just select the file with script on Sipeed Maixduino board and click on Remove button.
  14. You can also use another way to transfer your file with script to the Sipeed Maixduino board. Just select the file with script on your PC/laptop and click on Transfer button.

 Summary

We have learnt how to use uPyLoader to upload the micropython script to the Sipeed Maixduino board and run it.  

More projects with Sipeed Maixduino board

Project 083f Sipeed Maixduino board - Using MycroPython

Project 083e Sipeed Maixduino board - Uploading MaixPy

Project 083y Sipeed Maixduino board - Using MaixPy REPL interface and Micropython Editor

Project 083w Sipeed Maixduino board - Using PlatformIO IDE

Project 083d Sipeed Maixduino Kit for RISC-V AI and IoT

Libraries

  • No libraries required for this project

Script

  • None


Other projects of Acoptex.com

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 06-08-2019
Viewed: 325 times