---
title: Starting Your P2 Project with a Spin2 Template
description: "[![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/file_menu.png)](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/file_menu.png)[![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/Template-full-1024x741.jpg)](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/Template-full.jpg) ##### Description It’s…"
url: "https://obex.parallax.com/docs/quick-bytes/propeller-2/starting-your-p2-project-with-a-spin2-template/"
updated: "2026-09-29"
category: Propeller 2
---

# Starting Your P2 Project with a Spin2 Template

[![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/file_menu.png)](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/file_menu.png)[![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/Template-full-1024x741.jpg)](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/Template-full.jpg)

##### Description

It’s common for writers – fiction, non-fiction, and even code writers – to be excited about starting a project only to become paralyzed by a blank screen on opening their editor. I help myself past this initial hurdle by starting every project with a template. My template provides the basic framework of a generic program that helps me get out of the blocks a little faster. The organization of the template directs my creativity to the task at hand.

If you don’t have your own template you can start with the one included here. Download and extract the files from the P2 Template zip, available below under Source Code. Move the file called **p2_template.spin2** to the **Propeller Tool\Templates folder**. Move the other files to the **Propeller Tool\Library** folder. As of version 2.4.x, there is a **Propeller Tool** folder under **Documents**; you can find the **Templates** and **Library** folders under that.

Propeller Tool makes it easy to specify a starting template for new projects. Press the **F5** key (or click on **Edit\Preferences**…) to open the **Preferences** dialog. Now click on the **Files & Folders** tab. Click on the **Browse** button and navigate to your Templates folder using the Select Template File dialog. Select the desired template file, then click on **Open** to return to the **Preferences** dialog. Finally, click **Accept** on the Preferences dialog and the template will be ready for use.

![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/preferences_dialog.png)![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/select_template_file.png)

There are three ways to start a project using the template:

1. Click **File\New (From P2 Template)**
2. Use the keyboard shortcut: [Ctrl]+[Alt]+[2]
3. Right-click on any open tab in the editor and select **New (From P2 Template)**

![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/file_menu.png)![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/editor_tab_context_menu.png)

Regardless of the method used to create your file, you’ll have a new tab that will be named *UntitledNN* (where NN is a 1- or 2-digit number). It is a good habit to immediately update the info header at the top new file and save it with an appropriate name to a project folder (make sure the extension in the **Save As**… dialog is set to **.spin2**). The old edict still holds true: Save early, save often.

![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/Template-full-1.jpg)

In the Summary view, the code blocks will condense. 

![](/qbi/Starting Your P2 Project With A Spin2 Template - Parallax_files/Template-condensed.jpg)

The template has a serial object attached that allows the program to send information to a terminal. As PST (Propeller Serial Terminal) is installed with Propeller Tool, the program defaults to its use. If you’re using a VT100 terminal, change the terminal type with this line:

```spin2
T_TYPE = T_ANSI
```

The included ANSI object provides methods that simplify the use of ANSI terminals, allowing cursor control and colorful text output from your programs.

Now that you’re no longer staring at a blank page, it’s time to create something fantastic with the incredible P2!

##### Parts Used

- [Any Propeller 2 board](https://www.parallax.com/product/p2-edge-module/)

##### Source Code

- [P2 Template](/qbi/downloads/p2_template-Archive-Date-2022.05.23-Time-06.49.zip)

##### Programming Language

- [Spin 2](https://www.parallax.com/propeller-2/get-started/spin2/)

##### Tools and Operating System

- [Propeller Tool for Windows](https://www.parallax.com/propeller-2/programming-tools/)

##### Additional Resources

- [Propeller 2 Spin Documentation](https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit)

##### Document Author

- Jon McPhalen

##### Source Code Author

- Jon McPhalen
