James, a complete novice
The core and photon use C++ with some nice little functions to make it like the arduino language.
The main part of the code is already done, that gives the cloud connection and hardware stuff… i2c spi etc you just need to write your bit to make it do what you want
There are heaps of good examples on the forums to get you started
As far as your project goes, that is entirely doable, no doubt! If you check out the example page of the docs, you’ll notice the example of a temperature sensor. This should give you an idea of the code. Using that code, in combination with already existing online services, you’d have a logger up and running in no time! I’ve been using Atomiot for this very purpose, measuring temperature and humidity data for three months.
@Hootie81 is correct your project is a super easy one to do and the key is to use the site search. It works well and there are at least a half dozen references to get you started.
The Spark Language is not that alien if you can code in PHP, JS or C you will figure it out quick
Hah we both replied at the same time
And same goes the other way too as @Herner says… if you know the basics of C++ then other languages like PHP and JS are also easier to pick up. and you may find you will need a few languages along the way too.
the Atomiot thing above that @Moors7 mentioned is easy to setup and use, if your wanting a totally custom temperature logging service you could create a “LAMP” stack which is a server running Linux, Apache, MySQL and PHP. then write a small PHP script to store the data in the database. that way its totally customizable to suit your needs. I now have a few projects which i use C++ on the core and PHP/MySQL on my server.
Mind you, HTML5 and CSS3 is something you’ll have to learn anyhow, if you’re planning on making decent web apps, so that’s the same for either of the stacks. The nice thing about the MEAN stuff is that you have total control of any things that happens, and it’s greatly compatible with the IoT since it can handle a lot of requests simultaneously. And the fact that it’s ‘merely’ one language is benificial as well, since you don’t have to worry about code compatibility, and conversions.
It all seems spooky and alien at first, with most of my thoughts being:“I have no idea what I’m doing”, but if you put your mind to it, it should be doable (after a while )
Like I said, feel free to ask for help if you need any. This community is a rather helpful bunch, and we’re glad to help out!
@Moors7 @Hootie81 @Herner
Firstly, thank you for the quick replies everyone. It’s good to know there’s somewhere with answers.
I will definitely look at those examples on the examples page and I have found a few sites with C++ tutorials.
Hopefully I can find an arduino cheap somewhere too.
When you talk about cloud connection, does that mean I could access my data on a webpage or something remotely (I’m completely new to this)? What kind of things would I need to do to get this going if so?
Also, (another stupid question coming…) what do you mean by a “stack” and a boiler plate?
Thanks again everyone and I’ll most certainly be back needing more help!
The spark has a cloud FREE as part of your purchase. All the variables in your code can be exposed and you can then access them remotely. in my case with a few hours of code I was able to build a thermostat that I control from my phone without the need for anything at all fancy.
I am not a spark guru at all I am a newbie but one that is absorbing information and starting to get dangerous
Glad I could help!
The examples in the docs are neat, but definitely don’t forget to take a look at the awesome tutorials in the tutorial section. They’ve been a great help when I was starting out, and I still reference them every once in a while.
Cheap Arduino (clones) can be had for around €7/$10 on ebay, or some Chinese webstores (miniinthebox, dealextreme, etc). They’re nice to get started, and play around with the language a bit. Don’t spend too much on them though, since you probably won’t touch it very often anymore, after you get your Photon(s).
I’d like to think of a ‘stack’ as a collection of things that build on each other, complement each other, well, ‘stack’ on each other. In case of the MEAN stack, that would be MongoDB, ExpressJS, AngularJS and NodeJS. In case of the LAMP stack, that’d be Linux, Apache, MySQL, and PHP.
A boilerplate is a preconfigured combination of these stacks, to make them easier to use. There is for example meanjs.org, which provides the configuration for the MEAN stack, which should get your up and running much more quickly.
Anyhow, this might be a bit black magic at the moment, but you’ll get there. It just takes some effort, and some cursing, and a lot of faulty code, but it’ll be worth it
Whoa, so you effectively have your own url for all your devices? How do you get it online and everything? Where do I start? What will I need?
I’m looking into those Arduino clones too, so I’ll have something to play around with.
You can access your devices through a combination of your Accesstoken and DeviceID. Using these with the REST API will allow you to control them. I think this might be useful to take a look through. It explains the general concepts, and the first steps into the wonders of all that is Spark. http://cmsunu28.gitbooks.io/spark-basics/content/ Also, the hacksters page might give you an idea of what is possible, and what might be required. As far as ‘needing’ things goes, that all depends on what you’re planning to make. An LED Christmas tree will require other stuff than a beer brewing machine, so that varies.
Don’t bust your head on those Arduinos, they’re merely to waste some time on while waiting for your Sparks. You probably won’t use it any more once those are in. I just bought the cheapest Uno R3 I could find…
I highly doubt @Herner 's page is the same since this is the first time I shared it I made it only to try out the SparkJS library, and to test some of the functions quickly. So far, so good.
Not sure who you’re referring to, but I guess I’ve been doing this for about a year. I’ve had some prior experiences with HTML/CSS, but nothing really in-depth.
My code I am quite sure looks nothing like @Moors7 as well nice of you to share that example for him Moors.
My code is for a custom smart control and it resides on a private server I control and it also passes data to ubidots which I in turn am integrating into it
Thank you so much for all your help and tips. They have been very useful.