Looking for step by step tutorial using the cloud

Hello André,

I’d first like to ask you if you could please format your code like explained on this topic: https://community.spark.io/t/forum-tips-and-tricks/3999
Specifically the use of the following code:
All you have to do is wrap your code in:

` ``ccp 
//my code
` ``

(Delete the spaces between the ` signs.)
This makes it a lot easier to read your code. Right now, your questions are somewhere between the code, which is hard to read, and can create misunderstandings. If you could take a look at that syntax, that’d be greatly appreciated!
Secondly, I’ve been working on a (very basic) webpage to control the RGB led on the Core. It uses this code from @bko, as well as a parameter function from @luz. It uses Spark.function(), and Spark.publish() to set the RGB led, as well as return the values to the page, to synchronize the sliders. I’ve been trying to comment every line of it, as well as include a sort of walk-through through the code. It still needs some tweaking. Since I’m new to programming, micro controllers, and related electronics this is still far from perfect. It does however seem to work, which is nice. Hopefully it can be of use to someone else who’s just starting. I personally learned a lot from bko’s tutorials, and it was fun seeing the code coming to life and gaining new features. I’ll try to upload it somewhere later to day, if I find the time for it.

—Dutch translation, all non-dutchies can safely ignore this ;)—
Hallo André,
Voor het gemak nog maar eens in het Nederlands; het zou prettig zijn als je je code kunt opmaken zoals bovenaan aangegeven. Dit zorgt ervoor dat code in een box komt te staan (zoals die hierboven). Dit zorgt er voor dat langere code niet de gehele pagina in beslag neemt, door er een scrollbalk aan toe te voegen. Ook zorgt het voor een enorm veel betere leesbaarheid. Op dit moment staan je vragen ergens tussen de code, en het commentaar van de code. Zo wordt het érg lastig om je vragen te vinden, en kan het de nodige verwarring veroorzaken. Het zou dus op prijs gesteld worden als je je post nog aan zou willen passen, of in ieder geval nieuwe posts zo zou willen formatteren.

Wat code betreft zal ik proberen later vandaag mijn code te uploaden. Het is een mix van verschillende handleidingen op dit forum in combinatie met html/jquery(mobile). Het bestaat uit drie sliders waarmee je betreffende RGB waardes van de led kunt veranderen. Het maakt gebruik van de Spark.publish() functie om de sliders te synchroniseren met de waardes op de Core.
Ik heb geprobeerd de code zo goed mogelijk (in het Engels weliswaar) te commenteren, en er de nodige alerts in te zetten. Zo kun je stap voor stap volgen wat er precies gebeurd zodra je een handeling uitvoert. Zodoende is het gemakkelijker om te begrijpen wat je code doet, en kun je ook beter zien waar het eventueel fout gaat. Ik zal proberen het vanavond online te krijgen.

Met vriendelijke groet, Jordy

1 Like