Page 1 of 2

writing code in editor

Posted: Wed Jul 25, 2018 12:38 pm
by t4tomer
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 ?

Re: writing code in editor

Posted: Wed Jul 25, 2018 8:28 pm
by Roberthh
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.

Re: writing code in editor

Posted: Sun Jul 29, 2018 9:37 am
by t4tomer
I tried download the program that you suggested but for some reason id does not work, you have maeby other program to recomand ?

Re: writing code in editor

Posted: Sun Jul 29, 2018 10:20 pm
by OutoftheBOTS_
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.

Re: writing code in editor

Posted: Mon Jul 30, 2018 10:07 am
by t4tomer
I treid it but for some reason no rshell or the other programs that you recomand me are working , only tera term

Re: writing code in editor

Posted: Mon Jul 30, 2018 10:46 am
by OutoftheBOTS_
First what operating system are you using?

Second which Micro-Python board are you using?

Re: writing code in editor

Posted: Mon Jul 30, 2018 10:47 am
by t4tomer
I am using windows 10

Re: writing code in editor

Posted: Mon Jul 30, 2018 10:50 am
by OutoftheBOTS_
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

Re: writing code in editor

Posted: Mon Jul 30, 2018 11:40 am
by t4tomer
I did the first step

pip install adafruit-ampy

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

Image

Re: writing code in editor

Posted: Mon Jul 30, 2018 12:22 pm
by Roberthh
You have to run that command from the cmd.exe command line, not from the python REPL prompt.