Posts: 5
Joined: Wed Oct 08, 2014 6:36 am

Program Atmega328 with the Arduino IDE and setup atmega48

Thu Oct 09, 2014 2:26 am

Hey Guys,
I just setup my GertDuino with this instruction:

http://www.raspihub.com/go/763443df72d2 ... 3d282ac312

And for the avrdude I got this instruction:

https://projects.drogon.net/raspberry-p ... ega-setup/

I than startet ./avrsetup and choose 1 for the ATmega328p. It was succesful.
Afterwards I tried the blink file and it works. I also wanted to try the arduino program to change the program and just to get to know the new board. When I start the program it opens normal but if I want to change the Board options I only have Arduino options and for the Programmer I haven't got any option for the rpi. Like mentioned in this instruction:

https://projects.drogon.net/raspberry-p ... duino-ide/

I know it is for the gertboard but I also should have options like that? I hope you can help me with this problem!

I have another issue as well and hope you could help me with this one and I don't want to open a new topic because maybe they are connecting to each other.

I also have to say that if I just tried to 'sudo halt' or 'sudo poweroff' the raspberry with the gertduino the raspberry restarted after a couple of seconds. To shut down the rpi the only command which worked was:
sudo shutdown -h -H now
I have read in some other forums that this happened for other people to so I didn't bother.
Than I moved the jumper to configure the ATmega48p and tried to change the setup with the ./avrsetup.
Actually there are 2 options for the 48:

..3 for the Gertduino ATmega 48p at 8Mhz
..4 for the Gertduino ATmega 48p at 1Mhz

I tried both but I got these responses:

Oops -something went wrong, sorry...

But after I tried:

./program_48 low_power

the rpi shutdown and didn't reboot when I used only sudo reboot. So it seems that it uploaded the program to the atmega48. So can I just upload some new program without changing the ./avrsetup and only change the jumpers or do I have to change something? Maybe it is just a wrong version of avrdude?

Many thanks for help!

User avatar
Gert van Loo
Posts: 2478
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Program Atmega328 with the Arduino IDE and setup atmega4

Thu Oct 09, 2014 7:17 am

If you do not see the board in the IDE you have probably forgotten to edit the boards.txt or programmers.txt file.

Setting up everything so the Gertduino works is a lot of work.
I tried to make it easier by providing a Makefile with instructions here:
http://www.raspberrypi.org/forums/viewt ... 96&t=65449

Posts: 5
Joined: Wed Oct 08, 2014 6:36 am

Re: Program Atmega328 with the Arduino IDE and setup atmega4

Thu Oct 09, 2014 7:28 am

edit: works perfect thanks for the quick reply

Thank you for programming this makefile, but I really have to say I looked online before I tried to setup the gertuino and I couldn't really find a good solution. Maybe you should put it in the manual or something else because it is a great help.

Return to “HATs and other add-ons”