When you first look at the Photon, it’s staggering that such a small device could possess the incredible functionality that it does, but not only does it bring an impress spec sheet to the table, but the true power is unlocked in the cloud based ecosystem that Particle have created for their hardware. In this tutorial Sam explores getting started with the Particle Photon.
Hey guys, it's Sam here from core electronics and today we're going to be looking at getting started with the particle Ide. now ide stands for integrated development environment and it's pretty much the way that you program aboard the whether you write your code it's where you manage your libraries and all that kind of things so the particle idea is completely cloud-based, it's fantastic keeps all your applications up there all the libraries you know can keep track of your devices you can flash to your photo an electron over the air. For more information on working with the particle photon and the particle electron individually, check it out specific tutorials for that, it's going to be more of a look at you know sort of walk through the ide and how we can flash over our applications.
So yeah, we'll have a look and we’re going to go to build.particle.io. So build.particle.io. and the particle team have made it so easy to get started with writing code it uses the same at software abstraction wiring as Arduino. So, you now your functions like digital right, dude read, loop, you know you set up, void setup and void loop. They are the same you can pretty much port Arduino code almost line for line over to this with very few changes. So, I’m going to have a look and I’ve got loaded up an app here called blink demo, it's pretty much the hello world of programs, but before we go into that will just have a look at the particle idea window.
So, there's two main sections here we've a kind of our coding workspace here and this where we write our code where we're going to you know get compilation messages you know be able to view the library code things like that and then you've got your menu in your menu panel I guess so here is my show and all the info of the tab your own and you've got your code tab, you've got your library tab so you can search for libraries, you can put libraries in your apps, things like that. So, you know we can look through who can walk through the library's now the libraries are community driven so lots of people can upload libraries I can tell you how many people are using it. so, you know you can find a popular library that's probably going to work. you've got devices docs link, so you can see you're all your different devices and the status in folders. So, whether they're online the name of your individual device I can see which one I'm targeting whether a photon or an electron or a quartz and, on the board, go to the console and view our settings so that's sort of everything they can do with the IDE.
Now it's fantastic all you need to do is log in with your particle account if you haven't may want to go to particle do and sign up its manages the cloud platform the app your device is the command line interface everything. so I've kind of got here its two main sections one and two, and three is really just an extension of that menu bar you know it's we're actually selecting what's going on the menu bar just sort of highlighted them differently so you can see you know see what's going on there so we'll look up how we actually can manage our code in here so here's a few main features up the top here you've got your flash button, you've got verify and you've got verifier, now saving obviously you know saves a copy of your code I'm to the iCloud. verify goes through and attempts to compile your code, so make sure that you know it's able to run that there's not a syntax error or something that's break your code and stop it from running so we can take this go to here and just click verify it'll take a few min a few seconds sorry not a few minutes yeah verified great work which means it's ready to upload and then the flash button is actually going to flash your code to the device.
Now as you can see I've got an electron board targeted at the moment and with the electron because you do have to you know work with data usage and does cost you know per megabyte for the data you're using, I recommend staying away from flashing over the air unless you have, lots of data to you don't care or you know you just can't bother using the command line interface so if we go flash it will actually recognize that and say hey you know you're going to use some you know use a few kb from your data plan and will just if you a warning if you want to look at how you can use the command line interface to flush to your electronic check out our specific getting started with electron tutorial and for now we're going to change that to photon Margaret, I like naming my boards after our unique Australian names, kind of a thing and I'm going to target that device I'm just going to go ahead and connect it up to power some just using the USB power here, I think it's 10 carries on this particular photon and in fact it might not be Margaret that's selected here I think is I know it is Margaret yeah just running a different piece of foam were there so we're going to go back and so that's the IDE and now we can pretty much just flash our codes. the codes here so if you copy and paste that into you into your ide, already got two here but go through the process yet so copy dating we don’t need to use any libraries anything like that. we're going to go through, now we can flash it so when you click verify that's compliant you know compiling and checking without flashing but when you click flash it will also go through that compilation process it's pretty much, so you don't really need to click both if you're going to flash we can just click flash. now because it's a photon it doesn't matter that it's a flashing over the air and so it's just taking a moment to compile we can see the status LED here, connecting to the network and it's running a code. super easy that's the hello world of our microcontrollers blinking LED on and off the onboard led something too complicated going on my just declaring our LED as variable setting it as an output and then we're sending it high waiting half second setting a low waiting half second rinse and repeat.
And there we go that's a getting started with the particle ide, we're using build.particle.io, the subdomain of particle io and yeah. that's all there is to it guys thanks for thanks for watching, look at some of our other tutorials go through working with displays, graphic, character, great project ideas, yeah. that's it for now guys have a great day I'm Sam thanks for watching you.