Imp participates in the glorious act of blink up, then does nothing

After the light turns green indicating that the connection to the cloud is successful, the imp shows up in the planner as blank, as it should. I can click on the grey settings button on the upper left of the imp in the planner, get the list of available firmware, and select one, as I should be able to.

The hope-crushing, anger-inciting despair sets in when I dutifully sit there waiting for the blue imp rectangle do something as I had told it do with
imp.configure("Do something please,", [],[]);"for the love God, do anything!);.

Despite toggling from different firmware, deleting all my firmware,decommissioning my imp, re-ccommissioning it, powering up and down, the server log just keeps looping between booting, going online, going offline, then back to booting.

This has happened before. After performing those steps again in no real particular order, I eventually get past it and can start writing code again. Then after the however-so-many uploads to my imp, it will get in this lockdown loop.

To be honest, I don’t really know what I’m doing because my background is in art but I have been doing some slightly advanced work in Arduino and processing for the past three years. I’ve never really coded out side those environments. I understand that the imp is a significantly more complex platform than Arduino, but it does Arduino-like things with the Internet at a price well, well bellow an Ardy w/ wifi options. This is what attracted me to it.

This is also why I can understand this issue of mine occurring after I upload some egregiously buggy code, or do something like :
function breakEverthing(onButton) {

may cause things to stop working because unlike Arduino, the connection between the imp and console must go through the many tubes that is the Internet.

I’m curious if any one else out there has run into this, and what their magic dance of glory was to fix it.

Impin’ it in San Diego,

GLORY!!! (for now).

It seems that as I was writing this, the issue goes away because my new, more loving firmware:
imp.configure("LOVE",[],[]); serverShow("hey, hey, just give it time");
is working now.

But, insight would be helpful, because right now the fix appears to go to the Electric Imp forums as a release for some pent-up creative writing.

BTW: when this thing is working, it’s freaking amazing! And all I’ve done so far is make a light blink, press a button. I can’t wait to see whats ahead!

UPDATE: It happened again after I was screwing around with the imp and a Li-Po battery I pulled out of the drawer. I recon that this angered the imp. To rectify matters, this was done:

  1. Change firmware to any other firmware than what was already set for
  2. Nothing will change on the imp square. Delete the imp from the planer
  3. Turn the imp off
  4. Imp re-appears in planer, running the firmware chosen before it was deleted from the planer.

Woot. I now have six GhettoPixels running off an imp!

So, your first example was missing a quote; this should have been picked up as a compile-time error though. It does sound like the reason your imp is not being very responsive is that you have infinite loops, long imp.sleep’s or similar in your code.

The imp works differently to an arduino in that it has an OS to run - so your code runs in an event-driven fashion. If you want an infinite loop, you should repeatedly schedule the function to run with imp.wakeup() vs doing a while(1). Why? Because otherwise, the OS doesn’t get to run (it runs at a lower priority than user code so as not to interrupt anything important you might be doing), and so network traffic - including the pleas to change firmware - doesn’t get noticed.

The planner is less than ideal in terms of obviousness. It’s being replaced with something a good deal more intuitive (we think, at least).

In the 1st parameter of imp.configure(), Squirrel is looking for a text string that EXACTLY matches the source code filename … I learned this lesson the hard way this afternoon … grrrrrr … on the other hand I commissioned two Imp cards with my iPhone 4 each on the first blink up!
cheers , BBR

@brianbriley Hmm, that’s not the case at all; the text string is totally arbitrary and doesn’t have to match anything…

It makes no sense and I never saw it documented anywhere … BUT … I had the same spectacular lack of results when I named the file “firstCode” while leaving imp.configure unchanged . I made a copy of “firstCode” and renamed it “First Program” … Then it all worked fine.

There’s an issue where if you have only one firmware in your list, things behave strangely; the migration of the backend to support the new IDE caused some hiccups. I suspect that was what you ran into. Sorry!

Wow, thanks for the insight on that Hugo. I’ve been running my Imp for a week and been loving it! I got a lot of learning to do, but I’m looking forward to it!