Pymakr Atom Plugin released
After a good number of weeks developing, we are ready to announce that the Pymakr Atom plugin has been released to the Atom registry! It's got all the important features the old Pymakr app has, but build right into Atom. The old Pymakr desktop app will still be available to download, but will not be maintained anymore.
To install the package, go ahead and:
- Download and install Atom from atom.io
- Open the settings page in Atom and go to the 'Install' tab
- Perform a search for 'pymakr'
- Pymakr 0.9.2 will show up on the bottom of the search results (because it doesn't have any reputation yet)
- Click 'install'. This might take a minute or so, for installing all the dependencies.
- Update your devices to the latest firmware (1.6.11.b1 or higher)
The plugin features a REPL terminal on the bottom of the screen, that opens on startup. The terminal has all the features you're used to from the old Pymakr and commandline; directly running commands on the board, arrow keys for previous commands, tab to autocomplete, ctrl-b/c/d commands, copy paste support, and more.
It has a row of action buttons just above the terminal that can be used to setup the board, run one file or sync your entire project to the board. You can also close the terminal, which will disconnect the board. It will remember the open/closed state when restarting atom so it's not in the way when you are using Atom for other projects.
To setup the board use the Settings button on the right top of the terminal. There you can enter the device address as an IP or comport. Change the username and password if needed. Now click the Connect button above the terminal and you are set!
As soon as you have a project opened with your main.py and boot.py file, you can go ahead and press the sync button to upload all files in your project to the board.
If you have your python files in a subfolder of the project, there is a 'Sync folder' setting to tell the plugin which folder you want to sync to the board.
With any python file open, press the run button to run the code to the board. Any output will be printed to the terminal. Either wait for the script to finish or press the cancel button to stop the script.
- docs.pycom.io - The pycom docs have been updated with extended instructions for the Atom plugin (chapters 1.5 and 2.7)
- atom.io/packages/pymakr - The pymakr package on the atom repository
- github.com/pycom/pymakr-atom - Code repository. Please file bugreports here
Some improvements we already have planned are:
- Auto detect of comports
- Running files even when they are not saved yet
- Making the terminal panel resizable
- Making a subset of the settings project specific
Please let us know what you think of the plugin. Any feedback or questions are welcome. Bug reports can be posted on github. We'll stay active in bugfixing and improving the plugin, especially in this first period after release.
Next up: the Visual Studio Code plugin!
On windows 10 I cannot see any package named pymakr when searching in the installation tab and when i try to install it manually i get thee following:
How to install the pymakr plugin sucessfully ?
Hey there! So after testing the plugin for a few days I have to remark that debugging with the pymakr Plugin is quite hard. When it comes to an error the compiler output is often times incomplete and changes after running the same error-having code for several times... However, the compiler output is complete when I use my terminal.
@pwest @smssms If you have time, please test the code on the develop branche on github (instructions for manual installation are in the readme file on the develop branch). This code contains pre-compiled versions of the serialport lib for both mac and linux (64 bit), which should solve both of your issues.
Let me know if it works.
@smssms Same problem on Linux Mint 17.3, Cinnamon, 64-bit
ping is OK
telnet is working
i can connect on the python interpreter with the default login / password
only Atom/Pymakr is not working
@pycom please help
First test if your ping reach device
show us response
Same problem for me
MacOS X 10.12.4
Lopy FW 1.6.12.b1
any other solution to use my Lopy ?
Hi @Ralph I see you have a lot on your plate, but I wonder if it will also be possible to one day program via a Jupyter notebook? This would be fantastic for rapid expolration of data generated by the board.
Of interest https://github.com/adafruit/jupyter_micropython_kernel
@MaSePreetz You are right, the behaviour is a little less straight forward. Turns out Atom stores this state per project. So if you have one project open, close the terminal and then close atom, the terminal will still be closed when opening that same project. But when opening another project, the state will be set to 'open' again.
Considering that, it might be useful for some people to have a 'don't open on startup' setting for the plugin, so it will always stay closed by default.
Hi @Ralph, thanks for the swift response.
You are right, i forgot about the disable button.
But the second method does not work for me when the plugin is enabled.
Atom always opens the plugin window with auto-connect when i open Atom (Atom 1.16.0 on Windows 7 64Bit),
regardless of the previous state of the plugin...
Hi @MaSePreetz, Thanks for your feedback. At the moment there are already 2 ways to do this:
- In the Pymakr settings screen or you packages overview, you can Disable the entire plugin
- Click the 'close' button of the terminal and leave it closed. When restarting atom it'll remember this state and will not connect. The 'open' button will stay on the bottom of the screen so you can open it at any time.
Is this what you were looking for?
I have one improvement for the plugin:
After a normal install the Plugin is always active and tries to connect to a Board with the last active settings.
This is fine in case Atom is only used as PyCon IDE.
But i use it as well as a normal editor and then the plugin window is in my way and thus reducing the amount of available screen space.
Is it possible to have a setting/checkbox in the preferences of the plugin to prevent the auto-start/auto-connection?
For me it would be fine to activate the plugin via the menu or even in the preferences when i need it.
Anyway, thanks a lot for the plugin!
I feel with you about the serialport problems on the different platforms. Native node.js libraries are not easy at all.
@mmbermudeza Good to hear you got it working. We're considering pre-compiling the library and shipping it with the plugin, so we will prevent these kinds of problems. We'll have to do some testing though to see if it works for all operating systems.
@Ralph This solution didn't actually work for me even having python 2.7.
Tried the npm install of serialport in node_modules but the versioning was wrong.
At the end had to copy the folder from another computer and has been working ok since then
@robmarkcole Thanks for the report, it was simply a wrong method name in the handling of the short-key ctrl-alt-s to do a sync. It has been fixed in the development branch on github and will be included in the next release. Unfortunately I released 0.9.3 today just before reading about your issue, so it'll be in 0.9.4 in a few days.
The missing sync and run button are a known issue, which I'm still investigating
V0.9.3 has been released with some minor fixes:
- Improved sync stability and speed over serial
- Solved disappearing line in terminal (github issue #3)
- Other small bugfixes
- Logger class for easier debugging
Been getting a strange error after Atom loses connection to my board (e.g. when I sleep my mac):
TypeError: _this.view.synchronize is not a function
at atom-workspace.pymakrSynchronize (/Users/robincole/.atom/packages/Pymakr/lib/main.js:21:45)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:259:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:59)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1179:28)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:312:25)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
Upon reconnection I not see the option to sync my code:
However upon restarting Atom everything is normal again.
+1 for this error (on Linux Mint 18 64-bit). I've tried all the solutions listed but they did not work.
@robmarkcole thanks! We'll get this fixed :)