Spark Core IDE missing functions

Thought we should start a request list for basic functionality that we are missing in the Cloud IDE. Please let me know if this is housed already somewhere else but I couldn’t find it.

Here is my list so far and please add to it as we go.

  • Add search functionality in sketches
  • Add library import in a functional manner
  • Add Tabs
  • option to retrieve spark Core ID of USB connected Cores locally on the machine
  • option to upload through USB if local connected Core exist (can still be compiled on Spark servers)
    -this should help in speeding up upload process to your local connected core.
  • Auto format of code
  • Implement all Arduino IDE short cuts to have the same functionality in the Core IDE
    -for example cmd+u for upload
  • Organize your sketches in folders
  • Show in the Tab the sketch name for when you have multiple sketches open
3 Likes
  • Add some basic and advanced example sketches to a menu for a super easy start up experience.
  • Defined but unused variables should not generate an error, only a warning.
  • #define ledpin D7 should work, to avoid using unecessary RAM with int ledpin = D7;
  • More syntax color highlighting for system functions, user defined functions and system data types/keywords
  • “bool” data type works, but “boolean” and “word” do not.
  • “double” data type seems flaky as well.

1 Like

@sjunnesson Thanks for starting this thread. @BDub thanks for the thorough analysis of data type behavior, I could see that information finding it's way into our docs site.

There are a lot of great ideas here, I'll do be best to respond to each of them:

Add search functionality in sketches

What do mean by this? How would it behave?

Add library import in a functional manner

Definitely. On the list

Add Tabs

Definitely. On the list.

option to retrieve spark Core ID of USB connected Cores locally on the machine

We will likely accommodate this via a command line tool. If you're going the USB route, then a locally hosted IDE (i.e Sublime/vim/etc) + [core-firmware] + dfu-util are the way to go rather than the browser IDE.

option to upload through USB if local connected Core exist (can still be compiled on Spark servers)

Will likely accommodate via the command line tool

Auto format of code

Could you elaborate?

Implement all Arduino IDE short cuts to have the same functionality in the Core IDE

Interesting. That's a cool idea that doesn't like it'd be very hard to implement. Added to backlog.

Organize your sketches in folders

There could be broader UI implications here if we go this route. We'll certainly look into ways to make many project manageable.

Show in the Tab the sketch name for when you have multiple sketches open

For sure.

----- responses to @BDub ----

Add some basic and advanced example sketches to a menu for a super easy start up experience.

Definitely, we are currently working on this.

Defined but unused variables should not generate an error, only a warning.

Added to compiler service backlog.

#define ledpin D7 should work, to avoid using unecessary RAM with int ledpin = D7;

Added to compiler service backlog

More syntax color highlighting for system functions, user defined functions and system data types/keywords

Could you elaborate?

Right now you cant access any search functions. So for example pressing cmd+f should bring up a search window that search for a specific keyword inside of the sketch and highlights the hits. Exactly like Chrome behaves when you search inside of a website.

option to retrieve spark Core ID of USB connected Cores locally on the machine

This was thought to solve the unknown when having multiple spark cores. Right now I have 20 and I have a pain to know which is which when uploading code. So connecting one to my computer and have it default to that one would be great. Might be a edge case though...

This would be like the Arduino IDE does. I quote them

Auto Format 
This formats your code nicely: i.e. indents it so that opening and closing curly braces line up, and that the statements inside curly braces are indented more.

Sure!

Compare the Arduino IDE to the Spark webIDE:

Please ignore my use of "CONSTANT" ... I just meant that it's a constant and obviously that is a reserved keyword in the webIDE since it shows up purple. However HIGH and LOW are not both purple. The system functions don't have highlighting. And it's probably getting more advanced, but if you could detect the definition of a user function, and highlight those keywords as well just like system functions it would be useful. It's the difference between typing code in Notepad vs. Sublime Text with the appropriate syntax highlighting. If you are going to go halfway in between as is done on the webIDE so far... that just means we are halfway done! :wink:

The way to allow a user to add syntax highlighting for various things in ArduinoIDE is to add a keywords.txt file to your library that spells out what category various keywords are in, and therefor what color they should be. The arduino system keywords are defined here: .\arduino-1.0.5\lib\keywords.txt and that's the same format you'd use for your library.

3 Likes

Thanks @BDub and @sjunnesson for providing such incredible detail here. This will be really useful once we get around to implementing this stuff. It’s so nice to have solid specs + examples like this. Cheers!

2 Likes

@jgoggins no worries. Im working with the tools u create so if I can help make them better Im happy.

On the note of transparency I have heard you guys mentioning that in next sprint you will do this or that. Are those goals available somewhere? Just so that we know whats on the horizon and how that is progressing.

@sjunnesson We recently set-up a blog to do this but don’t have it 100% ready for public consumption just yet. Should be live in the next couple of weeks!

I’ve been hacking on my Spark off and on all day from work (the Spark is at home) which has made me the envy of all of my coworkers. I’ve only really managed to come up with a couple of wish list ideas:

  • Display the size of the compiled code so we know how much room we have left to play with.
  • A “ping” or monitor option so that we can see what Spark or Sparks are responding. This would be easy enough to implement in each sketch that I write, but a simpler, built-in version would be pretty handy.

Thanks for all the hard work you guys (and gals) have put into this product. It was a lofty goal, but you have achieved it admirably. Even with the delays, bugs, hiccups, etc., I am impressed beyond belief. Heck, I haven’t even touched my nRF24L01+ mesh that I was working on since I put my backing into the Kickstarter project. THIS is what we all needed!

[EDIT]

I forgot one of my wishlist ideas!

  • A “watchdog” (for lack of a better term) that can reset the Spark in case of a hangup when a wifi or cloud connection is lost. There have been a few times over the past few days where I would get stuck connecting to wifi or the cloud after uploading a sketch. Maybe it has to be explicitly enabled with a timeout, e.g. “watchdog.enable(60)” for a 60-second timeout.
3 Likes

Thanks for all the great feedback @wgbartley!

  • Show binary size in flash/verify response—someone else requested the same thing today, and I added it to the backlog!
  • Show which Cores are online—already a planned feature in the web IDE, just not implemented yet. If you directly make any API requests and look at the JSON response, you’ll see {“connected”:true} or {“connected”:false} most of the time.
  • The Core firmware already has several scenarios where it automatically either reconnects to the Cloud, or reconnects to Wi-Fi, or reboots entirely, depending on circumstances. We try our darnedest to make these things happen completely seamlessly, but there are still some cases where the little zombie just doesn’t know it’s disconnected. I appreciate the suggestion, and we’ll keep working to track down those yet-to-be-solved reconnection scenarios.

Cheers! Keep making those coworkers envious!

2 Likes

While working on a sketch I had defined the D7 output as LED_PIN, which was generating an error that it was already defined in the core firmware. I would suggest naming the core firmware pin definitions more unique like CFW_LED_PIN or even __LED_PIN. Something not too generic to avoid these “potholes” for average users that might not think too much about what’s going on behind the scenes.

Also related to this error, I was trying to Flash the core immediately after Saving. I did not press Verify separately in between. It said that it was Flashing the Core, and then it said it was Ready. However the whole time it never even tried to Flash the core due to the error of the multiple LED_PIN definitions.

The star next to the Core name functions to set which core is active for Flashing. If you have none selected it prompts you to select one. However when you are in the Target menu and you click on those stars, it’s not immediately obvious what that does. Maybe the status output could echo the selection/deselection?
“myCore1 selected as currently active core!”
“myCore1 deselected. No cores currently active.”

It might be useful to have a feature that Locks and Unlocks the ability to select a Core to prevent you from accidentally reflashing an important core, say one that is currently 7 days into a 30 day logging application? :slight_smile: This could maybe be a separate Lock/Unlock icon next to the star icon that requires your login password to toggle it.

Also it would be nice if we could specify the number of spaces that TAB inserts. Right now it’s defaulting to 4, but 2 would be preferred for me. Some people might like 4 though, or some custom number.

2 Likes

Added to backlog: Rename LED_PIN.

Web IDE save then flash says flashing but doesn’t—we might have fixed this last night—can you test again @BDub. If still an issue, I’ll add it to the backlog.

Added to backlog: Make clearer what the stars do.

I think the lock/unlock idea is interesting, but for now, I’m going to say that would clutter the IDE and is preventable on the user side. If others think this is a high priority feature, keep letting us know, though. :smile:

Agreed, on the number of spaces on tab—I’d prefer 2 as well—added to backlog.

As always, thanks for the feedback @BDub; you rock.

A feature I would like to see is is to have the value in a defined constant appear when the constant is moused over, or even while being edited. For those of us with the memory of a goldfish, it would save a lot of scrolling, that is if I can remember how to scroll again.

Also, the Arduino IDE highlights matched brackets, which is nice for the innumerate among us.

Search works just fine for me…

Now, CMD+F doesn’t seem to work (presumably due to how they’re reserving key presses in the JavaScript), however going to Edit>Find>Find… opens up the search bar and it fully searches and highlights the code.

I never even tried using the traditional way of accessing the search function… I guess my request should be changed to map the search function to cmd+f since having it accessible only in the menu is like not having it at all.

Thanks for finding this.

1 Like

It's still a problem. Specifically, if you add uint8_t LED_PIN = D7; to your code, this will generate an error that it is already defined. But if you just press SAVE, and then FLASH... it will tell you that Firmware was saved successfully and then Compiling code... and then Flash successful, please wait a moment while your Core is updated... and then after about 10 seconds Ready! Also during the supposed flashing process, the LED continuously is breathing cyan, which backs up the fact that it's not really flashing it due to the error.

But it should catch the error while compiling and it doesn't, unless you specifically press the Verify button.

added this to the backlog; thanks @BDub!

1 Like

Currently there is no slider on the Code flyout, and it would be nice to add one so we can scroll down to get to the Create New App button:

I usually have it zoomed in a bit and have a limit of 10 apps that way:

Call me crazy, but I’m sure at some point the server may get bogged down with data (1,000,000 users * 100 programs each * 4kBi per file = 400GBi of data) programs each), and/or crash and everyone’s programs would be lost. What about integrating Dropbox for file storage? Other backup ideas? I typically save everything to Dropbox anyway… but something to think about.

1 Like

@BDub Valid point! I’m adding this to the backlog and tagging @jgoggins here.
Thanks!

1 Like
  • Warn the user when navigating away, if there are unsaved documents.
  • Maybe: Allow creation of multiple source (resource) files, to #include sourcecode (and custom libraries) used in multiple projects.
  • Code completion or a list with all functions and types.
2 Likes