Closed jkwatt closed 9 years ago
can anyone help me?
Is this related to the plugin? If so can you tell me why you think so?
Yes is relatore the plug in, i tra to compile bit i have the issue shown onde step over this comment
Can you provide the console output?
ok
10:52:20 \ Incremental Build of configuration Release for project cancello_linux ** make all Building file: ../.ino.cpp Starting C++ compile "/home/tecnico/Scaricati/arduino-1.6.0/hardware/tools/avr/bin/avr-g++" -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10600 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/home/tecnico/Scaricati/arduino-1.6.0/hardware/arduino/avr/cores/arduino" -I"/home/tecnico/Scaricati/arduino-1.6.0/hardware/arduino/avr/variants/standard" -I"/home/tecnico/Documenti/Arduino/libraries/RCSwitch" -MMD -MP -MF".ino.cpp.d" -MT".ino.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "../.ino.cpp" -o ".ino.cpp.o" -Wall In file included from ../.ino.cpp:13:0: ../cancello_linux.ino:36:14: warning: overflow in implicit constant conversion [-Woverflow] int keycode =5592332; ^ ../cancello_linux.ino: In function 'void loop()': ../cancello_linux.ino:160:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ( muovi && (millis() - T) < deltaT ){ ^ ../cancello_linux.ino: In function 'boolean segnale()': ../cancello_linux.ino:316:65: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ( mySwitch.getReceivedValue() == keycode ) return true; ^ Finished building: ../.ino.cpp
Building file: /home/tecnico/Scaricati/arduino-1.6.0/hardware/arduino/avr/cores/arduino/WInterrupts.c Starting C compile "/home/tecnico/Scaricati/arduino-1.6.0/hardware/tools/avr/bin/avr-gcc" -c -g -Os -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10600 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/home/tecnico/Scaricati/arduino-1.6.0/hardware/arduino/avr/cores/arduino" -I"/home/tecnico/Scaricati/arduino-1.6.0/hardware/arduino/avr/variants/standard" -I"/home/tecnico/Documenti/Arduino/libraries/RCSwitch" -MMD -MP -MF"arduino/WInterrupts.c.d" -MT"arduino/WInterrupts.c.o" -D__IN_ECLIPSE__=1-x c++ "/home/tecnico/Scaricati/arduino-1.6.0/hardware/arduino/avr/cores/arduino/WInterrupts.c" -o "arduino/WInterrupts.c.o" -Wall avr-gcc: error: c++: No such file or directory arduino/core/subdir.mk:175: set di istruzioni per l'obiettivo "arduino/WInterrupts.c.o" non riuscito make: *\ [arduino/WInterrupts.c.o] Errore 1
10:52:21 Build Finished (took 413ms)
something is really wrong in your setup. The plugin is compiling a C source file "WInterrupts.c" partly as a c file (using avr-gcc) and partly as a c++ file "-x c++" but due to a missing space the -x is part of "-D__IN_ECLIPSE__=1" which makes that the gcc compiler is trying to compile the file "c++" which obviously does not exist.
things I think of to do to fix this 1) check your project properties->arduino whether -x c++ is part of the extra compiler options. 2) open your project properties->arduino and select apply
I'm sorry I can not figure out which items have to change in the properties of the project, what you mean by "arduino whether". excuse me but i'm a beginner with arduino+eclipse system
i solved the issue is only a .ino and .pde setting problem like you see thanks for the help!!!
now i like to debug and test the program can you give me a liitle kick to a true direction?
Debugging is advanced stuff. I need to do a video on zero debugging. But I don't get enough incentives. Here are some blog posts and a issues on local debugging.
http://iloapp.baeyens.it/blog/blog?Home&post=19 http://iloapp.baeyens.it/blog/blog?Home&post=20 http://blog.baeyens.it/#post23
https://github.com/jantje/hardware/issues/2 https://github.com/jantje/hardware/issues/1
but it work done or not?
it works
Description Resource Path Location Type set di istruzioni per l'obiettivo "arduino/WInterrupts.c.o" non riuscito subdir.mk /cancello_linux/Release/arduino/core line 175 C/C++ Problem
this is my code:
include
RCSwitch mySwitch = RCSwitch();
define interruptAntenna 0 // pin 2 SERVIRà PER RICEVERE IL SEGNALE DALL'ANTENNA RF
define pinL1 3 // DO USCITA CONTROLLO LAMPADA
define pinK1 4 // DIN INGRESSO CONTATTO CHIAVE
define pinMT1R 5 // PWM OUT USCITA PWM MOTORE 1 RIGHT
define pinMT1L 6 // PWM OUT PWM MOTORE 1 LEFT
define pinENR 7 // DO ENABLE PWM ROTAZIONE RIGHT
define pinENL 8 // DO ENABLE PWM ROTAZIONE LEFT
define pinMT2R 9 // PWM OUT USCITA PWM MOTORE 1 RIGHT
define pinMT2L 10 // PWM OUT PWM MOTORE 1 LEFT
define pinFT2 11 // DIN INGRESSO FOTOCELLULA 2 QUELLA LONTANA DAL CANCELLO
define pinSW1A 12 // DIN SWITCH SENSORE FINE CORSA 1 POSIZIONE APERTO
define pinSW1C 13 // DIN SWITCH SENSORE FINE CORSA 1 POSIZIONE CHIUSO
define pinSW2A A0 // DIN SWITCH SENSORE FINE CORSA 2 POSIZIONE APERTO
define pinSW2C A1 // DIN SWITCH SENSORE FINE CORSA 2 POSIZIONE CHIUSO
define pinAMP1 A2 // AIN SENSORE CORRENTE MOTORE 1 (UTILIZZATO PER DETERMINARE EVENTUALI OSTACOLI O PROTEZIONE CORRENTE)
define pinAMP2 A3 // AIN SENSORE CORRENTE MOTORE 2 (UTILIZZATO PER DETERMINARE EVENTUALI OSTACOLI O PROTEZIONE CORRENTE)
define pinFT1 A5 // DIN INGRESSO ANALOGICO CONFIGURATO COME DIGITALE PER PRENDERE LO STATO DELLA SECONDA FOTOCELLULA QUELLA IN LINEA NEL CANCELLO CHE MI DA L'ATTRAVERSAMENTO
int keycode =5592332;
boolean ultimaMarcia = false; // assumiamo FALSE = chiudi - TRUE = apri
boolean Fotocellule=false; //partiamo con valore false significa che le fotocellule sono sgombre boolean Alimentazione; boolean muovi = false; boolean ScambioMarcia=false;
unsigned long T;
int deltaT = 5000; // tempo di marcia del cancello/serranda per apertura/chiusura (da scegliersi in base alle proprie situazioni)
int RPWM1=0; //INIZIALIZZO TUTTI I SEGNALI PWM A 0 int LPWM11=0; int RPWM2=0; int LPWM12=0;
int Start=0; // valori per regolare il pwm Start= rampa di partenza RegimeMax=valore a regime RegimeMin=valore di velocità ridotta int RegimeMax=0; int RegimeMin=0;
int correnteMT1=0; int correnteMT2=0; int CorrenteLimite=0 ; // valore analogico limite per la corrente di assorbimento dei motori in vista di un ostacolo da valutare bool CorrenteAllarme=false;
void setup()
{
Serial.begin(9600); //inizializzo la seriale
pinMode(pinL1, OUTPUT); // configurazione pin pinMode(pinK1, INPUT);
pinMode(pinMT1R, OUTPUT); pinMode(pinMT1L, OUTPUT); pinMode(pinENR, OUTPUT); pinMode(pinENL, OUTPUT); pinMode(pinMT2R, OUTPUT); pinMode(pinMT2L, OUTPUT);
pinMode(pinFT2, INPUT);
pinMode(pinSW1A, INPUT); pinMode(pinSW1C, INPUT); pinMode(pinSW2A, INPUT); pinMode(pinSW2C, INPUT);
// NN è NECESSARIO SETTARE COME INGRESSI QUELLI DOVE FARO LE LETTURE ANALOGICHE BASTERA DARE IL COMANDO ANALOGUE READ
pinMode(pinFT1, INPUT);
mySwitch.enableReceive(interruptAntenna);
}
void loop()
{
// se stiamo eseguendo la marcia "chiudi" o "apri" // e viene rilevato un ostacolo dalle fotocellule fermo tutto
if ( digitalRead(pinFT1)|| digitalRead(pinFT2)) Fotocellule=HIGH; // aggiorno variabile presenza ostacoli sulle fotocellule ini base allo stato del sistema
else Fotocellule=LOW;
if ( (digitalRead(pinAMP1)>CorrenteLimite)|| (digitalRead(pinAMP1)>CorrenteLimite)) CorrenteAllarme=HIGH; // aggiorno variabile corrente e confronto per vedere una presenza ostacolo else CorrenteAllarme=LOW;
// aggiorno il bit Alimentazione che mi indica se ho abilitate le alimentazzioni dei motori del cancello
Alimentazione = (digitalRead(pinENR)||digitalRead(pinENR));
// se sono abilitato a muovere e ho presenza fotocellule disabilito muovi e di conseguenza gli enable a muovere pinENR e pinENL if ( Alimentazione && muovi && (Fotocellule||CorrenteAllarme) ) muovi = false;
if (!muovi){
digitalWrite(pinENR,LOW); digitalWrite(pinENL,LOW); }
// se ho ricevuto un segnale dal telecomando o dal pulsante/contatto chiave
if ( segnale() || digitalRead(pinK1) == HIGH ){
// faccio partire la marcia finché non scade il tempo di marcia prestabilito // oppure qualcuno o qualcosa bloccano la marcia
if ( muovi && (millis() - T) < deltaT ){ Alimentazione = true ; //faccio partire la marcia prestabilita //gestione motori mia if(ScambioMarcia){ // abilito l'alimentazione nel senso di rotazione di apertura
Serial.println("pinENR ASSUMO IL VERSO DESTRO COME ROTAZIONE DI APERTURA");
digitalWrite(pinENR,HIGH); // pongo come condizione che la ROTAZIONE DESTRA SIA QUELLA PER CUI SI APRE IL CANCELLO (le connesioni dei pointi h sono invertite una rispetto all'altra) digitalWrite(pinENL,LOW);
delay(1000);
}
// funzione per ricevere il segnale dal telecomando
boolean segnale()
{
if ( mySwitch.available() ){
else return false;
}