chipKIT® Development Platform

Inspired by Arduino™

Pin out for LED?

Created Tue, 25 Mar 2014 21:05:37 +0000 by tpchipkit


tpchipkit

Tue, 25 Mar 2014 21:05:37 +0000

I just got the uno32 board and I am using the sample code from Digilent to make the LED flash. I don't see in the sample code where the LED1 pin is defined, the manual says it's pin 13. I change the PIN_LED2 and LED5 flashes. How does the MPIDE know how the pinout for the UNO32 board?

here is the code: void setup() {
// initialize the digital pin as an output. // Pin PIN_LED1 has an LED connected on most Arduino and compatible boards: pinMode(PIN_LED1, OUTPUT);
}

void loop() { digitalWrite(PIN_LED1, HIGH); // set the LED on delay(100); // wait for a second digitalWrite(PIN_LED1, LOW); // set the LED off delay(100); // wait for a second }


majenko

Tue, 25 Mar 2014 21:18:57 +0000

It's all part of the board definition.

The simple fact that you have the Uno32 selected defines a number of things, such as the pins for the LEDs, which serial ports are available and what they are mapped to, etc.

If you're interested, everything for that kind of thing is defined in hardware/pic32/variants/


tpchipkit

Wed, 26 Mar 2014 13:39:39 +0000

Thank you! That is what I was looking for.