OPC-N3 behaving odd!

Hi Everyone.

I am trying to run an OPC-N3 off an Arduino MKRFox1200, using the usb connector to provide power. I have some code, which was turning on the OPC and I could see the fan running yesterday although it was returning some odd values. I have just ran exactly the same code again and now the fan doesn’t appear to be turning on and I am still getting odd values.

I have checked power and connections across the circuit and all seems well…

I’ll attach the circuit diagram as well as the code below:

PS. I would embed the code here however it puts the message above the 9000 character post limit.

OPC_york_UNEDITED.ino (10.4 KB)

const int SSPin = 10;

That doesn't correspond with the wiring diagram you posted.

Please post a link to the datasheet/manual of your sensor.