Power / Reset Button
The button to the right of the screen is the Power / Reset button. By shortly pressing this button, the Phoenard can be turned on. Holding down this button for a few seconds turns the Phoenard off again. While in operation, shortly pressing the Power / Reset button also resets the processor. If you wish to re-start your sketch, or your sketch gets stuck, you can use the reset button run the sketch again from the beginning.
Please note that the device can not be turned off while connected to the computer through USB.
Task: Turn on the Phoenard.
The button to the left of the screen is the Select button. This is a multi-functional button that you can use as a button input in your sketch. In addition, the button has a special role for the firmware of the Phoenard. Right after the Phoenard is reset, the firmware checks if the Select button is pressed down. If this is the case, the main sketch (sketch list) is loaded.
Task: Load the sketch list:
- Press down on the Select button
- Press and release the Reset / Power button shortly
- Release the Select button once a loading bar appears.
On the Micro-SD card of the Phoenard a variety of files can be stored. Those most specific for the Phoenard are sketches. These are the .HEX (program) and .SKI (sketch icon) files in the root directory of the card. The firmware (bootloader), which runs before your sketch does, can be told to load these sketches by itself.
In the sketch list, loaded by using the Select/Reset buttons, you can see a full list of all the sketches currently on the Micro-SD card. You can go to the previous and next pages using the navigation arrows on the screen. To load a particular sketch, tap one of the icons of the sketches listed. The device will reset itself, load the sketch you pressed and then run the sketch.
To go back to the sketch list at any time, simply repeat the Select / Reset technique discussed above.
Task: Find and load the ‘Paint’ sketch, then go back to the sketch list again:
- Use the arrow buttons on the screen to navigate the sketch list
- Find the Paint sketch icon in the list
- Tap the Paint sketch icon on the screen
- Wait for loading to be done
- Touch the screen to interact with the Paint sketch
- Hold Select and shortly press Reset / Power to go back
In the sketch list, there is an additional button on the screen in between the navigation arrows. This is the ‘add sketch [+]’ button. After pressing this button, you get to enter an 8-character limited name for your sketch. After accepting a name, you get to draw an optional icon. When pressing done in the dialog, your sketch is created and loaded. You are then able to start uploading your own sketches to the Phoenard.
Task: Add a new sketch named “BLINK”:
- Press the [+] button in the sketch list
- Enter BLINK using the keyboard displayed
- Press the ‘Add sketch’ button on the bottom-right
- Draw anything you like in the icon area
- Press the ‘Done’ button on the bottom-right
- Note a red-rolling progress bar shows up indicating ‘no program’
If you have not done so already, first install the Arduino IDE, Phoenard library and FTDI drivers.
At any time you can upload sketches to the Phoenard from your computer. First connect the Phoenard to your computer using the Micro-USB cable. Then, launch up the Arduino IDE, write up your program and press the ‘Upload’ button. For programs to compile and upload correctly, make sure to select the right board (Arduino Mega 2560) and port under the tools menu first. Uploaded programs are stored under the sketch you have currently loaded. So if you load the Paint sketch, and upload your sketch, the Paint sketch is overwritten.
Task: Upload the ‘Blink’ Arduino example sketch:
- Connect the Phoenard to the computer using the Micro-USB cable
- Launch up your Arduino IDE
- Click File > Examples > 01.Basics > Blink
- Go to the new window that opens up
- Click Tools > Board: > Arduino Mega or Arduino Mega 2560
- Click Tools > Port > First-available port (COMx on Windows)
- Press the ‘Upload’ button, a round button with => in it.
- Wait for uploading to complete
- Note that the LED 13 now blinks on and off
Sketches are saved whenever you load a new sketch. If you want to save an uploaded sketch to the Micro-SD card, simply load the sketch list. A purple saving bar will show up as the sketch is saved, followed by a blue loading bar for the sketch list.
If you made a mistake uploading to the wrong sketch and do not want to save to keep the old contents, simply remove the Micro-SD card. You can then go use the same Select / Reset technique, but instead this time the current sketch is discarded. Put the Micro-SD card back in and load the sketch list properly. The old sketch will be unaffected!
Task: Save the blink sketch:
- Hold Select and shortly press Reset
- Release Select once the purple saving bar shows up
- Wait until saving and loading completes
- You are back at the sketch list
Back in the sketch list, you can also change the name and icon of existing sketches. To do so, hold down on the icon of the sketch to edit. After a short moment the edit menu shows up where you can rename and draw an icon. Press cancel to abort the entire process and to keep the old sketch name and icon. You can also delete sketches in this menu.
Task: Rename the BLINK sketch to BLINKER and change the icon:
- Navigate the sketch list to find your BLINK sketch
- Press down on the BLINK sketch icon until the edit menu shows up
- Press the ‘Rename’ button in the top-right
- Enter ‘BLINKER’ using the keyboard and press the ‘Rename’ button again
- Interact with the icon area to change the icon slightly
- Press the ‘Done’ button in the bottom-right
- The sketch is now renamed to BLINKER with a new icon
Firmware color codes
You may have noticed a variety of colors displayed in the progress bar. These are surely not random: they indicate what is currently happening on the device.
- Blue: Loading sketch from Micro-SD
- Purple: Saving sketch to Micro-SD
- Green: Computer writing to program FLASH
- Yellow: Computer reading from program FLASH (verifying)
- Light-blue: Computer read/writes Micro-SD
- Red: No sketch data is available (no program)
You can also use the Phoenard toolkit to manage sketches, access files on the Micro-SD card and even control digital pins! If you would like to make nice-looking icons using your computer, give the Phoenard toolkit a try. It is listed under downloads.