# Teaching Electron Programming

**URL:** https://community.particle.io/t/teaching-electron-programming/36610
**Category:** General
**Created:** [October 10, 2017, 9:08am UTC](https://community.particle.io/t/teaching-electron-programming/36610 "2017-10-10T09:08:59Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![frlobo](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/frlobo/32/1279_2.png) [@frlobo](https://community.particle.io/u/frlobo)
#### Post date: [October 10, 2017, 9:08am UTC](https://community.particle.io/t/teaching-electron-programming/36610/1 "2017-10-10T09:08:59Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![BulldogLowell](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bulldoglowell/32/4305_2.png) [@BulldogLowell](https://community.particle.io/u/BulldogLowell)
#### Post date: [October 10, 2017, 12:20pm UTC](https://community.particle.io/t/teaching-electron-programming/36610/2 "2017-10-10T12:20:58Z")

</div>

> **[GitHub Classroom](https://classroom.github.com/)**
>
> GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.

---

<div class="post-metadata">

### Author: ![frlobo](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/frlobo/32/1279_2.png) [@frlobo](https://community.particle.io/u/frlobo)
#### Post date: [October 10, 2017, 5:39pm UTC](https://community.particle.io/t/teaching-electron-programming/36610/3 "2017-10-10T17:39:19Z")

</div>

Thanks will try to learn more sbout it!

---

<div class="post-metadata">

### Author: ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)
#### Post date: [October 11, 2017, 2:40am UTC](https://community.particle.io/t/teaching-electron-programming/36610/4 "2017-10-11T02:40:34Z")

</div>

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.

> [@Use Visual Studio Code for your Particle development needs](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095):
>
> Hey, if you are a fan of Visual Studio Code I wrote an article on how to use it to build and flash your Particles [in Hackster](https://www.hackster.io/gusgonnet/use-visual-studio-code-for-your-particle-development-needs-9e23bc): [[image]](https://www.hackster.io/gusgonnet/use-visual-studio-code-for-your-particle-development-needs-9e23bc) enjoy! Gustavo.

[On this post](https://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/26) there is someone using it on a MAC.

Good luck!  
Gustavo.

---

<div class="post-metadata">

### Author: ![apullin](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/apullin/32/4915_2.png) [@apullin](https://community.particle.io/u/apullin)
#### Post date: [October 11, 2017, 3:30am UTC](https://community.particle.io/t/teaching-electron-programming/36610/5 "2017-10-11T03:30:15Z")

</div>

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 😑

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

---

<div class="post-metadata">

### Author: ![frlobo](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/frlobo/32/1279_2.png) [@frlobo](https://community.particle.io/u/frlobo)
#### Post date: [October 17, 2017, 3:58am UTC](https://community.particle.io/t/teaching-electron-programming/36610/6 "2017-10-17T03:58:30Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![frlobo](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/frlobo/32/1279_2.png) [@frlobo](https://community.particle.io/u/frlobo)
#### Post date: [October 17, 2017, 3:59am UTC](https://community.particle.io/t/teaching-electron-programming/36610/7 "2017-10-17T03:59:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![hypo](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hypo/32/4907_2.png) [@hypo](https://community.particle.io/u/hypo)
#### Post date: [March 27, 2018, 4:41pm UTC](https://community.particle.io/t/teaching-electron-programming/36610/8 "2018-03-27T16:41:14Z")

</div>

A bit late to the party, but for people who use [po-util](https://github.com/nrobinson2000/po-util) or [po](https://github.com/nrobinson2000/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:

```json
"includePath": [
                "/usr/local/Cellar/gcc-arm-none-eabi-53/20160330/arm-none-eabi/include/c++/5.3.1",
                "/usr/local/Cellar/gcc-arm-none-eabi-53/20160330/arm-none-eabi/include/c++/5.3.1/tr1",
                "/usr/local/Cellar/gcc-arm-none-eabi-53/20160330/arm-none-eabi/include/c++/5.3.1/arm-none-eabi",
                "/usr/local/Cellar/gcc-arm-none-eabi-53/20160330/arm-none-eabi/include",

                "~/.po-util/src/particle/firmware/bootloader/inc",
                "~/.po-util/src/particle/firmware/bootloader/src",
                "~/.po-util/src/particle/firmware/communication/inc",
                "~/.po-util/src/particle/firmware/communication/src",
                "~/.po-util/src/particle/firmware/dynalib/inc",
                "~/.po-util/src/particle/firmware/dynalib/src",
                "~/.po-util/src/particle/firmware/hal/inc",
                "~/.po-util/src/particle/firmware/hal/src",
                "~/.po-util/src/particle/firmware/hal/src/newhal",
                "~/.po-util/src/particle/firmware/hal/shared",
                "~/.po-util/src/particle/firmware/main/inc",
                "~/.po-util/src/particle/firmware/main/src",
                "~/.po-util/src/particle/firmware/modules/inc",
                "~/.po-util/src/particle/firmware/modules/src",
                "~/.po-util/src/particle/firmware/platform/inc",
                "~/.po-util/src/particle/firmware/platform/src",
                "~/.po-util/src/particle/firmware/platform/shared/inc",
                "~/.po-util/src/particle/firmware/services/inc",
                "~/.po-util/src/particle/firmware/services/src",
                "~/.po-util/src/particle/firmware/system/inc",
                "~/.po-util/src/particle/firmware/system/src",
                "~/.po-util/src/particle/firmware/wiring/inc",
                "~/.po-util/src/particle/firmware/wiring/src",
                "~/.po-util/src/particle/firmware/user/inc",
                "~/.po-util/src/particle/firmware/user/src",

                "${workspaceRoot}"
            ],

```

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 🙂
