# \[SOLVED\]Can't get simple InternetButton code to run properly

**URL:** <https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791>\
**Category:** Troubleshooting\
**Created:** [November 25, 2015, 10:20pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791 "2015-11-25T22:20:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 25, 2015, 10:20pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/1 "2015-11-25T22:20:17Z")

</div>

I’ve been successfully working with the particle on some other projects and am now trying the Button for the first time. I’m using the Particle Dev IDE. I think I’ve got some simple configuration problem.

In my source folder called ‘button’ I have InternetButton.h which I copied and pasted from the online IDE Libraries section.  
I also have the following code below in a file called blink.ino  
When I click Compile In Cloud, I get the error "build didn’t produce binary Error: Comm [the rest is truncated and I can’t figure out how to read it]"  
I tried compiling from the CLI and I get the error message, below the source. Thanks!

```auto
#include "InternetButton.h"
InternetButton b = InternetButton();
void setup() {
    b.begin();
}
void loop() {
    b.ledOn(6, 0, 0, 255);
    delay(1000);
    b.ledOff(6);
    delay(1000);
}

```

```
Compiling code for photon

Including:
    /Users/david/weather_to_particle/button/blink.ino
    /Users/david/weather_to_particle/button/InternetButton.h
attempting to compile firmware
pushing file: /Users/david/weather_to_particle/button/blink.ino
pushing file: /Users/david/weather_to_particle/button/InternetButton.h
Errors
../../../build/target/user/platform-6/libuser.a(blink.o): In function `setup':
blink.cpp:13: undefined reference to `InternetButton::begin()'
../../../build/target/user/platform-6/libuser.a(blink.o): In function `loop':
blink.cpp:20: undefined reference to `InternetButton::ledOn(unsigned char, unsigned char, unsigned char, unsigned char)'
blink.cpp:30: undefined reference to `InternetButton::ledOff(unsigned char)'
../../../build/target/user/platform-6/libuser.a(blink.o): In function `__static_initialization_and_destruction_0':
blink.cpp:6: undefined reference to `InternetButton::InternetButton()'
collect2: error: ld returned 1 exit status
make: *** [6e75c054ae420ecc6e649fe06036b1994570c38f3d4c825936441890d494.elf] Error 1

Compile failed. Exiting.
```

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [November 25, 2015, 10:34pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/2 "2015-11-25T22:34:41Z")

</div>

You’ll need the InternetButton.cpp file as well. Give that a try and report back.

---

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 25, 2015, 10:47pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/3 "2015-11-25T22:47:05Z")

</div>

Thanks this gets me past any errors. The particle green LED blinks and then goes to blue pulse mode. But the #6 LED doesn’t illuminate.

Perhaps related to fact that I’m seeing a “core\_firmware\_xxx” file in my directory. I momentarily see a “photon\_firmware\_xxx” file when pushing to cloud. Is this expected behavior?

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [November 25, 2015, 10:57pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/4 "2015-11-25T22:57:58Z")

</div>

Have you selected the correct device when compiling, since that determines for which device it gets compiled?

---

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 25, 2015, 11:01pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/5 "2015-11-25T23:01:32Z")

</div>

Yes. Does this look correct?

Thanks!

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/c/cd230d5fc8b691332c10999598d4d11e2dd6e0b4.png)

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [November 25, 2015, 11:10pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/6 "2015-11-25T23:10:29Z")

</div>

Looks like that should work. If you’ve never flashed anything from the web IDE, you might want to flash a simple “blink an led” project to make sure the firmware is updated.

---

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 26, 2015, 1:06am UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/7 "2015-11-26T01:06:27Z")

</div>

Turns out, I had noticed how lightly the ic socket in the Button grips the chip … I wiggled the chip a little and it works. So I think I have a defective button because of this. Thanks very much for your help.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [November 26, 2015, 9:40am UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/8 "2015-11-26T09:40:18Z")

</div>

What exactly makes you think it’s defective? The Particle device should be securely gripped into the button, it shouldn’t be loose. You can try pressing it in a bit further, while being careful not to over-do it. Also, try not to press on the metal cover on the Particle device, that _might_ cause damage.  
Can you mark this topic as [SOLVED] if you think it is, or would you mind me doing so?

---

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 26, 2015, 12:44pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/9 "2015-11-26T12:44:27Z")

</div>

It’s pushed into the socket as far as it will go. It’s loose in the socket. I don’t know how else to explain that.

Thanks.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [November 26, 2015, 12:45pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/10 "2015-11-26T12:45:39Z")

</div>

Can you perhaps take a picture of it? That might give some more insight.

---

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 26, 2015, 12:52pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/11 "2015-11-26T12:52:05Z")

</div>

Not sure how to mark this as solved.

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/2/296669de2e24658f60802320a175beaf5827ae13.JPG)

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [November 26, 2015, 1:30pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/12 "2015-11-26T13:30:11Z")

</div>

I _think_. It’s still not deep enough. The plastic ‘feet’ should be touching the PCB. The photon indeed goes in very easily, and then feels loose, but at the very end you have to press a bit firmer to get it in there. In fact, I’m struggling with getting it out of it again because it’s so firm. Try pressing on the pins with your thumbs on both sides to see if there’s any possibility of getting it in there more deeply. You shouldn’t try to crush it, but it can take a bit more force than with a breadboard for example.

---

<div class="post-metadata">

**Author:** ![david3](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@david3](https://community.particle.io/u/david3)\
**Post date:** [November 26, 2015, 7:08pm UTC](https://community.particle.io/t/solved-cant-get-simple-internetbutton-code-to-run-properly/17791/13 "2015-11-26T19:08:22Z")

</div>

I finally was able to push it into the socket. I will say the plastic case seems to prevent it from fully going into the socket so I am a lot of pushing on the buttons won’t shake it loose.

Thanks again for your assistance. I cannot find a ‘Solved’ button in the interface so I’ll just alter the title.
