InternetButton library does not compile

I just got my InternetButton in the mail. I went to try some of the sample on the spark.io/buttonstart, and none of them will compile because the “InternetButton” library will not compile because of the following error;

InternetButton/InternetButton.cpp:235:42: error: cannot convert 'String' to 'const char*' for argument '1' to 'int atoi(const char*)'
         octave = atoi(note.substring(1,2))

This issue has been posted to the github project, but I have not seen any responses yet.

I am giving a demo on IoT on Saturday. I was hoping to get this working prior to Saturday. :sleepy:

@davidfekke, I just compiled the “9-releasefirmware” example in the web IDE Internet Button library without any errors and flashed it over to the button without any problems!

1 Like

@peekay123, try a Core :wink:
@Dick is looking into it :smile:

Yeah, that’s a durn strange error. @davidfekke the Button arrived with a Photon in it, and I’m not seeing any compile errors there (only with Cores), so if you’re targeting the right device it should work fine. Try clicking the second icon up from the bottom in Build (hovertext will say Devices) and check that you have a star next to the right one.

More generally, I’m going to see if I can work out a fix for Cores. Quite possibly just exclude playNote and playSong.

Ok @davidfekke would you mind testing it for me? Rev’d up to 0.1.5 now. There are a couple of steps you’ll need to make sure you’re getting the latest version.

  1. In the libraries view, click “Refresh Libraries”
  2. Reload the page (Build) just in case
  3. Double check that the Internet Button library version you’re seeing is 0.1.5
  4. Either a) remove the library from your current code and readd it or, easier, b) just “Use an Example” from the library again, and you’ll be sure to have it.

I don’t know if this makes any difference, but I am using Particle Build, your Web IDE.

I tried refreshing the library, and that did not work.

I tried forking one of the examples, and I still got that error.

@davidfekke, I cleared my cache, logged out then back in, removed to original app I had using that library (which was one of the examples), then reloaded the example and library and it now compiles. I think the latter steps is what was really needed. :smile:

Peekay,

Thanks for the suggestion, that worked.

Now I can verify the code. Unfortunately, I am getting the blinking magenta issue. I think I can fix that one too.

Thanks again,
David

Blinking magenta is good. It means your firmware is being updated. A couple of days ago, and automated system firmware upgrade system was deployed. It detects whether your Photon needs an update, and will update accordingly. That can take a couple of minutes, depending on your Internet connection, the weather, and the alignment of the solar system…
That said, give blinking magenta a bit of extra time to ensure you don’t interrupt updates. Shouldn’t take more than 10 minutes though. It’s possible that it doesn’t work the first time, so you may have to try flashing it again.

Breathing magenta on the other hand is ‘safe mode’ in which no user application runs. Here too, try reflashing it.

1 Like

Everything is working now. Thanks for your help.

David Fekke

1 Like