WebDev Basic examples (GET,SSE)

So I have a fair amount of arduino experience and I have been able to use quite a bit of my code on the Photon without problem. Where I start to lag is on the other side with HTML and jQuery and all the other latest technologies that are used for web development. I’m diving in and am trying to get things going.

The examples are a very good starting point and I have been able to make progress with learning the Photon. I was wondering if there may be someone here who is on the other side of the development road and has lots of web dev experience and could help with basic communication (GET,POST,SSE)

For example, I installed curl and am able to copy and paste the examples and get a result. So:
curl https://api.particle.io/v1/devices/foo/analogvalue?access_token=bar
will give me a result of the analogvalue

This is fairly easy to understand and I can manipulate easily for different values

I also installed Advanced REST Client in Chrome thinking that I could perform a GET fairly easily. This is where I’m starting to have problems and where a couple of step by step examples would really help out.

The end goal is to have the ability to receive streaming data from a set of outputs on the particle. I’m assuming that I should probably use an SSE but it looks like that requires a GET as well?

Am I going at this the right way? I’m assuming that I will be able to figure out format and other things by just seeing a couple of examples. Should I be building a form on a page and running examples that way?

I’m hoping a little push will get me rolling in the right direction quickly

Thanks!!!

Try http://dashboard.particle.io that takes in all your SSE stream! :smiley:

There’s also some Tutorial that teaches you how to do simple stuff as well

Thanks Kenneth, I did try the dashboard and I was able to do the example (LED/Photoresister) and see the events. I kinda need to take it to the next level and be able to build a page of my own that reads data from the Photon and displays it

Maybe:

and

The tutorial section of the forum has some very good tutorials, do check those out :)!
I’ve personally used the JavaScript SDK to set up a simple test page. It shows you the status of your devices, allows you to call functions and variables, and guides you to a page on which you can see your SSEs. Have a look, if you like. If you right-click, you can see the source.
Keep in mind there are several languages you can use to create webpages, so there are several options available. I personally prefer JavaScript since that is supported out of the box, and with the rise of Node.js opens a lot of possibilities.

2 Likes

Thank you both. Funny, I was just reading responses from you both in other threads and was hoping you guy’s would respond to mine :smile:

1 Like

I’m not sure if I should speak for @kennethlimcp, but I think we both have the urge to respond to anything we think we can contribute something meaningful to :wink:
Do let us know if you need any help, if time allows, we’ll gladly take a look at it!

Yes, both of your recommendations steered me in the right direction. I just got the Servo example working (Copy and pasted) and now need to dive into the how’s and why’s.
I can see now that the right place to get started on the Web side is, of course, an HTML refresher and then jQuery and AJAX.
Good thing I still have my Lynda.com membership

Thanks again guy’s!!

2 Likes