The Cloud9 IDE is an open-source web based programming platform that supports several programming languages.
This great piece of software comes installed on your BeagleBone Black * by default. And in our opinion this is one of the key features that makes the BBB a great programming board (the Raspberry Pi lacks a good IDE).
The code you write on your computer web browser is immediately passed to your BeagleBone Black through SSH.
Cloud9 also comes with other features such as: code completion, powerful search functions, drag-and-drop functionality, programming in multiple languages, SSH, FTP and a lot more.
Launching Cloud9 IDE
Grab your BeagleBone Black and connect it to your computer through a Mini USB cable. If you want more details, first read our Getting Started with BeagleBone Black.
After the board boots up, open your web browser, and type http://192.168.7.2:3000 in the address bar. You see something similar to the following figure.
Cloud9 IDE overview
The following sections give you a closer look at the six main areas of the Cloud9 IDE.
Menus tab: Like any computer application the menus in the Cloud9 IDE are organized in a very familiar way: File, Edit, Find, View, Goto, Run, Tools and Window.
Workspace: You can access all your folders and files with the workspace window. Everything is organized in a hierarchy.
Editor: When you open one of your scripts, the editor window looks like the one shown above. The editor highlights the functions according to the syntax of the programming of the file you have open.
Console: When you run a script, the console prints the output of your application. Those messages are commonly used to debug your code.
Debugger: The debugger is the perfect way to see exactly what is happening when you run your scripts. You can create a breakpoint so that your code runs only to a certain line that you define. You can also see which functions your code is calling and which values are stored in your variables.
Terminal: You can control your BeagleBone Black directly from the web browser, meaning that you can update or install new software, move files, and perform other commands.
Tip: Using Keyboard Shortcuts with Cloud9 IDE can save you a ton of time! Read this article we wrote at dummies.com where you can see all keyboard shortcuts.
Testing a BoneScript example
In your workspace area open your “demo” folder and double-click the file “blinked.js”. This basic script blinks all four USR LEDs and also pin P9_14 in your BeagleBone Black.
To run you script simply press the Run green button on the top center.
Your BeagleBone Black should start blinking your USR LEDs immediately!
Note: If nothing happens after you click Run, you’re probably running the script in debugger mode. To turn off debugger mode, click the little bug icon as shown in the Figure above.
That’s all for now! In the next part will create a web server with BoneScript that can be accessed with any device in your network to control outputs. If you enjoy this series make sure you subscribe here so you don’t miss our next blogs posts using this board.
Special thanks to Luís Perestrelo for helping Rui Santos putting this series together!
* We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.