Running scripts on pyboard from windows command prompt?

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.
Post Reply
Dartec
Posts: 5
Joined: Thu May 26, 2016 10:50 pm

Running scripts on pyboard from windows command prompt?

Post by Dartec » Thu Jun 09, 2016 7:23 pm

Hi,

I have watched the video regarding the three methods of using/accessing the pyboard. Serial connection and running the main.py files I understand but I just cannot find or get it to run from the command prompt if I follow the video.

For example "python pyboard.py test.py" hwo and/or where do you type this command to run, please?

I have tried it from a command prompt on windows and just get errors, I have read the pyboard.py file but a snew to python and the pyboard not really following what has to be done.

The way the video says you can run your scripts 'realtime' to test them but I can only do things through REPL and main.py although haven't tried the latter, don't want to change anything on the pyboard yet.

Please can anybody help me or put me on the right track?

Regards
Ray

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Running scripts on pyboard from windows command prompt?

Post by dhylands » Thu Jun 09, 2016 7:31 pm

It would be useful to see the output when it fails. "It just errors" doesn't tell me very much. It's like me saying my car doesn't work and asking what's wrong with it?

I'm going to guess that you don't have python in your PATH or something similar.

Dartec
Posts: 5
Joined: Thu May 26, 2016 10:50 pm

Re: Running scripts on pyboard from windows command prompt?

Post by Dartec » Thu Jun 09, 2016 8:40 pm

Hi,

Thank you for the reply.

These are the errors I get:

line 327 in <module> main()
line 310 in main execbuffer(pyfile)
line 290 in execbuffer pyb = Pyboard(list of args)
line 125 in init import serial

All these reference pyboard.py file. I am using Python 2.7.11, which runs when I type python at the command prompt.

Thank you.
Regards


PS: Does pyboard work with Pymakr IDE?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Running scripts on pyboard from windows command prompt?

Post by dhylands » Thu Jun 09, 2016 8:47 pm

It sounds like you need to install the pyserial module.

Under linux, I would normally use a command like:

Code: Select all

pip install serial

Dartec
Posts: 5
Joined: Thu May 26, 2016 10:50 pm

Re: Running scripts on pyboard from windows command prompt?

Post by Dartec » Fri Jun 10, 2016 7:15 am

Thank you.

Will check how to in windows.

Dartec
Posts: 5
Joined: Thu May 26, 2016 10:50 pm

Re: Running scripts on pyboard from windows command prompt?

Post by Dartec » Fri Jun 10, 2016 7:20 am

On the other hand might just try it with my Raspberry Pi.

Dartec
Posts: 5
Joined: Thu May 26, 2016 10:50 pm

Re: Running scripts on pyboard from windows command prompt?

Post by Dartec » Fri Jun 10, 2016 7:21 am

It works great on Raspberry Pi.

Thank you for the help.

Post Reply