B-8 Modify App

Your last step is to modify the "Hello World" app, as some extra practice.

Modify App Code

In Particle Build, modify the code within the loop() function to change the LED blinking pattern. Here are some possible options your team could choose:

  • Make the D7 LED blink faster

  • Make the D7 LED blink slower

  • Make the D7 LED blink in a different pattern (such as two quick blinks followed by a longer pause)

Add Comment

It's recommended to add a comment at the very beginning of your code to list a title for your app, plus any other information that might be helpful to you or to anyone else reviewing the program code.

For example, this comment could list your app's title, your team's information (team name and/or team members), your teacher's name, and your class period.

Add a block comment at the beginning of your app code before the setup() function:

/*
Hello World Test
Team Info
Teacher - Class Period
*/

Modify this comment to list your specific information. Check with your teacher to find out if there is other information that should be listed within this block comment.

Flash Modified App

Flash your modified app to your Photon to confirm it does what you intended it to do.

Your teacher may want to see your modified app code running on your Photon.

Download Copy of App

If you need to download a copy of your app code to your computer in order to submit it to your teacher, there are two different download icons shown in the Code Menu panel:

  1. The first icon (cloud with download arrow) to the right of "Current App" is used to download the compiled version of the app (firmware binary).

  2. The second icon (angle brackets with download arrow) to the right of "Files" is used to download a zip file containing your app source code (.ino file).

Click the second download icon to download a zip file containing your app source code:

In this case, the zip file will be named hello-world.zip. You'll need to uncompress the zip file to get your app source code file, which will be named hello-word.ino. If necessary, this .ino file can be opened in a text editor on your computer.

UNCOMPRESS ZIP: To uncompress a zip file downloaded to your computer:

  • On a Windows computer, right-click the zip file, and select "Extract All." Browse to the destination folder where you want to save the uncompressed file, and click "Extract."

  • On a Mac computer, just double-click the zip file.

Going Further

In the next tutorial, you'll start connect an input and output to your Photon to create a "Smart Light" device.

Last updated