Using Arduino Uno with Ansteron IDE

1. Introduction

Due to insufficient number of users, Ansteron IDE has no longer supported Arduino since version 0.1.2.

Arduino(TM) Uno is a popular microcontroller board in DIY community. The Uno board has the same CPU as Ansteron Board so we are able to add supports to Ansteron IDE to work with it. In this tutorial, we will create a simple program to blink Uno's on-board LED as an example.

Most of Ansteron's software libraries will work with Ardunio Uno so you should be able to use them without having to modify. Details and instructions of those software libraries can be found in their articles.

If you are using a clone version of Arduino Uno or any compatible board, the setup and functions are pretty much the same. Note that some board may have a different CPU. Ansteron IDE only generates code to work with ATMEGA328(P).

2. Setup Ansteron IDE

You can download Ansteron IDE from software page then extract the package to your hard drive (or thumb drive). Ansteron IDE is portable so there is no permanent installation needed. In the folder, you will see file "ansteron.exe". Double click on that to run Ansteron IDE.

We assume that you've already had Arduino Uno board set up on your computer. If you're not yet having the board's driver installed, you can do that by following the instruction on Arduino website. Note that you may need Arduinio Uno .INF file to install driver which come with Arduino software so you have to download and install it as well.

In Ansteron IDE, go to menu Run then choose "Hardware setup". Hardware setup dialog will show up then you click on Ardunio Uno. You will also need to specify which COM port your board is on and the baurate. If you leave baurate at default, it will be 115200 bps and that works for official boards.

3. Create a simple program

The on-board LED of Uno board is connected to pin 13. When Arduino Uno is selected in Hardware dialog, definitions for these pins become available. The pin needs to be set as output to drive the LED using function set_pin_mode(PIN_13,OUTPUT);. The LED will be blinking as your program set and clear pin 13. A short delay between steps using function delay_ms(500); to let you see the change between on and off.

In Ansteron IDE, create a new program as seen below. Refer this article for instructions on how to create a program for users new to Ansteron IDE.

You will need to save the file to your computer before it can be compiled and downloaded. Press F7 on the keyboard or go to menu Build to compile your program. Press F5 to download compiled program if the build was successful. Menu Run/Download and Run do the same function as F5 key. If there is any error (typing/syntax) as well as the build and download process, Ansteron IDE will show a message in the lower area of the screen. After downloading, you should be seeing the LED on Uno board blinking.

Although pins A0 to A5 of Uno board are marked as analog inputs, they can be used as regular digital I/O as well. Analog pin numbers giving to analog read functions are 0 to 5 corresponding to pin A0 to A5.

4. Using Serial Interface

Serial interface can be used to view messages from your running program as well as data values or results. It can also be used as a simple debugging tool. To start Serial interface, call function setup_serial(DEFAULT);. After that, all other functions of Serial Interface can be used.

In the example above, Uno board will send a message every second. You can view these messages with Serial Terminal, a tool of Ansteron IDE. To run the utility, go to menu Tools then select Serial Terminal. On the top left corner of Serial Terminal, choose the port of Arduino Uno and the baurate matching with setting in your program (it was DEFAULT). Click connect button to start monitoring Serial port. The messages should be seen as below:

Please refer Standard library for other available functions of Serial Interface.

5. Conclusion

Most functions and Libraries for Ansteron Board can work with Arduino Uno. Their full descriptions are in other articles on our website. Besides, you can download and print a summary sheet of commonly used functions for faster reference.

We hope that you would use Ansteron IDE for your next projects, with either Ansteron Board or Arduino Uno. Join our forum and tell us about the cool things that you have done.

Thank you for viewing!