Serial4 and Serial5 no longer working?

Hi all-
I have a few Electrons that i’ve been working with. I just made a few little tweaks to my code, but the web IDE is no longer recognizing the Serial4 library which I am using. Anybody else having this problem, or have an explanantion/fix?

I wrote a quick little test script:

#include "Serial4/Serial4.h"

void setup() {
Serial4.begin(9600);
}

void loop() {
}

Which is throwing the error:

     test.cpp: In function 'void setup()':
     test.cpp:4:1: error: 'Serial4' was not declared in this scope
     void loop();
     ^

  make[2]: *** [../build/target/user/platform-0-ltest.o] Error 1
  make[1]: *** [user] Error 
  make: *** [main] Error 2

Any help getting this back up and running is very much appreciated!

I guess the device that is :star: in the Devices tab is not a electron which caused the compilation issue :wink:

1 Like

That's the important clue here.
The platform ID 0 belongs to the Core - for Electron you want to see 10.

Great, thanks for the catch! I didn’t realize that the IDE was cross-referencing with a different device. All good now!

The hardware on these devices is different, but the code base is unified (hardware abstracted) where possible, so you need to tell the IDE what “branches” of the unified sources should be used to produce a binary suitable for the respective devices hardware.