High School Robotics Course using the Particle.io Mesh Devices Blog

High School Robotics Course using the Particle.io Mesh Devices Blog

I am updating my High School Robotics course that uses the Photon and Raspberry PI3 to include the Particle.io Mesh Devices. I might as well Blog about the experience and tweet about it on twitter using @rocksetta

Note: I have taught Computer Programming for about 30 years, have no background in Robotics, but did not like what I saw other teachers doing with Arduinos and Lego Mindstorms so I developed my own course. I also have taught javascript since it began (seriously about 20 years) and have used Phonegap Build to convert web pages into IOS and Android mobile apps. Recently I have been developing a Machine Learning High School course and a method for anyone to create their own robotics course called an IDS (Independent Directed Studies) course.

Why all this stuff about Javascript? My entire course is based on connecting the particle devices to the internet using webpages. See video Web App The webpage and supporting .ino file are reasonably complex but students find it very easy to edit the important parts of code needed to control the Photon.

See code example below:

   

<input type="button" value="digitalWrite(D7,HIGH);" onClick="{
    sendToParticle('digitalWrite(D7,HIGH);')
}">

Since everything is now in Javascript we can use Phonegap Build to convert the webpage into an IOS or Android app and Tensorflowjs to add some Machine Learning to any collected IOT data. (See if your High School offers a similar program.)

My original High School Robotics Course Github is at:

and the supporting Youtube playlist is at:

https://www.youtube.com/playlist?list=PL57Dnr1H_egsL0r4RXPA4PY2yZhOJk5Nr

Please excuse the irritating jingle, a student made it for me and was so proud of it I felt like I had to use it :roll_eyes:

My original blog about setting up the Spark Core and Photon is badly named here

Here is my box of Mesh devices that arrived today:

Includes:
1 Ethernet Featherwing (Makes any Mesh device able to be plugged into Ethernet)
1 Boron (Cellular, Wifi, Mesh and Bluetooth)
15 Argons (Wifi, Mesh and Bluetooth)
15 Xenons (Mesh and Bluetooth)

Can't remember why I bought the Xenons, since it seems like the Argons have everything I need, perhaps the Xenons use less power.

To begin with this will be all the frustrations with the new devices, but it will eventually get more positive. I will sometimes link to other topics when I post elsewhere such as:

During my first hour with the new devices, I got very little accomplished. My first screwup was I loaded the old particle core software. (Worked fine with the Photon.) I didn't even see the new android app since it was a black star and I am so used to the blue star.

Here is an animation of the star I made a while back:

particle-gif

Here is the correct Particle App to load:

core03

I was surprised that over wifi they needed to update. These are brand new! It took about 10 minutes as our school wifi is not so fast. Note: My cell phone had to be on the app screen during the entire upload. My screen times-out after 15 s so I held my finger on the screen the entire time. The upload seems to happen in two steps, which was interesting. I also tried the Ethernet featherwing, which seemed faster to download but also never really finished the entire process. Had to reboot the photon and never really got it showing up on the Particle.io IDE. I will try it again from home.

I was also surprised to see this screen:

Don't remember anything about extra costs just to use the mesh features. My original interest in the Mesh device was as a low cost solution for small farms as detailed in this post.

As of December 16th, 2018 the X in the below diagram could be about 200 m with Antenna equipped Argons and Xenons and about 50 m with Default Argon and Xenons without the mesh antenna (The Argon still needs a Wifi Antenna) As I learn more about the OpenThread protocol I think the field would be better setup with a few long distance (Antenna equipped Xenons) and pods of sensor based endpoint Xenons that might not need Antennas.

farm

My diagram in the post above has 21 Mesh devices to cover a very small farm, I assume different logins can use a different set of 10 mesh devices, but that is somehow defeating the purpose of the MESH! Looks like pricing is at Device Cloud pricing for Particle Mesh now available – Particle Blog 30 devices is now $10 per month (includes 3 Wifi gateways and 1 cellular), wonder what 100 devices will be?

Anyway. Now that I am at home I will try to setup the Argon and Xenon...

5 Likes

Sweet!

Thanks for sharing this journey with us :grinning:

1 Like

Thanks for sharing!

I really enjoy the educational perspective, since I am an engineer in a family of teachers.

Looking forward to hearing more about your journey; the challenges and solutions will help out all of us! (Especially with the catch-up as my devices have not arrived yet)

1 Like

@cyclin_al My wife and I are both teachers and one of my kids just started his first year of Engineering. Seems to be doing fine and loving being away from strict parents. :grin:

Hope you enjoy the blog. Here is a rant I wrote when I first started working with Robotics and using the original spark core. https://www.youtube.com/watch?v=1ZYcCXPAMPo&index=21&list=PL57Dnr1H_egsL0r4RXPA4PY2yZhOJk5Nr&t=0s

A bit better at home.

I tried the Argon (Wifi, Mesh and Bluetooth) without the antennae as my Photons worked fine without an antennae. It did fully connect until I moved it to about 5 m from my router.

Bit surprised when it wanted a mesh network name and password but made up something.

So the Argon works, got Tinker going, blinked D7 so all is good. Attached the Antennae so it could work at my computer about 10 m away from the router. I remember that with the Photon the first connection needed to be close to the router but once it had a connection I could often get quiet far away from the router. With my Argon I walked about 60 m up the street outside my house and the Argon was still working.

Then tried the Xenon (Mesh and Bluetooth). As far as I can tell the Xenon does not work without an assisting mesh device. (Please someone tell me that a single Xenon can work somehow).

So I then used my Argon as the commissioner to connect the Xenon.

…

Strange the app did not recognize that the assisting mesh device was an Argon. The App seems to think it is also a Xenon.

So after several attempts it did manage to add the xenon to the cloud.

I then got both devices breathing cyan and was able to briefly turn on and off D7, but the Xenon (might just be the one I took home) is very flaky with it’s connection to the Argon. Spent about 90% of the time disconnected and 10% of the time connected.

For a first attempt this was not a bad day. The Argon works comparable to the Photon. I am looking forward to getting many Argon’s going to be able to test out the mesh abilities.

Tomorrow I will try the Xenon with the Ethernet Featherwing and see if I can get better connectivity. Honestly I am a bit confused with the Xenon. I assume when I get more used to it I will be able to connect it to my phone using just bluetooth without having to be confused by the mesh connectivity issues. Perhaps I just use the cloud to program it and then I don’t need it after that.

Next steps. Rewrite my main .ino file to include the mesh devices. Have a good night.

1 Like

So I came in an hour early to school today, since in the past setting up Photons in a busy wifi school is almost impossible. I tried connecting the Xenon and Argon. Can’t! The school WIFI has an SSID, login and password. The Photon only uses an SSID and a password like most home Wifi networks.

Tried my Photons from last year which used a guest login. The password has changed.

I have contacted the tech department to see if they will make a private network just for the Photons, or at least tell me the guest login password. Typically tech requests take about 3 months, I can speed up the request by pointing out that this is a curricular course that starts in February 2019 and needs the devices working and debugged.

I tried having a student to login using the student network. Found something very interesting and a solution.

Many students android cell phones can’t scan the qrcode on the Mesh Devices. The phones do not focus that close. My Samsung S8 was fine. Herre is an image of what the students phones see.

The easy solution for the students was to use my phone to take a picture of the QR style code and then use their phone to scan my image.

Worked great, except for the above login issue.

1 Like

Just some thoughts…Some phones require a minimum distance to focus. Did you try backing the phone off? Even if the code is smaller than the window, it may still scan. Some phones also have a macro setting you have to enable… look for this icon: image. Also try using a flashlight or other light source to shine on the device so that the camera has more light.

@rocksetta, on my Samsung A5 the issue I have is that the focus takes over 15 sec to activate and sometimes not at all regardless of distance and lighting conditions. I have reported this to Particle several times. The picture trick worked for me as well.

2 Likes

It would for me even if the image was up to 1 foot away.

My Samsung S8 with an excellent camera only worked within 4 inches of the device. For both of my students who tried scanning without success, moving farther back did not help. @ninjatill idea about the micro setting is something I will try.

So still at school and am trying my Ethernet Featherwing with a fresh Argon. Seems to be installing the software, but yesterday I could not get any farther, probably the same issue with the wifi login.

So everything installed but now it is frozen on this screen

To bad because the featherwing could have solved all my school connectivity issues.

On reboot of the app it is trying to connect to the internet, however this step should be really fast not several minutes. I will have to try this again at home as my school network may have some security hoops to jump through unlike on home network.

Interesting point here, that while the Argon is trying to connect to the internet it seems to ignore the 3 second push on the Mode button to switch back to setup mode. I had to disconnect the Ethernet cable before I could reset the Argon.

Here is a link to a little request I have that fit a different topic

So back at home, I am able to get the Ethernet Featherwing working and a mesh network setup. I have 3 Argons and 1 Xenon working. This different Xenon is also flaky unless connected to the internet using the Ethernet Featherwing (Thank goodness for it, on my home network it is fast and reliable. Setting up devices is much quicker). Problem though, adding to a mesh network seems very confusing.

Sometimes I get the commissioner screen which is a pain but does seem to work

but most of the times I enter the Mesh Network name and password and it wants me to create the network. The system seems to be fine with having several mesh networks all with the same name and password.

The console shows one of my Mesh network with one device attached and has a link to add more devices which just directs me to the App.

Why does the app not know about Mesh networks already setup? Any ideas @peekay123

Just did it again. It says you can create or add to a previous mesh network but only creates the network never lets you add to a network.

but all it lets me do is

and then I set a password and it creates the mesh network even if I already made one with that same name.

Probably explains why my Xenons are so flaky since they are not really getting setup properly to a mesh network.

If I understand correctly, you have a bunch of Argons and trying to add them to a mesh network? Currently, you can’t add an Argon to an existing mesh network. That is considered a high availability (HA) network and hasn’t been implemented yet. I haven’t seen a timeline for implementation of HA yet. I suppose you could create all your mesh networks with the same name but don’t expect them to be on the same mesh “subnet” (for lack of a better term) and communicate with each other. You can only add Xenons to an existing mesh at the moment.

Reading some of your posts above, looks like You already know this about HA but are having issues just with the assisting device?

I found the concept of the assisting device confusing at first. Admittedly, I had to repeat the process because I screwed it up the first time. But I’ve only done it once. I will try to add another Xenon to my Argon network tonight.

3 Likes

Holly smoke @ninjatill I did not know that at all. I thought the whole point of the MESH, was that you could have multiple Borons, Argons and Xenons that creat a MESH of connectivity. So I guess 1 Argon can have up to 9 Xenons connected on a free micro-network. Now at least I am glad I purchased 15 Xenons. :smiley:

So that explains the payment structure where you have to pay $10 per month for 3 Argons and 1 Boron with up to 30 Devices and 10MB of data per month.

Personally I am a bit upset, but at least that explains the frustration I have been having. Time to bring home a bunch of Xenons.

That's what I was expecting also. After playing with all of it for the last few days I'm not putting it to the side until the new firmware get's rolled out so we can see what's getting fixed and what still needs fixed.

Now I'm playing with some Digi XBee Pro 900Mhz HP radios that are setup in DigiMesh network and connected to a stable Photon. Much more expensive than a Xenon but also 1 mile range a stable platform to work on now to keep moving forward on a concept that can require 50-200 nodes.

I can see Particle MESH being beneficial in many situations once it all gets worked out.

1 Like

That was my expectation also when I placed my pre-order.
The beauty of the Photon and others of the 2nd generation was the flexibility to be able to do almost anything imaginable.

I assumed it would be the same with Mesh. My imagination may have run wild, as I described a possible use case in this thread:

I hope Particle gets to that point where it all gets worked out. I am also uncertain of the pricing structure; it may require careful though how I define my networks.
I can still foresee a lot of opportunity for ParticleMesh.

PS. I have total empathy for your kid; I completely understand. Good luck at engineering school.

1 Like

I now remember why I was so pumped about the mesh devices. I teach robotics and will often have 15 Photons going at one time in the classroom. Most days everything is fine but some days 2 to 3 Photons will not connect well. Sometimes its the location in the class, sometimes its the Photon does not work as well as the others. I have found, that I can improve the connectivity by activating all the photons in the morning.

Needless to say, for the students with the bad Photons the class is very frustrating. I often set up a hot spot with my own cell phone data plan just to reduce the tension.

I was hoping that with the mesh devices we could have 15 Argons working with Wifi and Mesh conectivity and if 2 or 3 were having a bad Wifi day the mesh connection would kick in as a backup form of connection. Now I find out that even 2 Argons can not be connected on a free Mesh network.

Now I guess I could have 2 Argons each with its own mesh network of 7 Xenons for free, but presently my Xenons are connecting worse than any Photon I have used so that is not looking like any kind of a classroom solution.

Bit disappointed.

1 Like

One proposal I planned to raise with Particle was to allow multiple devices that could act as gateways but can be “down-rated” to be mere repeaters or even endnodes to avoid the HA fee.
While reactivating the gateway functionality would only be possible via new firmware (no on-the-fly changing) and also limit the mesh to only accept one gateway at any time with some cool-down phase when switching gateway.

But I didn’t have chance to directly talk to them eye-to-eye about this.

3 Likes

I also wonder about how to swap out a gateway. What happens when you have deployed a mesh network to the field and say you find a need to swap out the gateway? Boron to Argon. Argon to Xenon Ethernet. Xenon Ethernet to Argon. Or even Argon to Argon (if one gets flaky or dies). Etc. Right now, I want to swap out the Xenon Ethernet endpoint on my mesh with a new Argon. Currently, there’s no way to do that. I have to setup the Argon with a new mesh network and then go to each Xenon endpoint and re-do the setup process to get them all on the Argon mesh network. Hopefully they have something planned for this.

3 Likes

So I went through the process of setting up a new mesh network last night. I grabbed a new Argon and Xenon out of the box and went through the steps. NOTE: for anyone who finds this at a later date, these setup steps could change with future firmware and mobile app updates.

Argon:

  1. Insert into breadboard, attach WiFi antenna and apply power via USB. Goes into fast blinking blue.
  2. Fire up the Particle mobile app and start the “add new device” process. While stepping through the app, the app updates the firmware on the Argon and then sits there with a spinning particle symbol. I had to exit the setup and restart twice. On the 3rd attempt, it finally recognized the Argon had the correct firmware and continued on to naming the device and creating a new mesh network. I named the device something unique but the mesh network I named the same as another existing mesh network.
  3. For the sake of this exercise, I exited the setup process instead of continuing to add a new device. If I recall correctly, when you just continue to add devices you do not have to go through the “Pair assisting device” screen and rather it already knows the mesh network and just adds the Xenons one after the other.

Xenon:

  1. Insert into breadboard and apply power via USB. Goes into fast blinking blue.
  2. Restart the Particle app and add a new device. Stepping through this process, it applies a firmware update and then scans for existing mesh networks. It sees the network I created with the Argon, I click it. Now it pauses and shows the “Pair assisting device” screen.
  3. Go to the Argon, hold down mode for 3 seconds until blinking blue then scan the Argon with mobile device. The app does it’s thing and gets the Xenon connected.
  4. Done. New mesh up and running with a single Xenon endpoint. Both running the default “Tinker” firmware.

Not sure if this is pertinent anymore now that you figured out the handful of Argons you had won’t function on the same mesh network at the moment.

1 Like

My iphone 5s also cannot see the QR code well enough (and the Particle App doesn’t let me pinch/zoom). My work-around was to have another person take a picture of the code, then I could pinch/zoom on their phone, and then use the Particle App on my phone to scan the image on their screen…

When my pre-order arrives, I’ll be putting a yellow brother label sticker (small font) with a numbered sequence for the Xenons, and A1, A2, … An for the Argon devices. Then I’ll take photos of them, crop them, and print them, so I can just pull the photos out of a folder while coding (since some devices will be built into cases or mounted into positions which would make scanning hard or a slow process).

2 Likes