I think however there are cases when Ctrl-C will not interrupt the currently running code right away, but have an effect only once the current call is finished or something, maybe that's related? We don't quite know what code was running...
Or maybe... @pierrot10, had you actually deleted the console in Atom (clicked on the bottom part of the window) before hitting Ctrl-C?
@soren Sorry for the late reply. Atom currently always copies the top option in the list. If there is an actual Pycom serial detected, it will place that one at the top. Anyway, this is just a result of your issue, not the cause.
So just to be sure, after rebooting your mac, you are able to connect to your device? Then when switching out to a different lopy, the comport disappears from the list of serials, even when closing the connection during the swap? Do you switch expansionboards, or just the lopy? You could even hot-swap your lopy while keeping the expansion board connected, see if that helps.
OK now works!
I changed the device address in the global settings to the correct Com port and rebooted Atom and it picked it up fine.
Thanks again, @seb, rather strange this has only just started to happen!
@soren OK, So despite the no project, I tried uploading and it behaves really strange. It says "Connected" above the console despite the console saying "Connecting on COM4..." at the same time.. how does that make any sense?
Here's a snippet of my log:
Uploading project (main folder)...
Reading file status
Failed to connect (Error: Writing to COM port (GetOverlappedResult): Operation aborted). Click here to try again.
Failed to read project status, uploading all files
[1/5] Writing file boot.py
Connecting on COM4...
** and here it will stay forever, while at the same time displaying "Connected".....
@SenaPR Hello SenaPR, What I'm missing is in the auth= parameter of the connect statement the WiFi password of your router. I guess you just dropped that for showing th example..
And you cannot give your own device the IP address of the router, which is 192.168.1.1. So you must use something different, which is not in use at the moment, like 192.168.1.100. You have to ask the network administrator which addresses you may use.
Again, I see a problem with indentation. The last idle() statement is not indented properly and should raise an sytax error.
Are you sure that this boot.py is really loaded to your device? It has to, because is is executed before pymakr steps in. Otherwise, for testing you can give is a different name, like connect.py, and just put a statement like:
I do not trust the atom plugin.
Still: if your PC is connected to the office router, open the program cmd.exe, which gives you the good ol' MSDOS command prompt. At the prompt, enter the command:
That will tell you the netmask, the IP address of the router, and the IP-adress of the DNS-Service.