Maker in traing: Compilation error: exit status 1

TampaTIM

New member
Hello teensy community,

i'm new to teensy and am working to build my skills past hello world!

I'm working to generate a PPM signal and the code I'm trying to repurpose continues to give the following error: Compilation error: exit status 1.

I've been able to generate a small serial monitor program with a delay as well as a high frequency blink so I don't believe it's a driver or port issue?


---------------------
#include<PulsePosition.h>

Pulseposition myOut;

void setup() {
myOut.begin(14);
myOut.write(1,1600);
myOut.write(2,1200);
myOut.write(3,1100);

void loop(){
}
---------------------



any reference material or suggestions greatly appreciated

Cheers!
 
I think i know what you mean, i tried following the rabbit hole and came up with this..
#include<PulsePosition.h>
int PulsePositionInput myOut;
void setup() {
// put your setup code here, to run once:
int myOut(1,1600);
int myOut(2,1200);
int myOut(3,1100);


}
void loop() {
// put your main code here, to run repeatedly:
}
---------------------------------------------------------------------------------------------------------------
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:3:24: error: expected initializer before 'myOut'
3 | int PulsePositionInput myOut;
| ^~~~~
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino: In function 'void setup()':
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:7:17: warning: expression list treated as compound expression in initializer [-fpermissive]
7 | int myOut(1,1600);
| ^
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:7:11: warning: left operand of comma operator has no effect [-Wunused-value]
7 | int myOut(1,1600);
| ^
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:8:5: error: redeclaration of 'int myOut'
8 | int myOut(2,1200);
| ^~~~~
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:7:5: note: 'int myOut' previously declared here
7 | int myOut(1,1600);
| ^~~~~
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:9:5: error: redeclaration of 'int myOut'
9 | int myOut(3,1100);
| ^~~~~
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:7:5: note: 'int myOut' previously declared here
7 | int myOut(1,1600);
| ^~~~~
C:\Users\Primary\AppData\Local\Temp\.arduinoIDE-unsaved202429-13300-hrktif.lekb\sketch_mar9a\sketch_mar9a.ino:7:5: warning: unused variable 'myOut' [-Wunused-variable]
Multiple libraries were found for "PulsePosition.h"
Used: C:\Users\Primary\Documents\Arduino\libraries\PulsePosition
Not used: C:\Users\Primary\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\PulsePosition
exit status 1

Compilation error: expected initializer before 'myOut'
 
Back
Top