empowering creative people

Videos / How to Setup ATOM (GUI Code Editor) on Onion Omega2

In this tutorial, we will learn how to code for the Onion Omega2 on our PC, and then wirelessly upload our code using the ATOM text editor.

Search Videos

Related Content



Hi, I'm Dave, from core electronics and today we're going to learn how to use the atom text editor to make developing code for our Onion Omega a lot smoother and a lot nicer. Let's get started.

The first step is to install an SMTP server on the onion Omega so that the atom editor can wirelessly send and receive files from it. So first bring up your onion console in your browser. Open the editor app go down to, etc', I'm the opkg file, folder sorry and up in the distance conf file. Looking for this line which should be line 5 that starts off with SRC / gz reboot packages. Remove the two hash marks from the start of that line and save your changes. Then close that file go back to the console and bring up the terminal app. Log in to the terminal, which is just the default onion username and password. Ok, the first command we need to run is, opie AG update and that's complete the next one here's opkg install, open SSH SFTP ash server.

Okay the SFTP server should have it installed and running on our onion Omega so we can close the console GUI.

Now we need to install and configure the added text editor so we're first up open your browser and navigate to atom.IO. This should automatically detect what operating system you are using and present you with a simple download link, go ahead and download that file.

And that file is complete we can begin the installation. Execute the file we just downloaded. Close the browser now

Okay, now the other editor has been installed and is opened. The first thing we need to do is come over here and the pane on the right and install package. Click open installer and we can search packages search remote - FTP. There's remote FTP we hit install.

All right that's successfully installed. Now we'll start a new project so we can configure at the FTP settings onion Omega and edit our first file. So we go add project folder. Actually, we have to create a folder first. Select it over on packages navigate down to remote FTP and press toggle which will bring up the remote FTP pane on the left click Edit configuration that's opened up a text file here, which is called dot FTP config copied the following text into that file and you'll need to change the name of the onion Omega to match your omegas unique name if you're not using the Bonjour name service you'll have to enter the IP address of your onion Omega and if you changed the password you'll need to update that as well. Once that's complete save and hit connect. And you can see remote FTP is connected and we have access to the entire onion Omega file system.

Now let's have a look at a simple demonstration to see how this can all work Wednesday we're developing a Python application. We open our browser and go back to our onion GUI, I login into the terminal alright so here's a Python program that I've been working with earlier, I'll run that now. Which calls the gpio zero to flesh very slowly. Now if we go back to atom and we can find that file which is en route Python and I can open that file for editing so I'm just going to make a couple of simple changes here I'm going to change, the GPIO pin that we're using from 0 to 1 and I'm going to change the sleep time between states from 5 seconds to 1 second. File save. Go back to the terminal and stop that program running and run it again. Now I can see it's changing GPIO 1 and it's doing it much faster. So any changes we make or are made to the files will automatically show up in the atom text editor.

There are also numerous packages we can install to make developing applications in any programming language easier with features like syntax checking and predictive text.

Thanks for watching, I hope you find the atom text editor as a useful tool if you have any comments or questions or need some help don't hesitate to leave a comment below or to go over to our forum. We are a team of full-time makers here and we're here to help. Thanks.