Hello,
i am new in the arduino world - not in microcontroller in general.
Pre condition:
- I bought the MKR Iot Carrier Rev2 and MKR GSM 1400 Boards
- I have installed the Arduino IDE 2.0.4 under Arch Linux
- I have installed the compiler / libraries for MKR GSM 1400
- I have installed the Arduino_MKRIoTCarrier 2.0.1 library version
I have tried the simple Blink example. It compiles (verify) and i can flash it to the controller board. What I find strange is that nothing flashes.
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Now i've tried the LED_Blink example of the MKR Iot. Here i get build errors. Any ideas what i need to include to get the defines? MKR Iot not compatible? I thought it is the case.
#include <Arduino_MKRIoTCarrier.h>
MKRIoTCarrier carrier;
#define NUMPIXELS 5
void setup() {
carrier.noCase();
carrier.begin();
}
// Runs 10 LEDs at a time along strip, cycling through red, green and blue.
// This requires about 200 mA for all the 'on' pixels + 1 mA per 'off' pixel.
int head = 0, tail = -4; // Index of first 'on' and 'off' pixels
uint32_t color = 0xFF0000; // 'On' color (starts red)
void loop() {
carrier.leds.setPixelColor(head, color); // 'On' pixel at head
carrier.leds.setPixelColor(tail, 0); // 'Off' pixel at tail
carrier.leds.show(); // Refresh strip
delay(20); // Pause 20 milliseconds (~50 FPS)
if (++head >= NUMPIXELS) { // Increment head index. Off end of strip?
head = 0; // Yes, reset head index to start
if ((color >>= 8) == 0) // Next color (R->G->B) ... past blue now?
color = 0xFF0000; // Yes, reset to red
}
if (++tail >= NUMPIXELS) tail = 0; // Increment, reset tail index
}
/home/dev/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.cpp: In member function 'int MKRIoTCarrier::begin()':
/home/dev/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.cpp:34:11: error: 'AREF_PIN' was not declared in this scope
pinMode(AREF_PIN,INPUT_PULLUP);
^~~~~~~~
/home/dev/Arduino/libraries/Arduino_MKRIoTCarrier/src/Arduino_MKRIoTCarrier.cpp:34:11: note: suggested alternative: 'SCK_PIN'
pinMode(AREF_PIN,INPUT_PULLUP);
^~~~~~~~
SCK_PIN
exit status 1
Compilation error: exit status 1