Okay. This is little embarrassing, but the following code doesn't compile:
#include "application.h"
SYSTEM_MODE(MANUAL);
//SYSTEM_THREAD(ENABLED);
int led1 = D0; // Instead of writing D0 over and over again, we'll write led1
int led2 = D7; // Instead of writing D7 over and over again, we'll write led2
void setup() {
Cellular.off();
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop() {
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
delay(1000);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
delay(1000);
}
It returns:
error: 'Cellular' was not declared in this scope
EDIT:
This link says I need to set some star flag under devices tab. My device is still unclaimed.
EDIT2: Trying to add device using particle-cli returns
Failed to claim device, server said: [object Object]
Which I guess doesn't work offline. Now what?