Close

Setting up development environment

A project log for Cheap underwater tilt current sensor.

Cheap (<$100) underwater current sensor that can be deployed at 70ft depth. Your thoughts, comments and advice are very welcome here!

max-kviatkouskiMax Kviatkouski 05/14/2018 at 02:550 Comments

At first my development environment was Ubuntu + Sublime Text + bash script to copy files over to PyBoard. Bash script simply copies all *.py files to PyBoard that appears as a flash device. (Attached for an example, you'd have to put the name of your PyBoard instead of mine).

https://github.com/max-kviatkouski/pyboard-current-meter-logger/blob/master/deploy.sh

Then I thought that it would be nice to checkout if PyCharm offers any support for MicroPython. And it does! There is a plugin that offers some autocomplete support. The only issue is that at least in latest version (which is 1.0.6 now) plugin ignores specified excludes and attempts to copy .idea folder of your project as well as .git folder (if you're using git). It's possible to move .git outside of your project folder. Moving out .idea is possible as well but it's getting tedious so I'll try to fix the plugin and make a pull request.

One more important note: make sure you have proper permissions to access serial port. I had to make my user a part of "dialout" group to have access to PyBoard serial port as non root. After you add yourself to the group don't forget to logout/login out of Ubuntu for changes to take effect.

Discussions