fdaniels
Well-known member
I just wanted to start a new Sketch, copying definitions for Hardware and Variables from an older Sketch and - voila - it doesnt work.
It boils down to this:
Gives this Error:
Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz (overclock), Faster, US English"
c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-writer.o): In function `_write_r':
writer.c.text._write_r+0x12): undefined reference to `_write'
collect2.exe: error: ld returned 1 exit status
Error compiling for board Teensy 3.2 / 3.1.
while changing " value = encoder.getValue();" to "Serial.println( encoder.getValue());" like below compiles fine.
Any Ideas what i am doing wrong? Im a bit puzzled as i used these Lines in allmost all sketches before and all of these compile just fine.
It boils down to this:
Code:
#include "EncoderTool.h"
using namespace EncoderTool;
Encoder encoder;
int value=0;
void setup() {
// put your setup code here, to run once:
encoder.begin(14,15);
encoder.setValue(0);
}
void loop() {
//put your main code here, to run repeatedly:
value = encoder.getValue();
}
Gives this Error:
Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz (overclock), Faster, US English"
c:/program files (x86)/arduino/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-writer.o): In function `_write_r':
writer.c.text._write_r+0x12): undefined reference to `_write'
collect2.exe: error: ld returned 1 exit status
Error compiling for board Teensy 3.2 / 3.1.
while changing " value = encoder.getValue();" to "Serial.println( encoder.getValue());" like below compiles fine.
Code:
#include "EncoderTool.h"
using namespace EncoderTool;
Encoder encoder;
int value=0;
void setup() {
// put your setup code here, to run once:
encoder.begin(14,15);
encoder.setValue(0);
}
void loop() {
//put your main code here, to run repeatedly:
Serial.println( encoder.getValue());
}
Any Ideas what i am doing wrong? Im a bit puzzled as i used these Lines in allmost all sketches before and all of these compile just fine.