Nano33BLE: How do I code to use Serial1 RX/TX

I have been trying to get the Adafruit SoundFX board working via TX/RX on Nano33BLE which I have found out is Serial1. here isn't much info on this as it is different to other Arduino modules. I am having trouble with the code, it says I have not declared in the scope:

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Arduino Nano 33 BLE"

> CyclopsV2_I2C_coding_light:52:48: error: 'Serial1' was not declared in this scope
> 
>  Adafruit_Soundboard sfx = Adafruit_Soundboard(&Serial1, NULL, SFX_RST);
> 
>                                                 ^~~~~~~
> 
> C:\Users\KevB\Documents\Arduino\CyclopsV2_I2C_coding_light\CyclopsV2_I2C_coding_light.ino:52:48: note: suggested alternative: 'serial_s'
> 
>  Adafruit_Soundboard sfx = Adafruit_Soundboard(&Serial1, NULL, SFX_RST);
> 
>                                                 ^~~~~~~
> 
>                                                 serial_s
> 
> C:\Users\KevB\Documents\Arduino\CyclopsV2_I2C_coding_light\CyclopsV2_I2C_coding_light.ino: In function 'void setup()':
> 
> CyclopsV2_I2C_coding_light:129:4: error: 'Serial1' was not declared in this scope
> 
>  {  Serial1.begin(9600);
> 
>     ^~~~~~~
> 
> C:\Users\KevB\Documents\Arduino\CyclopsV2_I2C_coding_light\CyclopsV2_I2C_coding_light.ino:129:4: note: suggested alternative: 'serial_s'
> 
>  {  Serial1.begin(9600);
> 
>     ^~~~~~~
> 
>     serial_s
> 
> C:\Users\KevB\Documents\Arduino\CyclopsV2_I2C_coding_light\CyclopsV2_I2C_coding_light.ino: At global scope:
> 
> CyclopsV2_I2C_coding_light:140:1: error: expected unqualified-id before '{' token
> 
>  {
> 
>  ^
> 
> CyclopsV2_I2C_coding_light:168:1: error: expected unqualified-id before '{' token
> 
>  {
> 
>  ^
> 
> CyclopsV2_I2C_coding_light:193:1: error: expected declaration before '}' token
> 
>  }
> 
>  ^
> 
> exit status 1
> 
> 'Serial1' was not declared in this scope

Arduino forum explanation, but no example. OK for someone experienced but not for a nubie

Can someone simply explain how to declare and setup Serial1 to write(TX) to the adafruitSFX(RX) and read SFX(RX) to (BLE)TX?

see this thread... I think it has the solution you are after...

hope that helps!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.