me-no-dev / RasPiArduino

Arduino Framework for RaspberryPI
327 stars 76 forks source link

Choose compile time symbolic for the "PiDuino" board #38

Open nkolban opened 8 years ago

nkolban commented 8 years ago

From the Arduino IDE perspective, the Pi appears as a new board type. When a sketch is being compiled the sketch can make reference to the "type" of board it is being compiled for. An example of this can be see here in the popular "firmata" project:

https://github.com/firmata/arduino/blob/master/Boards.h

In there, we find the existence of some boards by name. These include:

What we need to design is a symbolic that can be referenced within a sketch compiled for PiDuino that allows the compilation to know that it is being compiled for a PiDuino.

Here are some possibilities for consideration:

I would further suggest that we have a second variable that identifies the model of Raspberry Pi. Possibilities for consideration include:

Once we choose and lock down some definitions, we can then approach some of the more popular packages and issue pull requests with the PiDuino definitions added.