MariaMole is an OpenSource IDE for Arduino. Like the original Arduino environment, MariaMole makes easy for users to create Arduino software. But, while the Arduino IDE is focused on making things the easiest possible for beginners, MariaMole brings some features that experienced users are used to find on professional IDEs. You can see more about it on its oficial webpage
First of all: If you don't have MariaMole installed it, you can download it from SourceForge here
This tutorial will help you with your first steps on MariaMole environment. Click on the images to enlarge them. So, let's go:
1 - Open MariaMole
As this is the first time you're opening it, it has no previous configuration. So you'll need to define some things.
The first thing is to identify where your Arduino software is installed. MariaMole relies on some files from the original Arduino install, so you need to tell where you have it installed. If you don't have it yet, you can download it from www.arduino.cc
Right after opening, MariaMole will ask you where the Arduino files are. Just select the right folder.
If you miss this window for any reason, just go to the Edit menu, and select Preferences. Then, select "Arduino" and click on the button "Change", like on the next image. Then the "arduino path configuration" window will appear again
2 - Create your workspace
Don't be scared by the fancy word "workspace". This is just a folder on your computer where you will store your projects. You can use a single workspace for all your projects, or group them in separated workspaces. It's up to you. If you want to share or backup a workspace, just copy this folder.
To select a workspace, press the first button on the toolbar, and select the desired folder:
3 - Create a new project
"Projects" are the MariaMole equivalent to Arduino "sketches". But "project" is a common term around the software developers community, so that's why we use it.
You can create a new project from scratch, or you can import an Arduino sketch, or you can create a new project based on Arduino example. Let's do this last one.
On the toolbar, press the second button to open the "New Project" wizard.
Once you did that, select the option "Import from Arduino examples" to show the list of examples:
Select the following example: 01.Basics -> ReadAnalogVoltage, then press the button "Next"
Now you're going to set the project properties.
First, you need to give your project a name. You can use the default name on this example
You also need to set your Arduino board, the programming method and the serial port you're going to use.
If you do not know which programmer you should use, just select "AVR ISP", which is the default for most of the boards. Make sure your board is plugged on your computer, so MariaMole can detect the serial port.
If you're not sure about these settings right now, just use the default ones. You can always return to this window by clicking on the "Change project options" on the toolbar.
When you have finished with these settings, press the button "Ok"
3 - Working with your project
Now your project is loaded and, since it's based on a well-tested Arduino example, it's also ready to be uploaded to your board.
But, first, take a look at the project. You can see the workspace tree on the left side of the main window. This tree shows the hierarchic structure of your workspace, with all projects as branches, and the files inside each project are sub-branches. This helps you keep you code organized, and enables you to work with several projects at the same time, each one with it's own settings.
You can see that your project name appears in a bold text on the workspace. That means this is the default project right now. When you work with two or more projects at the same workspace, actions like build the project, upload to board or open the serial port, are done over the default project. To select another project as the default, just double-click it on the workspace tree, and it will become bold
Now, double-click the file "main_sketch.cpp" on the workspace tree. This is the file MariaMole created for you as the main file for your project. It contains the code imported from the Arduino example. This file is the equivalent of Arduino ".ino" files, except that MariaMole uses the standard extension ".cpp" for C++ files.
Whenever you double-click a file on the workspace, MariaMole will open it.
Now you can simply build and upload the project to your board. Since you have configured the settings of your board, programmer and serial port correctly, MariaMole will take care of everything for you.
4 - Building and uploading
On the toolbar there are two buttons related to that. The Build button and the Upload button. The Build button will compile and link your project, generating a file that contains the Arduino "firmware" you need to put on your board. The Upload button sends this file to your board. If this file is not ready or it's not updated, the Upload buttons also build the project before uploading it.
So, just hit the Upload button and you will see the building progress window:
After building the project, and if there are no errors, the uploading process will start. You can see it by the yellow bar
After this process, if there are no errors, you're gonna see a "success" message similar to this one:
If anything was not ok with these steps, check your project properties to see if you've selected the right board, programmer and serial port. Also check if your board is correctly attached to your computer. If the project properties wizard doesn't show your serial port, there's a chance it's not well attached to your computer.
5 - Interacting with your Arduino board
The example we used keeps reading an analog value on Arduino pin A0 and sends it via serial port. So, open the serial port console to see these values.
Click the "Open serial port window" button on the toolbar to open it.
The serial console will wait 2 seconds, because some Arduino boards need some time to reset when the serial port is open.
After that, you will see the values coming from Arduino:
5 - Changing the code
This example sends a lot of data via the serial port. Let's slow it down, so we can watch them better.
Go to the file "main_sketch.cpp" of your project and find the last line of the function "void loop()"
Add the following code at this point:
This will make the Arduino wait 500 miliseconds after every value transmitted.
Your new code will be exactly like the following image:
Now press the Upload button to build and upload your project:
You will notice that the build window appears, but it closes without uploading the project. The cause of this unexpected behaviour is displayed at the messages window, at the bottom of the main window: there is an error in your code. Double-click the red error message to see the part of the code that is wrong:
Yes, that's right. That last added line is incorrect. As the error message says, "Delay" doesn't exist. The right name of this function is "delay". As C/C++ code are case-sensitive, "Delay" and "delay" are different and the compiler doesn't recognizes the first one.
So, just fix it, changing to "delay (500);", and your project will be ready to build and upload again!
And that's it. You are now ready to create your own projects and files. If you need any other help, feel free to contact me via the Contact link at the top of this page