Skip to content
Most of the important files from my High School Robotics course using the photon a wifi out of the box arduino.
C++ HTML Shell
Branch: master
Clone or download
Latest commit 0eee7d6 Sep 16, 2019

Note: update Sept 16, 2019

If in any of my code you see

It has been deprecated and this code should replace it

Most of the important files from my High School Robotics course using the photon, a wifi out of the box arduino.

For advanced students in my High School beginner robotics class to proceed quickly through the course so they can start making prototypes or for beginner students in my advanced Robotics Construction class to work at their own pace through some of the harder assignments.

For Machine Learning using Javascript and tensorflowjs in the web browser try my site at:

Hopefully this repository will stay reasonably static so that it matches the video series at photon high school robotics



Good References

Particle Community Great help when you are stuck

Photon Firmware Documentation Learn about the firmware (The software that runs the Photon).

Price List Don't forget to see the price list for the basic Robotics course that I teach. Students tend to work in pairs but I have them plan three final projects two of which should be done individually.

List of Videos that match the repository folders above.

  1. Video a00-intro An introduction to teaching robotics using the Photon

  2. Video a01-console: A simple console program to get things started. No webpage needed. Outputs a counter, a random number and the analog sensor A0 to the console, by using a GND (black), 3V3 (red) , SIG (yellow) sensor connected to A0 in this case a slide potentiometer (variable resistor).

  3. Video a02-voltage-divider: Using a voltage divider to better control the output of a 2 prong sensor in this case a SNAP circuit photoresistor

  4. Video a03-DAC-to-ADC: This program shows how to change a digital signal into an anlog signal and then what happens when that analog signal is read by the analog pin A0 and the digital pin D6

  5. Video a04-SOS-programming A short look at programming the photon by having students control the D7 LED to flash SOS

  6. Video a05-tinker A quick look at the tinker program that is part of the Particle android or IOs Apps

  7. Video a06-web-app A web page replacement for the Tinker App. You can edit the web page to control any pins on the Photon. View the generic working web app at Needs your device ID and access token, which is stored locally on the webpage and watch how it can activate D7 to prove web page connectivity.

  8. Video A07-mobile-App. Once you have a working web page you can then convert the web page into a free Android App (or IOS App but for $100 per year to Apple !) The App can then be installed on your android. All of this is done very easily using the online Adobe Phonegap Build

  9. Video video A08-IFTTT Have your Photon control other devices on the web using Today we just use a button to turn on D7 but using IFTTT we can try to control other students D7 buttons. Note: use a slider to reset your photon's ability to send to IFTTT and a button to actually send the message.

  10. Video a09-servo Get a 6V servo working. Never run a 6V servo off the photon. It may work for a few seconds but my students have fried too many photons doing that. Servo's are very easy to use, make sure you change the code to prove you understand how it works. The servos we use tend to messup around 0 degrees and at 180 degrees, We find it works best to go from 10 degrees to 170 degrees. Challenge: How to get the servo working with the web-app?

  11. Video a10-transistor. Using a PNP transistor to protect the Photon while controlling a more powerful circuit, such as a small 3V DC motor. A kind of cheap single direction DC motor driver using only a transistor.

  12. Video a11-DC-motor-drivers For DC motors I would like you to use the web-app.ino and web-app.html to control both the dual motor driver which works for motors up to to 13.5 V max and 1.2 Amp Max and the big motor driver for DC motors up To 24V Max and 12 Amp Max .

  13. Video a12-stepper-motor-driver Just proving that a Pololu stepper motor with Pololu stepper driver works. You should try to program it to do more fancy things. Another thing my students tried is using delayMicroseconds() instead of delay() to get the stepper moving faster. As always be careful with your motor.

  14. Video a13-arduino. When Wifi is bad make your Photon switch between Photon normal wifi behaviour and Non-Wifi Arduino type behaviour. Solid green means the photon is working without Wifi, breathing cyan means normal Wifi mode. Note: Learn how to set the photon to safe mode !

  15. Video a14-serial-I2C using the Groove OLED Showing how to make text print out on a very small display.

  16. Video a15-serial-SPI using the Pixy Demonstrating how to use SPI serial connections with the very cool Pixy camera that converts colored objects into high speed data.

  17. Video a16-serial-uART using a finger print scanner purchased from

  18. a17-particle-mesh working on it Jan 2019. Check it out as interesting things are added as they are understood.
    Mesh networking is in the early stages of working with Google Nests, OpenThread. Tutroials at and the openthread github.

    More to come late 2019

    My draft Openthread installation page is here. Note: Openthread makes the firmware for devices, the Border Router connects the device to the internet and wpantund controls everything.

  19. a18 GPS. I havn't made a video yet, but working code is here.

  20. a19 Accelerometer. I havn't made a video yet, but working code is here.

  21. a20. FSLP 5 Inch Touch Strip. I havn't made a video yet, but working code is here.

  22. a21 RangeFinder. I havn't made a video yet, but working code is here.

Extra These are really good extras, everyone should have a look at all 3 of them.

  1. Advanced Rasperry PI video at has it's own github site at

  2. Advanced websockets video at has it's own github site at

  3. Video The IoT rant When I first started researching Robotics for the classroom I looked into what other teachers were doing with Lego Mindstorms, VEX robotics, First programs. I had already messed around with Stamp micro-controllers and new about Arduino's and the Raspberry Pi's. All of these were great but I didn't really like them for the High School classroom. Either they were more like clubs for school competitions or just really confusing to even turn on a few LED's. Arduinos also have several versions which causes some issues.

I found out about the Photon predecessor the Spark Core and purchased it and started working with it but was really frustrated by all the weird issues surrounding learning robotics. However, as a multi-year computer programming teacher I was really impressed with the online IDE and the ability to flash code wirelessly, since installing software into school computers has always been a frustrating route. Website for the video here

Enjoy the rant.




My main github location

The normal particle cloud communication repository

The older version of the above

Fast websocket node js communication

You can’t perform that action at this time.