Hi there,
I'm trying to bring up a new project on Teensyduino and I was trying to use the webpage here:
https://www.pjrc.com/teensy/td_digital.html
The page says:
but it looks like this page only applies to Teensy < 3.0 - when I try that specific code in an otherwise empty project for Teensy 3.1:
I get the following error:
Digging into the header files in arduino-1.6.5/hardware/teensy/avr/cores shows that the pins are only defined in the PIN_nn syntax for the teensy/ core, not teensy3/.
Does that page need an update for 3.0/3.1? Could it be at least flagged at the top as incorrect for 3.0 and 3.1 to save some time for others?
Cheers
Gareth
I'm trying to bring up a new project on Teensyduino and I was trying to use the webpage here:
https://www.pjrc.com/teensy/td_digital.html
The page says:
You can control the mode of any pin using the pinMode() function. For example:
Code:pinMode(PIN_D6, OUTPUT);
but it looks like this page only applies to Teensy < 3.0 - when I try that specific code in an otherwise empty project for Teensy 3.1:
Code:
void setup() {
// put your setup code here, to run once:
pinMode(PIN_A1, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
}
I get the following error:
Code:
Arduino: 1.6.5 (Linux), TD: 1.24, Board: "Teensy 3.1, Serial, 96 MHz optimized (overclock), US English"
Build options changed, rebuilding all
/home/gareth/tools/arduino-1.6.5/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/gareth/tools/arduino-1.6.5/hardware/teensy/avr/cores/teensy3 /tmp/build2195455312139044899.tmp/sketch_jul01b.cpp -o /tmp/build2195455312139044899.tmp/sketch_jul01b.cpp.o
sketch_jul01b.ino: In function 'void setup()':
sketch_jul01b.ino:3:11: error: 'PIN_A1' was not declared in this scope
'PIN_A1' was not declared in this scope
Digging into the header files in arduino-1.6.5/hardware/teensy/avr/cores shows that the pins are only defined in the PIN_nn syntax for the teensy/ core, not teensy3/.
Does that page need an update for 3.0/3.1? Could it be at least flagged at the top as incorrect for 3.0 and 3.1 to save some time for others?
Cheers
Gareth
Last edited: