AVR Projects‎ > ‎

002 Projects using Arduino Language and EvB4.3 board

1. Forewords

First ensure you that you have read this page first!


This time, is about only one archive which contain all the external libraries required in order to deal with the peripherals on our board. Download the archive (it contains additional libraries for DS18B20, Infrared comm., SD Card, OneWire, PCF8583) from here and extract it in


All libraries were successfully tested (there were some glitches). The only thing which is missing, is a library for 7 segment digits. I will attach it lather and update the archive.

Now, we will test the libraries with some examples and one of the targets is to restore (or to make something similar or better) the original example which come with the board (you know, displaying the time, temperature and the codes received via infrared sensor on LCD).

Another target is to create a complete and user friendly logging application, with SD-Card, start/stop buttons, card eject button, LED indicators, logging temperature, voltage, and current time.

3. Setting the board, and...

  ... things you should know.

 ... what pins (again, look at the pinout from the page linked in "Forewords chapter") you must avoid when you design your application:

 - [Digital o] - this is a free pin used by the bootloader to signal (using a LED connected to this pin) when firmware is in boot mode and it is flashing when a program is uploaded to the chip.

 - [Digital 8, 9] - these two pins are physically connected to USB-to-serial converter, FTDI - you can use them only if you don't use USB communication.

 - [Digital 16, 17] - these two pins are physically connected to EEPROM and PCF8583 RTC - can't use them in applications, only if is about an I2C device (and, in this case you must know that I2C addresses from 0xA0 to 0xA3 are used by the above devices).

 - [Digital 2] - this is a free pin, assigned by me to One_wire library. Can be on any free digital input pin.

 - [Digital 3] - this is a free pin used by the Infrared library as an emitting infrared diode, so be aware of it when you use the library (even if you use only reception and, in this case, if you need to use it, you can use it as digital output pin)

 - [Digital 13] - this is a free pin and is used by many applications as a signal LED. It is also used for "Hello World!" blink example.

 - [Digital 4, 5, 6, 7] - these are free pins, assigned to SPI microcontroller peripheral and the only SPI device we have on board is the SD Card connector. Reserve them for that if you don't need them in your application.

 - [Digital 22, 23, 24, 25, 26, 27] - these are free pins and I reserved them for use with the LCD  display

 ... the 5 push-buttons from the board are connected to the ground and don't have 10K pull-up resistors. The solution is to use as is stated on Arduino site:

"The analog pins also have pullup resistors, which work identically to pullup resistors on the digital pins. They are enabled by issuing a command such as

digitalWrite(A0, HIGH);  // set pullup on analog pin 0 

while the pin is an input."


... lets set the board. Cut the power off (remember, any connection you do on the board, make them always with the power cut off). I propose the following permanent wire connections, not matter what application we we present here (unless we are running out of pins):

Wire  connections
 ATmega pins
Peripheral pins
 Assigned name
 Digital 0
One of the 8 LED's  from the board, at your choice
Boot LED
 Digital 13
 One of the 8 LED's  from the board, at your choiceD13 LED

Power the board by inserting the USB cable and you are ready to go (at least, for Blink and reading timer examples... for others, you need more connections to make so, maybe is better to not power the board).

4. Tutorials, examples, applications

Please,  note that these examples are not for teaching you (Arduino official site can do it better than me) - examples are here as some sort of testing programs, to see if we can use the peripherals from our board with Arduino language, to see if we can put up together a complete developing package. The rest is up to you!

Examples, tutorials, etc...
 Page name
Hello World! LCD
The Hello World! sample for the 16*2 LCD display.
DS18B20 temperature sensor
Reading the temperature sensor on the board
Reading/setting the PCF8583 RTC
How to read, set and send on serial console the date and current time
Diplay on LCD the current time
The same thing as above but using also the LCD display to show the time
Reading the IR TSOP4836 sensorReading the infrared sensor and how to solve some issues ... Now we have all elements to restore the original demo application which come with the board.
EvB 4.3 Original demo
Yes, we are able to restore the original demo (in fact, a little better than the original) - This is our first target!
Append file on SD-Card
How to use the ... library to create a text file and append data to it. This is needed for our logging application.
Sanguino logger
Finally, a logging application where we will log time, date, voltage, temperature on files created once on a month (we will have 12 files on an entire year... but more details on project's page). - This is our second (and last?) target.


Vasile Guta Ciucur,
Feb 1, 2011, 8:18 PM