Itsyitsy M4 I2C Not Working for Project that works on Feathe
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Oh - there was a photo posted. Sorry, missed that somehow. If you have room, put the Itsy directly on the breadboard:
along with the MCP and connect it up with short jumper wires.- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Clearly having something fundamentally wrong going on including my possible pilot error. Enclosed is simple breadboard setup with the MCP9808 breakout and two M4 boards (the original one with a LiPo backpack and a spare). Trying to execute the Adafruit MCP9808 test example "mcp9808test". Found different problems on each M4 board. Development system MacOSX Mojave 10.14.4, Arduino 1.8.8 on MacBook Retina Pro early-2015.
1. With original M4 board with LiPo backpack - boots into M4 LED flashing purple. Double reset puts board into M4 green/red state allowing download. Program compiles, downloads and begins execution - printing the "MCP9808 demo" line from the program and then halts seemingly when executing the .begin on the MCP9808 temperature object. Never subsequently executes either success or failure println. Repeatable. This is same behavior I had with with my own custom boards and wiring with this board.
2. Second M4 board without LiPo backpack - when plugged into USB port on MacBook a quick white flash and then no further response. Repeatable. Seemingly no effect of reset button. No mounted drive. No indicated virtual serial port.
Help?
K
1. With original M4 board with LiPo backpack - boots into M4 LED flashing purple. Double reset puts board into M4 green/red state allowing download. Program compiles, downloads and begins execution - printing the "MCP9808 demo" line from the program and then halts seemingly when executing the .begin on the MCP9808 temperature object. Never subsequently executes either success or failure println. Repeatable. This is same behavior I had with with my own custom boards and wiring with this board.
Code: Select all
void setup() {
Serial.begin(9600);
while (!Serial); //waits for serial terminal to be open, necessary in newer arduino boards.
Serial.println("MCP9808 demo");
// Make sure the sensor is found, you can also pass in a different i2c
// address with tempsensor.begin(0x19) for example, also can be left in blank for default address use
// Also there is a table with all addres possible for this sensor, you can connect multiple sensors
// to the same i2c bus, just configure each sensor with a different address and define multiple objects for that
// A2 A1 A0 address
// 0 0 0 0x18 this is the default address
// 0 0 1 0x19
// 0 1 0 0x1A
// 0 1 1 0x1B
// 1 0 0 0x1C
// 1 0 1 0x1D
// 1 1 0 0x1E
// 1 1 1 0x1F
if (!tempsensor.begin(0x18)) {
Serial.println("Couldn't find MCP9808! Check your connections and verify the address is correct.");
while (1);
}
Serial.println("Found MCP9808!");
Help?
K
- Attachments
-
- Itsy I2C - 1 (1).jpg (47.16 KiB) Viewed 154 times
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Were you ever able to program this Itsy?2. Second M4 board without LiPo backpack - when plugged into USB port on MacBook a quick white flash and then no further response. Repeatable. Seemingly no effect of reset button. No mounted drive. No indicated virtual serial port.
Just to make sure nothing is wrong with the current driver, I wired up an Itsy M4 with a MCP9808 and ran the test sketch:
https://github.com/adafruit/Adafruit_MC ... 08test.ino
and it ran fine:
[EDIT] Above was from using 1.0.1 version of MCP9808 library.
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
No. Second Itsy is unresponsive. One white flash from LED when USB plugged in. Then no indication of drive mounting or serial port. Unprogrammable.
K
K
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Try double pressing reset to get into bootloader mode. The DotStar (tiny RGB LED near A0 pin) should be green. The red LED (near TX pin) should be slowly fading in/out.
The other pattern you may get is a red DotStar and fast blinking red LED.
The other pattern you may get is a red DotStar and fast blinking red LED.
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Not wanting to quibble ... but my reading of the test sketch is that it should print out "Found MCP9808!" in the setup() method before printing temperatures. Curious.
On the original Itsy, it powers up into Dotstar purple and then with double reset moves into green/red pulsing mode - can be programmed but still can't successfully execute MCP9808 program.
Second Itsy Dotstar briefly flashes white when USB plugged in and then nothing - unresponsive to reset button, no serial port, no drive.
K
On the original Itsy, it powers up into Dotstar purple and then with double reset moves into green/red pulsing mode - can be programmed but still can't successfully execute MCP9808 program.
Second Itsy Dotstar briefly flashes white when USB plugged in and then nothing - unresponsive to reset button, no serial port, no drive.
K
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Curious ... I seem to have a different version of the MCP9808 test program ...
Code: Select all
Serial.println("wake up MCP9808.... "); // wake up MCP9808 - power consumption ~200 mikro Ampere
tempsensor.wake(); // wake up, ready to read!
// Read and print out the temperature, also shows the resolution mode used for reading.
Serial.print("Resolution in mode: ");
Serial.println (tempsensor.getResolution());
float c = tempsensor.readTempC();
float f = tempsensor.readTempF();
Serial.print("Temp: ");
Serial.print(c, 4); Serial.print("*C\t and ");
Serial.print(f, 4); Serial.println("*F.");
delay(2000);
Serial.println("Shutdown MCP9808.... ");
tempsensor.shutdown_wake(1); // shutdown MSP9808 - power consumption ~0.1 mikro Ampere, stops temperature sampling
Serial.println("");
delay(200);
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Hmmmm ... the version on Github is the same version I have ... but those versions do not have the same output as what you showed. Are you running the same version?
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Ugh. Good catch. I was running the 1.0.1 version of the library. Just updated to the current 1.1.0 release, which has an updated version of the example sketch.
Also runs OK:
Also runs OK:
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Most odd.
I have just checked my connections again. And rerunning test sketch multiple times with boot loader double reset between each run.
About half the time ... I get the MCP9808 not found message and half the time I don't - seems to halt in the .begin method.
K
I have just checked my connections again. And rerunning test sketch multiple times with boot loader double reset between each run.
About half the time ... I get the MCP9808 not found message and half the time I don't - seems to halt in the .begin method.
K
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Sounds like a wiring issue. .begin calls init, which tries to talk to the MCP and verify its ID:
https://github.com/adafruit/Adafruit_MC ... 08.cpp#L99
https://github.com/adafruit/Adafruit_MC ... 08.cpp#L99
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Did you happen to look at the pin soldering on the Itsy? I get connectivity with my multimeter from Itsy pins to the MCP9808 pins.
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
The photo you attached was too small to really verify the soldering. It was only 176x279 pixels. If you can try uploading a larger photo of the Itsy soldering, we can take a look. The soldering on the MCP also. You can attach more than one photo if that helps.
For ref, here is my wiring: (the only MCP I had on hand was soldered with 90deg headers, just ignore that, doesn't matter here)
For ref, here is my wiring: (the only MCP I had on hand was soldered with 90deg headers, just ignore that, doesn't matter here)
- RocketScientist
- Posts: 88
- Joined: Wed Jan 11, 2017 11:43 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
OK. Thank you. I will try reflowing all the solder connections on both working Itsy and MCP9808 board and rechecking connections for silly connection errors.
My breadboard connections same as yours ... only thoughts I have are possible bad breadboard wires or bad solder joints.
My second Itsy ... the one that only flashed Dotstar white when seems to be genuine failure. Can it be replaced?
K
My breadboard connections same as yours ... only thoughts I have are possible bad breadboard wires or bad solder joints.
My second Itsy ... the one that only flashed Dotstar white when seems to be genuine failure. Can it be replaced?
K
- adafruit_support_carter
- Posts: 31635
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Itsyitsy M4 I2C Not Working for Project that works on Fe
Did you try double pressing reset? That will put it in to bootloader mode. It's the process described here:Second Itsy Dotstar briefly flashes white when USB plugged in and then nothing - unresponsive to reset button, no serial port, no drive.
https://learn.adafruit.com/welcome-to-c ... oader-5-13
Was this Itsy ever used for anything?
Please be positive and constructive with your questions and comments.