Overview

The Papilio uses a "Wing" numbering scheme which allows the headers to be easily grouped into 16 or 8 bit Wing Slots.

16 Bit Wing Slots


16 Bit Wing Slots

Each 16 bit Wing slot is designated by letter. The Papilio One has three 16 bit Wing Slots that are designated as WA, WB, and WC.

Blink pin 4 on A

  1. int ledState = HIGH;
  2. void setup() {
  3.   pinMode(WA4, OUTPUT);
  4. }
  5. void loop() {
  6.   delay(200);
  7.   ledState = !ledState;
  8.   digitalWrite(WA4, ledState);
  9. }

Blink pin 4 on C

  1. int ledState = HIGH;
  2. void setup() {
  3.   pinMode(WC4, OUTPUT);
  4. }
  5. void loop() {
  6.   delay(200);
  7.   ledState = !ledState;
  8.   digitalWrite(WC4, ledState);
  9. }

8 Bit Wing Slots


8 Bit Wing Slots

Each 16 Bit Wing slot can be divided into two 8 bit Wing slots by separating them into an upper and lower portion. Wing slot A can be broken down into WAL and WAH, B into WBL and WBH, and C into WCL and WCH.

Blink pin 4 on AL

  1. int ledState = HIGH;
  2. void setup() {
  3.   pinMode(WAL4, OUTPUT);
  4. }
  5. void loop() {
  6.   delay(200);
  7.   ledState = !ledState;
  8.   digitalWrite(WAL4, ledState);
  9. }

Blink pin 4 on AH which is also A12 or 12

  1. int ledState = HIGH;
  2. void setup() {
  3.   pinMode(WAH4, OUTPUT);
  4. }
  5. void loop() {
  6.   delay(200);
  7.   ledState = !ledState;
  8.   digitalWrite(WAH4, ledState);
  9. }

Arduino Numbering


Arduino Numbering

Pins can also be addressed using the standard Arduino convention of using a number.

Example sketch using Arduino referencing

  1. int ledState = HIGH;
  2. void setup() {
  3.   pinMode(4, OUTPUT);
  4. }
  5. void loop() {
  6.   delay(200);
  7.   ledState = !ledState;
  8.   digitalWrite(4, ledState);
  9. }
  

Share |