Arduino has emerged as one of the most popular tools for students and makers to express creativity and build projects. Many people start off working on the standard Arduino IDE for their programming. However, people who aren’t familiar with C or don’t like using text-based programming can sometimes spend many weeks becoming comfortable enough to build their projects. But what if you want to make your project right now?
XOD is designed to bridge that gap – to create a visual environment that is not a toy – and powerful enough to make some of the most complex projects. No matter if you’re just learning how to code or if you’re a veteran maker, XOD has the flexibility to help you achieve your goals.
1. XOD is free and powerful
Beginning work in XOD is made simple using either the browser or desktop program to launch the free IDE. Once inside the interface makes it easy to build your project and upload to a controller. Programming is powerful enough to make controllers like the Arduino UNO work without any hassle.
The default project after opening the browser IDE shows how easy it is to get up and running by deploying code to control an LED. When you start work in XOD there are several projects pre-loaded into the browser which makes learning simple. Students can easily learn to programme without the steep learning curve of text-based programming. Additionally, seasoned makers can use XOD to make more elaborate designs.
2. XOD makes programming easy
XOD is a designed to simplify programming. It takes common Arduino hardware, control structures, and logic and represents them with blocks called nodes. These nodes can then be linked together to design projects to control hardware such as LEDs, servos, motors, and much more.
The image above shows a simple example of controlling an LED using a potentiometer. The LED and the potentiometer are each represented by nodes. These nodes can then be connected as needed to create different projects. This project works easily after connecting each of the nodes. The led will get brighter and dimmer as the potentiometer is turned. This simple project can be expanded to develop more and more complex programs.
When you get started with XOD there are several built-in projects that allow you to easily get started exploring the abilities of the IDE. One of the most common starter projects is making an LED blink. Here we can explore this idea to show some additional features.
The image above shows one of the example projects built-in with the default tutorial. There are built-in comments instructing users on how to begin along the way. In this example, there are three nodes connected together to make the LED blink. The clock node will output a pulse to trigger the node below it. In this case, that pulse goes to the flip-flop which handles turning the LED on and off each time it receives the pulse.
Within this project, we can begin to see how to customize the behavior in the workspace. The built-in comments allow the user to see the flow of information for each tutorial. Another helpful option is to use the built-in help bar that shows information for each node.
From the top menu, users can select View >> Toggle Helpbar to show the help bar on the right. Here we can see more information about each input and output for the clock node. The same information is available for each node inside XOD. One huge advantage is this keeps users all in one place without having to search through tutorials and documentation to find information on specific items.
For the clock node, the help bar indicates that the IVAL number input represents the tick interval in seconds. After learning exactly how the clock node works the next step is learning how to customize it. Within XOD the inspector users can modify that input to customize their project.
The inspector on the bottom left part of the IDE now shows each input and output that was described in the help bar. The default version for this project set IVAL to 1 second. Here in the inspector, that value has now been changed to 2. Now instead of the LED blinking each second, there will be 2 seconds in between blinks. From these two examples, we can see how simple projects can be easily created and adapted within XOD. The next step is to take a look at all the additional features that set XOD apart from other visual languages.
3. XOD is adaptable to complete complex projects
One of the best parts of programming in XOD is how intuitively parts flow together without complex syntax. It’s easy to look at complex projects and get a great visual of what is going on. Scientists use charts and graphs to better explain data sets and models; in this same manner, XOD uses visual nodes to represent text-based code. One of the great parts of building a complex project is the ability to create your own nodes to make your program easier. In traditional text-based coding, developers use functions to break their code down into manageable and reusable chunks. XOD uses the same idea by allowing users to build their own nodes. Let’s take a look at a more complex project to demonstrate this idea.
The node above shows some of the more elaborate features of XOD to control two DC motors as part of programming a robot. For now, it is ok if you don’t know exactly how each part of this works. This particular section of code makes the robot move forward. The great thing about XOD is this entire chunk of code can be saved as a node called “forward” and then used an reused in other places within the project.
Here we can see a much less complex look at what is going on within the project. Instead of showing every single node in the project we can use the “forward” node to make a much more readable example. Here we can see the steps of what is happening in simple terms without having to see all of the back-end nodes from the previous image. To learn exactly what is happening inside this project be sure to read this article on motor control.
4. XOD is fully customizable
Out of the box, features are vast and ever-growing thanks to continuous open-source development and an active forum where users discuss ideas and can publish libraries. That being said each project is different and may require using nodes that don’t exist within the standard IDE. This is where seasoned developers will really be impressed. Part of XOD allows you to look “under the hood” of what is happening within the nodes to see the C++ code that drives the programming. Within this users can completely customize their program to fit their needs.
The above image shows the simplicity of programming a servo with XOD. On the left, we can see the standard servo node. It makes the servo simple enough to only have two inputs: the port on the Arduino and the value for the location of the servo. The picture on the right shows the C++ backend controlling the node. Here we can customize even further than in the previous section by using C++ code to fit your exact design goals. A simple example of this can be explained by looking more closely at the C++ code inside the servo node.
The standard node automatically attaches the servo and starts moving it to a specific location. This is nice for simple features but may not be used for more complex programming such as robotics. One instance would be the need to detach the servo after it is finished with its goal. This can easily be done with C++.
This code could be added to the end of the function to detach the servo after writing to its specific location. That shows one specific instance but each and every node can be customized or created using that same process. To read more specifics on node customization check out this medium article on Hacking Nodes with C++.
5. XOD has a strong community
XOD has a strong team of developers that are working every day to make new nodes and features. There are often instances where someone within the community will post an idea or question to the forum and the developers will work to make sure the problem gets solved. With an ever growing following other users are able to work collaboratively to achieve goals. Often times forum posts will be discussed and solved by other users that are working to achieve similar goals.
Earlier we looked at how you can build your own custom nodes to use in your project to make your programming more clear and concise. Often times users will share their nodes via external libraries so that others can easily use them. These include simple tutorials, MIDI customization, motor control and much more. Feel free to browse published libraries to see if any line up with your projects.
Libraries are a huge part of collaboration and XOD makes that simple. Part of the IDE has a drop-down menu that allows users to share libraries with others by publishing them or import libraries to use existing frameworks.
Managing libraries is made simple within XOD. Users are able to click a few buttons from the drop-down menu to add in libraries or share their libraries with others.
6. XOD has great tutorial projects
As you begin looking at how to build your project make sure you check out some of the things users have built within XOD.
Be sure to check out my tutorial series on designing a self-driving car. This explores many advanced features of XOD while controlling motors and servos.
Automatic Trash Bin
Check out how MadGyver used XOD to build this trash can that opens and closes at the wave of a hand.
Mert Arduino and Tech made a really cool YouTube tutorial explaining how you can build a robot arm, program it with XOD, and control it with the potentiometers.
Interested in getting started?
Start off by heading over to xod.io and opening the IDE. From there you can find tutorials through XOD’s documentation, medium blog, and YouTube channel. Check out XOD’s Facebook and Twitter pages for updates, and be sure to join the XOD community on the forum where you can post your questions or share your project. Make sure to leave any questions or comments below.