Go Down

Topic: Developer Request: Sketch Require Hardware (Read 2 times) previous topic - next topic


since arduino-0018 allows to build sketches for third party boards some generic naming scheme is needed here.

Not even the entries in hardware/arduino/boards.txt can currently provide a distinct name for a board.



Why not add something like this to the top of your sketch?

Code: [Select]

// Check if compiling for ATmega128, otherwise display error and quit
#ifndef __AVR_ATmega128__
#error "This sketch requires a Mega."


BenF, as Eberhard pointed out in post #3, knowing the processor may not give enough information to determine the capabilities of the board.

But even knowing the board may not be sufficient for a sketch to ensure that all needed resources are available as there is currently no way of determining if and when resources like pins and timers are being used by a library.  This is an issue being looked at by the developers but its not an easy one to solve.

Coding Badly

Excellent point.  Maybe the request could be to #define a board type, if the IDE doesn't already do this.



Very good idea this is the kind of thing I was alluding to in my thread on standard hardware platforms. Your is actually a more straight forward and practical idea.
South African Arduino User Group


Go Up