I’m trying to get my photon to communicate with an MCP9808 without much success. I’ve tried using a few samples I’ve found online, including the Adafruit_MCP9808 class. I’ve had to tinker a bit with the includes to get it to compile, but it’s otherwise stock.
For wiring, I have:
MCP9808 vdd -> Photon 3v3
MCP9808 gnd -> Photon gnd
MCP9808 scl -> Photon D0
MCP9808 sca -> Photon D1
I definitely see 3V across the vdd/gnd pins, and there’s nothing obviously wrong with the scl/sca pins (that is, they’re not soldered together or anything).
Anyway – when the Adafruit_MCP9808 class reads the manufacturer and device IDs, they come back as 0xffff (or -1, 65535, whatever you want to call it).
int manu = read16(MCP9808_REG_MANUF_ID);
int devid = read16(MCP9808_REG_DEVICE_ID);
Which runs as part of setup. MANUF_ID and REG_DEVICE_ID are 6 and 7, respectively.
Any ideas on what might be wrong? Is the board just fried or something?
I’ve tried swapping the scl/sca wires, switching between the 3v3 pin and a 5v source, tried a number of different examples online, but get the same results every time.