minDUINO ‘Hello World’

This post assumes that your ATMEGA328 chip has a bootloader installed. Chips with the bootloader already installed can be obtained from many sources, including eBay. Details on how to install a bootloader manually will be detailed in a future post.

So, you’ve built your minDUINO and you need to test it. What do you do. The easiest way to test it is to get a real program running. Traditionally it’s a blinkenlight (Flashing LED). This is why a regular Arduino™ board has an LED on digital pin 13. However, I deliberately designed the minDUINO to have an LED on digital pin 10 which is a PWM pin and therefore I could demonstrate PWM to Amelia (who the board was originally designed for).

To run the test, connect your FTDI module to the minDUINO’s FTDI header, If you have the right module you can plug it directly in, otherwise, you can use easily obtainable flying leads.

FTDI Connection

FTDI Connection

You will see that the board is powered through the FTDI adaptor. Don’t attempt to power it externally at the same time.

Load the Arduino IDE and go to File-Examples-01.Basics-Fade Clicking on this loads another instance of the IDE. You may close the first one if  you like. In the code, you will notice the pin designated is pin 9.

int led = 9;           // the pin that the LED is attached to

Edit this to read ‘int led = 10;’ since our LED is on Digital Pin 10. Leave all the other code alone for now and click the tick icon to check it compiles. If not, check you haven’t changed anything else in the code and if necessary, start again.

Once the code compiles correctly, click the upload icon and the compiled code should upload through the FTDI module to the minDUINO and hopefully you will be greeted by an LED fading up and down in brightness. If this doesn’t happen, double check you have connected the FTDI module correctly, paying particular attention to the TX and RX lines. The header pins should match the FTDI module and not be swapped.

If this proves not to be the problem, double check that you have soldered the LED/s in the right way round. It is very easy to get this incorrect.

Hopefully, this will give you a quick and easy way of proving if your minDUINO is alive and well and lead to further experimentation.

This entry was posted in Equipment, Testing and tagged , , , , , , . Bookmark the permalink.