Pymakr: connected but cannot run script over serial
just got the WiPy 2.0 board. I updated the firmware to the latest version and am running Pymakr 1.0.0.b8 version on Win7 64bit. I can successfully connect to the wipy using a serial connection. It says "connected" in the repl prompt and I can type stuff and get proper answers. I then wanted to run a script. So I type some code in a file that I named "main.py":
from machine import I2C
#configure the I2C bus
i2c = I2C(0, I2C.MASTER, baudrate=100000)
i2c.scan() # returns list of slave addresses
and I also added a file named "boot.py" with the following code:
from machine import UART
uart = UART(0, 115200)
I then tried to sync the projecto to the Wipy by pressing Sync but every time I do that it says:
Syncing the project with the WiPy. Please wait...
Resetting doesn't help. To sum it up, I can use the REPL command but I cannot run a script over serial. Did I understand the usage of the boot.py and main.py file correctly? Do I always have to put my code inside "main.py" to run it? What am I doing wrong? It seems to work over WifI but not over serial...I'm lost and very new to this micropython stuff...
Thanks for your help!
thanks for your replies. Ok, I'll look into ftp for now and check back for new firmware versions. Thanks for your help!
Ralph last edited by
The sync functionality has not been working properly since the last few firmware versions, due to issues on the available RAM. We're working hard to solve this, so keep an eye out for the next firmware releases. Sorry for the inconvenience!
Until it is fixed, try to use FTP to upload your files, then rebooting the device (boot button) after which boot.py and main.py will automatically run. You can keep the serial connection open in pymakr (or other serial program like putty) during the process to see all the output.
livius last edited by
as i say previously i do not use pymakr
try using e.g. putty or com port monitor - e.g. from Arduino IDE
and connect by filezilla or other ftp client - for me it is fastest way to develop
Ok, thanks for the info. Just tried it in Pymakr. Added a simple print statement to my "main.py" file as a test then ran:
execfile("main.py") but nothing shows up in the repl prompt.
Mmmm...I don't know what to do.
livius last edited by livius
Do I always have to put my code inside "main.py" to run it
No you can write any file e.g. my.py
and exec it like:
execfile('my.py')in e.g. REPL or telnet
especially i do not use pymakr
i connect by ftp(filezilla) + COM port monitor
by filezilla i edit and upload files
by REPL i execute and test things