Porting from Photon (with SPI)


#1

I have tested a sketch that works fine on a Photon and am trying to port it over to Bluz.

I used the CLI to compile it and saw that it uses:

   text	   data	    bss	    dec	    hex
  17344	    116	    764	  18224	   4730	

So, since this is within 20K it should be OK.

The only I/O it uses apart fro a serial monitor is SPI, connected in the usual way on A2,3,4,5.

However, when it starts up nothing appears on the serial port. As this is the very first thing that the app does I suspect some kind of loading error.

I have tested the serial cable setup using a modified blink sketch and that works fine.

Any suggestions as to what to try next pls?


#2

One thing that is a bit confusing, bluz doesn’t support Serial, you need to use Serial1. This was done with the mindset of keeping true to the definitions. Serial in the Arduino/Particle world always refers to UART over USB while Serial1 refers to physical pins labeled TX/RX.

So you would need to change all Serial instances to Serial1.


Issue with Bluz/Particle serial debugging
#3

Thx. I basically knew this but forgot and could not see for looking. I have fixed that. However, I’m now back to the flashing magenta scenario. BluzDK slow blinking Magenta