[PYTHON] Notes on running M5Stick V with uPyLoader

Overview

I found out how to put files in M5Stick V, so I will write it as a memo.

This time, we will simply output the character string "Hello World". It is the same process as this link. ↓ The shortest step (link) to output "Hello World" on M5Stick V

Preparation

PC to use: MacBook Air M5Stick V body USB Type-C cable

Download uPyLoader

Download from this Github link ↓ Github link

For macOS, 0.1.3 is the latest. スクリーンショット 2020-01-05 13.51.15.png

Connect with M5Stick V.

Connect to the PC using a USB Type-C cable.

Then start the uPyLoader installed above. スクリーンショット 2020-01-07 1.33.24.png

The left side is the local folder, and the right side is the remote connected folder. We will connect M5Stick V.

Precautions when connecting!

To connect uPyLoader and M5Stick V, press and hold button A on the M5Stick V main unit and press the connect button. By doing so, you can avoid the execution of the boot file that occurs when M5Stick V boots. スクリーンショット 2020-01-05 13.56.54.png

This looks like an error, but it seems to be a pop-up that appears when the connection is successful.

スクリーンショット 2020-01-05 14.07.18.png This information can also be found on the Switch Sciense M5Stick V purchase page.

Before transferring the file

After connecting, I will transfer the file, but before that, prepare the environment.

Run init transfer files from File. Then, I think that the files " __download.py " and " __ upload.py " have been transferred to the M5Stick V folder on the right side. You are now ready.

Create a file with an appropriate folder name such as " helloworld.py " with your favorite code editor, and select it on the left screen of uPyLoader. ..

By the way, the contents of this file (helloworld.py) is the following code.

import lcd

lcd.init()
lcd.draw_string(100, 100, "hello world", lcd.RED, lcd.BLACK)

スクリーンショット 2020-01-05 14.00.00.png

After making this selection, press the button ** "Transfer" **. ![Screenshot 2020-01-05 14.00.00 copy.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/280415/0dcbbf46-3efa-f1c9- b286-4318b35e41f6.png)

It's confusing, but it's at the bottom of the screen. You should now be able to transfer the file.

And we will continue to execute.

スクリーンショット 2020-01-05 14.18.42.png

You can execute it with the ** "Execute" ** button here.

IMG_9717.JPG

I think you can see a screen like this.

bonus

You can also edit the transferred files on uPyLoader. Select the file and click it again to open the edit screen.

スクリーンショット 2020-01-05 14.14.15.png

This is the edit screen.

Recommended Posts

Notes on running M5Stick V with uPyLoader
Notes on using rstrip with python.
Notes on running Azure Machine Learning locally
Notes on doing Japanese OCR with Python
Notes about with
Play with custom image notebook on Kubeflow v0.71
I tried running YOLO v3 on Google Colab
Notes on Flask
Notes on HDR and RAW image processing with Python
Autoencoder with Chainer (Notes on how to use + trainer)
Notes on creating a virtual environment with Anaconda Navigator
Notes on neural networks
Celery notes on Django
Notes on installing PycURL
Notes on using Alembic
Notes on SciPy.linalg functions
Notes on importing data from MySQL or CSV with Python
Notes on handling large amounts of data with python + pandas
Notes on deploying pyenv with Homebrew and managing Python versions