Welcome to the second part of my Particle Mesh series. To recap the purpose, I wanted to have a way of learning more myself and also share some of the things I've picked up along the way about Particle hardware and Particle Mesh. This series is made for anyone who wants to learn more about Particle Mesh and created by the HacksterMIA community. Hopefully this becomes useful for many others!
With that let's continue!
What Is Xenon?Alright, let's meet our next guest in the series, Xenon! The Particle Xenon is the second piece of mesh-compatible hardware we will cover in the series and unlike the Argon, does not sport Wi-Fi. It has Bluetooth on-board and can only act as a node in our mesh network aka mesh only. Check this out for more info.
We will work with this piece of hardware for the rest of this lab and continue to add to our existing list of hardware so far.
Getting Particle(Mesh) ReadySo hopefully you have an environment already ready to go, if not be sure to check out the previous lab.
Let's finally setup our Particle Mesh network! With the Xenon, it is necessary to have a mesh network setup in order to work with the device. As mentioned earlier, the Xenon is a mesh only device, which means that it can only work with other devices and cannot act outside of a mesh network.
NOTE: While the Xenon itself cannot act as more than a node in a mesh network, it can in fact run standalone with the use of a Ethernet FeatherWing.
Hopefully you still have the Particle app install, we're going to need that to setup our next device, Particle Xenon, and create a mesh network with the Argon.
So first things first, we need to make sure there is a mesh network setup for the Xenon to connect to. Depending on how you setup the Argon device in the previous lab you may have to go back re-pair the device. Here is a screen that should have come up during your initial setup:
If you had selected "Use in Mesh Network", then you are good to go! If not, no sweat, there's an easy way to fix this. On the Argon hold down the Mode button (left button) until the LED blinks blue (this means it has gone back to pairing mode).
Just follow the same setup as before but when you reach the screen asking you to setup a mesh network, go ahead and run through the setup. It should ask for the name and some credentials for setting up your mesh network, keep note of that info as you will need it to add the Xenon to the network.
Once you have created your mesh network you should see the following screen saying that it has successfully connected to the Particle Device Cloud and following that screen you should see a confirmation screen saying that your mesh network has been created and your Argon is the gateway device.
From that screen, go ahead and tap "Set up next device" and let's add the Xenon.
Similar steps as setting up the Argon. Make sure your Xenon is plugged in and the blue light is blinking. (You may also notice the toggle to use with ethernet. This is so you can set up with the Ethernet FeatherWing if you wanted to, more ideal for standalone situation.)
So the Xenon being a mesh only device, it requires being connected to a mesh network in order to be connected. You should see a screen letting you know this and tapping "Next" should take you on your way.
The following screens should be pretty straightforward and prompt you to select an existing mesh network to connect the node to.
Once setup has been completed through the app, feel free to verify the setup itself by going to the Particle Console and checking the Networks section.
You should see your mesh network and at least 2 devices listed. If you don't see anything or missing a device, you may need to double back and retrace the steps (or feel free to message me :) )
Looking into the mesh network created, you should also see the devices broken down between Gateways and Mesh Nodes. You'll also notice that there is one of each, this is because a mesh network requires a gateway to exist and (as mentioned before) the Xenon can only act as a mesh node.
Wire Up HardwareHooray! You've setup a mesh network, I know it may not seem like much yet but don't worry, we're going to put to some good use in the later labs. And with that all set we're ready to start playing with some hardware!
First we'll go ahead and setup our components. Very similar to the first lab we will duplicate the hardware setup from the Argon. So we will continue from our first project we'll make an LED blink using the Xenon and Web IDE. (and yes, both devices will be blinking at the end of this part)
Let's start with making the following connections:
- Connect a small jumper cable from the GND pin to the negative rail on the side of the breadboard
- Connect the 220Ohms resistor from the negative rail to the positive rail
- Finally, connect the LED (negative end) to the positive rail where the resistor is and then the positive end next to the D7 pin
Below is a photo of the setup, make sure you verify your setup is correct.
Next we're ready to plug in the device, go ahead and plug in the USB cable to power on the device and wait for the pulsing light (should start off with a green blinking light as it is trying to connect to the Device Cloud).
Once connected, head on over to the Web IDE and let's flash our device!
Blink LEDIn the Web IDE, go ahead and navigate to the Code section and look for the Blink an LED project that was created in the previous lab. We'll just target the project to our new Xenon and then flash the device.
I won't cover how to flash the device here as it was covered in the previous lab, but I will cover how to change the target device.
From the Devices section, click on the star icon. This will indicate that this will be the selected device to be flashed.
Once selected, go ahead and flash the device. Hopefully if things go well, you should have TWO blinking LEDS!!
Wrap UpThat's if for this part! If you have a couple of blinking LEDs then congrats on making through the next lab for the Particle Mesh series. If you had any trouble along the way and need some help, feel free to leave me a comment or send me a message, I'll try to respond as soon as I can.
Thanks a lot for checking out this part and stay tuned for the next chapter as we dive into the Particle Boron and take a very deep dive into mesh networking and start understanding more of why it's awesome and how it all really works, it's going to be meshy ;)
Comments