writing code in editor

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

writing code in editor

Post by t4tomer » Wed Jul 25, 2018 12:38 pm

hello I am new to the micro python and now i manged to control the board using program called Tera Term how ever this program is not good enough is there a better editor to use the board ?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: writing code in editor

Post by Roberthh » Wed Jul 25, 2018 8:28 pm

Teraterm is not an editor, it is a terminal emulator, which you typically may use to run code or to try simple statements. You would usually use the editor of your choice to write code on your, transfer it to PyBoard and run it there. People use different workflows.
Many people use rshell for the file transfer and the REPL prompt (=python command prompt). On WIndows, the ampy tool also works well. But there is not "standard" set of tools.

t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

Re: writing code in editor

Post by t4tomer » Sun Jul 29, 2018 9:37 am

I tried download the program that you suggested but for some reason id does not work, you have maeby other program to recomand ?

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: writing code in editor

Post by OutoftheBOTS_ » Sun Jul 29, 2018 10:20 pm

Maybe I can help to explain the work flow.

Step 1. write your script on your PC using a editor (e.g note++) or IDE(e.g pycharm, thorny) then save the script myscript.py on your PC

Step2. Transfer the script to the Micro-Python board. This can be done a few ways: rshell, mpfshell, ampy, FTP

Step3. Load and execute the script my typing import myscript.py into the terminal emulator.

t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

Re: writing code in editor

Post by t4tomer » Mon Jul 30, 2018 10:07 am

I treid it but for some reason no rshell or the other programs that you recomand me are working , only tera term

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: writing code in editor

Post by OutoftheBOTS_ » Mon Jul 30, 2018 10:46 am

First what operating system are you using?

Second which Micro-Python board are you using?
Last edited by OutoftheBOTS_ on Mon Jul 30, 2018 10:48 am, edited 1 time in total.

t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

Re: writing code in editor

Post by t4tomer » Mon Jul 30, 2018 10:47 am

I am using windows 10

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: writing code in editor

Post by OutoftheBOTS_ » Mon Jul 30, 2018 10:50 am

Ok rshell doesn't work on windows.

I am using windows 10 and have used both mpfshell and ampy.

Ampy is probably easier to learn as a beginner. see https://learn.adafruit.com/micropython- ... stall-ampy

t4tomer
Posts: 11
Joined: Mon Jul 23, 2018 3:31 pm

Re: writing code in editor

Post by t4tomer » Mon Jul 30, 2018 11:40 am

I did the first step

pip install adafruit-ampy

type it in the python command window but
but I get this error :

Image

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: writing code in editor

Post by Roberthh » Mon Jul 30, 2018 12:22 pm

You have to run that command from the cmd.exe command line, not from the python REPL prompt.

Post Reply