📜 ⬆️ ⬇️

We program Arduino using Sublime + Stino on MacOS



I would like to share the experience of setting up and using my favorite Arduino programming software on Mac OS. Many use Sublime as a good programming environment, for example, by adding the Stino package you can get the opportunity to write code and upload it to Arduino controllers. A lot of manuals have been written about how to do all this in 10 minutes under Windows, but this is not enough to make it work on Mac OS. If you have a Mac and Arduino, welcome under the cat (attention, a lot of pictures!).

So, I currently have this set:

- MacBook Pro Sierra OS
- Arduino IDE 1.6.11
- Arduino AVR Boards 1.6.13
- Sublime Text 3 (build 3126)
- Stino (v2016.01.22.05.51.02)
')
First of all, install the Arduino IDE , run it in the IDE itself, install the required version of the Arduino AVR Boards in the Board Manager, everything worked for me with version 1.6.13:



Next, download and install Sublime Text 3 . I think there should be no special problems here and I will not particularly focus on how to install software for Mac, I’ll not move on to the actual configuration.

I also advise you to check whether the program is loading the Arduino controller from the Arduino IDE, if everything works, then go ahead, if not, then first find the reason.

Now we have to add the ability to install add-ons to Sublime, for this we need the Package control ( follow the instructions here ). Everything is exactly the same as on Windows, go to View -> Show Console and copy the code from the site there, using the link above.



Then Package Control will appear in Sublime Text → Preferences .



Next you need to add a repository, from where we will install Stino, a package for working with Arduino.
Select Add Repository and enter the following into the line below:

https://github.com/gepd/Stino/tree/new-stino 


After we install Stino, Sublime Text → Preferences → Package Control and there Install Package , then enter Stino .

Now in Sublime Text in the menu on the far right appeared the inscription Arduino. Almost everything is set up to work with Arduino controllers, there are a couple of important points left.

Specify the path to the folder with the Arduino IDE, for this in the Sublime program, go to the new Arduino menu and there Preferences → Select Arduino Application Folder . If you have not previously placed the Arduino IDE in any place or another, then by default it will be /Applications/Arduino.app .



When I installed it all for the first time, I thought that everything was ready at this step, and you can already write a program in Sublime Text and feel free to upload a controller to the Arduino. So I did and encountered compiler errors. What is most interesting is that everything was filled up perfectly with the Arduino IDE, and there were some problems with Sublime + Stino. A quick search for specific answers did not give, who advised to play around with the versions of the Arduino AVR Boards, who advised switching to very early versions of the Arduino IDE, and so on. None of the options on my Mac OS Sierra earned. After reading a few dozen pages on Stack Overflow, I found a solution to why it all works in conjunction with me under Windows, but it does not work under Mac.

And so, go to the Applications folder, find the Arduino there, on the double-click icon and Show Package Contents . Next, proceed to the Contens / Java / hardvare / arduino / avr folder and find the platforms.txt file and open it in the same Sublime Text. Go to line 101 and delete {upload.verify} there . After that, the line should look like this:



Save and reboot Sublime Text and try to load the program into the Arduino controller. Do not forget to choose the desired port!



The result - everything was flooded without errors. I hope the article will be useful to those who would like to work in a convenient Sublime text and write code for Arduino controllers.

Source: https://habr.com/ru/post/357912/


All Articles