I know it is a basic stuff but I’m trying to create a simple library using the new IDE . I’m following Arduino steps but I’m not able to adapt it to spark.
blinkaled.ino
// This #include statement was automatically added by the Spark IDE.
#include "blink.h"
Blink blinke(13);
void setup() {}
void loop(){
blinke.parpadeo();
}
to get it to compile using digitalWrite and pinMode. You probably don’t need the other includes if you have this one.
Your sketch uses pin 13 which is A3 on the Spark core–you would be better off to use the defined names D0-D7 and A0-A7, since the numbers are not the same between Spark and Arduino.
In file included from ../inc/spark_wiring.h:30:0,
from ../inc/application.h:31,
from blink.cpp:2:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
In file included from blink.cpp:5:0:
blink.h:7:1: error: new types may not be defined in a return type
blink.h:7:1: note: (perhaps a semicolon is missing after the definition of 'Blink')
blink.cpp:7:21: error: return type specification for constructor invalid
make: *** [blink.o] Error 1