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 (:source lang=c highlight='3,8':) int ledState = HIGH; void setup() {

  pinMode(WA4, OUTPUT);

} void loop() {

  delay(200);
  ledState = !ledState; 
  digitalWrite(WA4, ledState);

} (:sourcend:) Blink pin 4 on C (:source lang=c highlight='3,8':) int ledState = HIGH; void setup() {

  pinMode(WC4, OUTPUT);

} void loop() {

  delay(200);
  ledState = !ledState; 
  digitalWrite(WC4, ledState);

} (:sourcend:)


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 (:source lang=c highlight='3,8':) int ledState = HIGH; void setup() {

  pinMode(WAL4, OUTPUT);

} void loop() {

  delay(200);
  ledState = !ledState; 
  digitalWrite(WAL4, ledState);

} (:sourcend:) Blink pin 4 on AH which is also A12 or 12 (:source lang=c highlight='3,8':) int ledState = HIGH; void setup() {

  pinMode(WAH4, OUTPUT);

} void loop() {

  delay(200);
  ledState = !ledState; 
  digitalWrite(WAH4, ledState);

} (:sourcend:)


Arduino Numbering


Arduino Numbering

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

Example sketch using Arduino referencing (:source lang=c highlight='3,8':) int ledState = HIGH; void setup() {

  pinMode(4, OUTPUT);

} void loop() {

  delay(200);
  ledState = !ledState; 
  digitalWrite(4, ledState);

} (:sourcend:)

  

Share |