Teaching Electron Programming

Hi All,

I am teaching a class of middle school kids on how to code the electron as the micro controller for a High Altitude Ballon. However it is a tad more cumbersome to program than the Arduino, specially when we don’t want to waste data by flashing it via 3G. So we need local USB flashing capabilities.

The group is about 8 persons and I want them all to share the code in the computer and be able to compile it to check their syntax prior to flashing, so that we can share bits of code to program in the Electron we are using to test.

What would you recommend as a good/efficient workflow I can use for this?

I was thinking having them use the WebIDE, and I can have my computer sharing the code and I can do the bin downloading on my computer and do the flashing. But I don’t know if this is the best way.

They are all MAC Computers…

1 Like

Thanks will try to learn more sbout it!

On top of using github classroom, for building and flashing I would use VS Code on any computer. Hit CTRL SHIFT B to build, and CTRL SHIFT T to flash via USB.

On this post there is someone using it on a MAC.

Good luck!

It works great on a mac. GREAT. But I have the keystrokes set up a little differently, just per the guide I followed, so F8 (fn+F8 on macbook keyboard, actual F8 when I have my mechanical switch KB set up) in my case.

Particle does have a plugin package for Atom and distributed a Particle branded “Particle IDE” based on atom + plugin, but I’m not sure how well it is maintained. I haven’t used it for a long time but last I recall, the problem matcher for error output did not work.
It definitely works for the VSCode setup I use, and it is a great boon.

HOWEVER: note that you will need the particle-cli installed for the VSCode solution to work.
And getting particle-cli installed requires NodeJS to be installed.
Installing NodeJS on a mac is an awful exasperating experience, seriously a shotgun-in-the-mouth level of unending frustration.

I’d also say: prototype on Photon over wifi, if that is a good enough surrogate. After dealing with Electon, the photon OTA flashing seems totally magical and it is refreshing how fast you can iterate. And I guess you could teach them about TCP/IP on different PHY’s.

And following a trick that I’ve seen on here: You can make a Particle Function that kicks the device into DFU mode, so you don’t have to fuss with the buttons every time, as long as the device is connected.

You can also get 3rd party SIM’s that will make the data usage part less daunting and costly, but beware that OTA is presently broken on system v0.6.2 for some 3rd party SIM providers :expressionless:

(also … middle schoolers learning C++? wow!)


Thanks for all the tips! I appreciate it.

I had my first lesson today with them and I definitely need a better solution other than Atom. Will give VS A shot tonight.

As far as C++… YES! they are learning! Faster than anticipated, I am abstracting a lot of the complexity.

Thanks for the help! Will keep you posted!

This is amazing! Thanks @gusgonnet! Appreciate it a lot!

1 Like

A bit late to the party, but for people who use po-util or po, here is a configuration bit that might help to use VSCode’s IntelliSense correctly.

Put this into your .vscode/c_cpp_properties.json as property of your build configuration:

"includePath": [



Just replace /usr/local/Cellar/gcc-arm-none-eabi-53/20160330/arm-none-eabi/include/c++/5.3.1 with the path to your local arm-non-eabi installation.

I hope I got all paths right. Maybe it helps someone :slight_smile: