Internet Button trouble: LED's turn on by themselves; won't flash

My Internet Button (IB) won’t flash anymore.
The white plastic case is loose.
When I power it up, the middle LED blinks blue.
If I jiggle it, some of the LED’s around the edge turn on.
If I keep jiggling, eventually they all turn on, but different colors.

MY 2ND IB:
All works ok with my 2nd IB.
Its white plastic case is tight.

MY 1ST IB:
It worked ok at first.
Paired ok, and ran examples ok.
I then modified example to turn on 3 different LED’s for each of the 4 buttons.
Worked great.
I was pushing all the buttons simultaneously and all LED’s turn on.
While I was showing off to friend, some of the LED’s began to stick on.

Is it possible my code destroyed Photon or IB hardware?

HERE IS CODE…

/*  LED and button test.
    Turns on LED's when buttons pressed.
    
    2016-08-10a
*/


// This #include statement was automatically added by the Particle IDE.
#include "InternetButton/InternetButton.h"

#include "InternetButton/InternetButton.h"

/* How about we make this interactive? */

InternetButton b = InternetButton();

void setup() {
    // Tell b to get everything ready to go
    // Use b.begin(1); if you have the original SparkButton, which does not have a buzzer or a plastic enclosure
    // to use, just add a '1' between the parentheses in the code below.
    b.begin();
    
    
}

void loop(){
   
 
    // When you click the second button (at the 3 o'clock position) let's turn that LED on
    if(b.buttonOn(1)){
        b.ledOn(1, 255, 0, 0);
        b.ledOn(11, 255, 0, 0);
    }
    // And if the button's not on, then the LED should be off
    else {
        b.ledOff(1);
        b.ledOff(11);
    }
    
    if(b.buttonOn( 2 )){
        b.ledOn(2, 0, 255, 0);
        b.ledOn(3, 0, 255, 0);
        b.ledOn(4, 0, 255, 0);
    }
    // And if the button's not on, then the LED should be off
    else {
        b.ledOff(2);
        b.ledOff(3);
        b.ledOff(4);
    }
    
    if(b.buttonOn(3)){
        b.ledOn(5, 0, 0, 255);
        b.ledOn(6, 0, 0, 255);
        b.ledOn(7, 0, 0, 255);
    }
    // And if the button's not on, then the LED should be off
    else {
        b.ledOff(5);
        b.ledOff(6);
        b.ledOff(7);
    }
    
    if(b.buttonOn( 4 )){
        b.ledOn(8, 255, 255, 0);
        b.ledOn(9, 255, 255, 0);
        b.ledOn(10, 255, 255, 0);
    }
    // And if the button's not on, then the LED should be off
    else {
        b.ledOff(8);
        b.ledOff(9);
        b.ledOff(10);
    }
    
    /* Much like the LEDs, there are also functions to check if all the buttons are on- b.allButtonsOn()
    or if all the buttons are off- b.allButtonsOff() */
}

Make sure the connections are good. The photons needs to be in all the way, with no room to wiggle. If you can wiggle the Photon, it’s not in well enough.

I removed the Photon, and re-inserted it firmly without the white plastic case.
While pairing with Particle app, edge LED-1 turned on, then eventually 8 of the edge LED’s turned on.
It paired ok with Particle app.

LED’s stay on when I reset it.

LED’s turned off when I cycled power.

MY 2ND INTERNET BUTTON:
I flashed BUTTONS_AND_LEDS example, it worked, but the LED at ‘7pm’ turned on, and wouldn’t go off till I cycled power. Same problem in 1st IB. 7pm just turned on yellow…then it changed to white and 8pm turned on green.

So, both IB boards exhibit same malfunction.

Is something wrong with my software, above?

After the b.begin(), try adding b.allLedsOff();.During power up, undefined pins might cause funky behavior of the neopixels. Since the controllers are built into the pixels you have to either give them correct new information, or power-cycle them. Resetting the Photon isn’t going to make a difference.

Also, what’s the double include line supposed to do?

Will do. thanks.

Double include:
I must have hit INCLUDE IN APP an extra time. Learning curve. :wink:

Bad shield still only blinks 1-5

Nothing in your code should be blinking anything, so I’ve got no clue what you’re currently running on there.
Try a “particle update” and “particle flash --usb tinker” in the CLI and then try flashing a new demo app.

Again, don’t create duplicate topics. I just answered this, then noted the new topic with the posts from below. Not only is it confusing, but it’s also starting to become rather annoying. Please refrain from doing so in the future, and only open new topics if it’s actually about a new topic.

(Left board has all LED’s on. Both boards have BLINK ALL THE LEDS example.)

I used INTERNET BUTTON library.
I selected 2_BLINK_ALL_THE_LEDS example.
Flashed both my IB boards.
Shield A blinks all 11. But shield B blinks 1-5 only.

I swapped their Photons.
Problem follows the round IB shield B.

Solution: Earlier today, I ordered two more IB kits. :smile:

It’s okay. I’ve been working bleeding edge embedded since 1979.

Hey there! Thanks for letting us know. All of these LEDs are connected in serial, so if there was an issue with the LED in position 6, the rest of the LEDs might not light up as well.

I’d recommend sending in a message to our Support team at support.particle.io --if it’s a hardware defect, they’ll get you sorted out with a replacement or repair!