Arduino sketch - compilation error

6 replies [Last post]
wpmax
Offline
Freilassing, Austria
Joined: 4 Jul 2011

Hi,

after Derek gave the link to the liveboxHAH.pde Ardurino Sketch to me l tried to compile and burn it via the ardurino environment to the 328.

Unfortunately there is an error during compilation of the Sketch:

Is there anything to include before compilation?

Thanks for your help/manual for compilaton!

Markus

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Not a Sketch

I might be wrong, but this looks like a bunch of HTML, not an Arduino Sketch.

The Sketch is at http://code.google.com/p/livebox-hah/source/browse/trunk/userapps/arduino/liveboxHAH/liveboxHAH.pde

... the first few lines read like this :

/* $Id$
 Copyright (c) Brett England, 2011
 HAH AVR firmware
 
 No commercial use.
 No redistribution at profit.
 All derivative work must retain this message and
 acknowledge the work of the original author.
 */
#include <LiquidCrystal.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <TimedAction.h>
#include <UniversalRF.h>
#include <SoftI2cMaster.h>
#include <avr/wdt.h>
#include <avr/pgmspace.h>

#define PRODUCTION

#define XOFF 0x13
#define XON  0x11

#define SCL_PIN 7 // PD.7

#define SDA_PIN 6 // PD.6

 

Do check your source code.

Derek

brett
Offline
Providence, United States
Joined: 9 Jan 2010
You'll need more than just a sketch

You will need more than the sketch anyway.  I suggest you check out the Arduino branch from the SVN

http://www.dbzoo.com/livebox/hah_arduino#checking_out_from_svn

From the screenshot it looks like you are on a MAC, sorry can't really help you on that platform but its should be a similar process for you favorite SVN client.

In anycase you can't just FLASH this sketch and drop it into a HAH as it'll be the wrong frequency.  The Arduino compiles up at 16 Mhz the HAH runs at 7.3728 MHz.  You need to correct for this by creating a custom board in the configuration files.

As simplier approach.

If you have an Arduino you can flash new .HEX firmware including the v3.4 firmware directly from the HAH.  See some notes http://www.dbzoo.com/livebox/hah_jeenode#flashing_from_the_hah where I did this for jeeNodes.  Same deal for the HAH firmware too if you use a 328 chip that already had an Arduino bootloader.   Note: The one we ship does not you need an ISP programmer to either a) put back a bootloader or b) flash the HEX directly.

Brett

wpmax
Offline
Freilassing, Austria
Joined: 4 Jul 2011
flash directly from hah with avrdude

Hi brett,

sorry for this question, but i am just a beginner on the livebox hah system:

Is there any manual for installing the avrdude onto the livebox?

I don't want to make the system unstable!

Thanks for your time,

Markus

BoxingOrange
Offline
United Kingdom
Joined: 11 Jun 2010
avrdude on the HAH

Hi Markus,

avrdude is currently in the latest beta release, I think this will probably be released more formally when the JeeNodes come on the scene.  If you want to upgrade your HAH to Brett's latest beta this command should work :-

/etc_ro_fs/update-dev hah-beta.dbzoo.com

I'd obviously like to add the usual caveats, backup your config file and note this is a beta, so things might be different compared with an official release.  Having said that, Brett code is usually very stable.

Hope that helps,

Karl

wpmax
Offline
Freilassing, Austria
Joined: 4 Jul 2011
flashed .HEX directly with avrdude

Hi Brett,

I flashed a new 328 chip with the Arduino bootloader already on it directly with avrdude.exe as you described for the jeenode.

Everything was working fine and the 328 seems to work perfectly in the livebox.

But to be sure, do I have to change anything on the fuses in this case?

avrdude tells me the following:

Thank you,

Markus

brett
Offline
Providence, United States
Joined: 9 Jan 2010
If its working then your good to go

If you have flashed the v3.4 AVR firmware and its all working then you are good to go.

Brett

Hardware Info