Hey sparkers – I’m working on an LED cube with a spark core at its heart, and I want myself and other people using our cube to be able to share code for others to run on their cubes.
Ideally, I’d like us to be able to ‘publish’ my code to show up in the web IDE like example code, that others can flash with a button click, or fork into their own accounts. Is there a good way to publish code like this?
Barring the publish functionality, my first take on this was to pull all the code from my app (which I developed on the web IDE), save all the files to a local directory, zip it up, and make it available on our wiki (http://lytelab.lookingglassfactory.com/index.php/Programs). Ideally, I’d like a user to be able to download the zip file, unzip it into a directory on their computer like ./Example, and then the user could type ‘spark flash Example’ to load it onto her core.
The bummer is, I developed the code on the web IDE, and I use the Neopixel library, so I have a
line at the top of my code, and the compiler doesn’t know where to find this. I tried a couple ideas, like saving a copy of the library code into a subdirectory, but no joy so far. I’m looking for an elegant way to make the cloud compiler use cloud libraries. Do you have any suggestions?