In Assignment 1, you learned how to get data from the Internet and visualize it. In this assignment, you’ll use your newfound Javascript skills to interact with your Photon; you’ll also learn a bit of microcontroller programming in C.
The main goal for this assignment is to get comfortable with the idea and process of sending data back and forth from a physical object (the Photon) to a computer. You’ll do this via USB and/or the Particle cloud.
The learning goals for this assignment are as follows:
You’re going to connect some extra electronics to your Photon. Have a look at the list of parts that are available to see what you can choose from. In addition, you can order extra parts if you want from Sparkfun, Adafruit or other places; note that “my parts didn’t arrive” is not a valid excuse for unfinished work, though.
Look at the Resources section below. There are a lot of useful links to help you there. Also be sure to check out the Resources on the main page.
Start now! This is a more complex assignment than the first one. I’m here to help but have limited time, so it’s in your best interest to run into problem earlier rather than later!
In order to complete this assignment, you will need the supplementary files linked to in the Resources section!
You’ll be graded, in part, on the quality of your visualization; so if you were unhappy with how your first assignment came out, this is your chance to improve it.
Spark.publish()
). This means:Spark.subscribe()
and event
publishing).
It can react independently to some computer- or online-based event
or to the sensors attached to the Photon. In the latter case,
however, the data must leave the Photon to the computer or cloud
before it returns to cause a reaction.You’ll turn in your code via your Github repository. Along with your code, upload a Readme.md file, which Github will then display with your repository. Include:
You will also demo your work in class.
If you can’t get your Photon connected to the network, you can skip
that part and use it unconnected. There’s more information
here,
but the short version is to add the line
SYSTEM_MODE(SEMI_AUTOMATIC);
at the top of your .ino
file. This
will allow your code to run right away without trying to connect to
the Internet. (Obviously any cloud functions such as
Spark.publish()
won’t work if you use this solution!)