Hello all! Please help.
I reinstall arduino and Visual Micro for Visual studio 2013 and now can't compile project:
#include <C:/Arduino/IRremote/IRremote.h>
// use the library
#define TMP20 7
#define TMP10 6
#define TMP0 5
#define IR_RECEIVER_PIN 11
IRrecv irrecv(IR_RECEIVER_PIN); // create instance of irrecv
decode_results results;
int res;
int cicles = 0;
int lastRes;
int maxCicles = 350;
int minCicles = 50;
int skipEntranceCount = 0;
int lastResForCheck = 0;
int idleCiclesCount = 0;
void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
digitalWrite(8, HIGH);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
irrecv.enableIRIn();
}
void loop() {
if (cicles < maxCicles) {
cicles++;
}
if (irrecv.decode(&results)) // have we received an IR signal?
{
idleCiclesCount = 0;
if (results.value != 4294967295) {
res = results.value;
if (2672 == res || 752 == res || 2800 == res) {
if (res != lastRes || cicles >= maxCicles) {
Serial.println(res);
cicles = 0;
}
}
else if (824 == res || 2872 == res) {
if (res != lastRes || cicles >= maxCicles) {
Serial.println(res);
cicles = 0;
}
}
else if (720 == res || 3280 == res) {
if (res != lastRes || cicles >= maxCicles) {
skipEntranceCount++;
Serial.println(res);
cicles = 0;
}
else if (res == lastRes && skipEntranceCount > 1) {
Serial.println(res);
cicles = 0;
}
}
else if (1168 == res || 3216 == res) {
if (res != lastRes || cicles >= maxCicles) {
skipEntranceCount++;
Serial.println(res);
cicles = 0;
}
else if (res == lastRes && skipEntranceCount > 1) {
Serial.println(res);
cicles = 0;
}
}
else {
Serial.println(res);
cicles = 0;
}
lastRes = res;
}
irrecv.resume();// receive the next value
}
else {
if (skipEntranceCount != 0) {
idleCiclesCount++;
}
if (idleCiclesCount > minCicles) {
skipEntranceCount = 0;
idleCiclesCount = 0;
}
}
delay(1);
}
Output from Visual Micro:
Compiling 'new' for 'Arduino Uno'
Build folder:
file:///C:/Users/Денис/AppData/Local/V.Micro/Arduino/Builds/new/uno Summary: Header=1 Prototypes=3 Imports=1
Additional Defines:
Architecture Tools: C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/
Sketchbook: file:///C:/Users/Денис/Documents/Arduino
Core Include Paths
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard'
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=164 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\new\uno\new.cpp" -o "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\new\uno\new.cpp.o"
Build Core Paths: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\new\uno/new.elf" "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\new\uno\new.cpp.o" "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\new\uno/core.a" "-LC:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\new\uno" -lm
new.cpp.o:In function `setup'
new.ino:enableIRIn()'
new.cpp.o:In function `loop'
new.ino:decode(decode_results*)'
new.ino:resume()'
new.cpp.o:In function `__static_initialization_and_destruction_0'
new.ino:IRrecv(int)'
collect2.exe*:error: ld returned 1 exit status
Error creating .elf
Compiling 'we' for 'Arduino Uno'
Build folder:
file:///C:/Users/Денис/AppData/Local/V.Micro/Arduino/Builds/we/uno Summary: Header=1 Prototypes=3 Imports=1
Additional Defines:
Architecture Tools: C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/
Sketchbook: file:///C:/Users/Денис/Documents/Arduino
Core Include Paths
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard'
All import libraries will be re-compiled
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=164 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\we\uno\we.cpp" -o "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\we\uno\we.cpp.o"
Build Core Paths: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\we\uno/we.elf" "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\we\uno\we.cpp.o" "C:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\we\uno/core.a" "-LC:\Users\Денис\AppData\Local\V.Micro\Arduino\Builds\we\uno" -lm
we.cpp.o:In function `setup'
we.ino:enableIRIn()'
we.cpp.o:In function `loop'
we.ino:decode(decode_results*)'
we.ino:resume()'
we.cpp.o:In function `__static_initialization_and_destruction_0'
we.ino:IRrecv(int)'
collect2.exe*:error: ld returned 1 exit status
Error creating .elf
Thank everybody in advance!