Fórum témák
- • Erősítő mindig és mindig
- • Sprint-Layout NYÁK-tervező
- • Kombikazán működési hiba
- • Elfogadnám, ha ingyen elvihető
- • IC-k helyettesítése
- • V-FET és SIT erősítő kapcsolások
- • Villanyszerelés
- • Alternativ HE találkozó(k)
- • Számítógép hiba, de mi a probléma?
- • Kapcsolóüzemű táp 230V-ról
- • Vitatkozzunk! / Beszéljük meg!
- • 2025 Audio Expo
- • Érdekességek
- • Torzítás
- • HESTORE.hu
- • Kapcsolási rajzot keresek
- • Elektronikai rendezvények, kiállítások
- • Elektromos távirányítós kapunyitó
- • TV hiba, mi a megoldás?
- • Westen 240 Fi gázkazán hiba
- • Klíma szervizelés, javítás
- • Szünetmentes táp építése
- • Akkumulátor töltő
- • Rádió javítás
- • Felajánlás, azaz ingyen elvihető
- • Motor fordulatszám szabályzó
- • MyElecParts alkatrészkereső és készletnyilvántartó
- • Napelem alkalmazása a lakás energia ellátásában
- • Hangsugárzó építés, javítás - miértek, hogyanok
- • DSC riasztó
- • Rendelés külföldről (eBay - Paypal)
- • Quad 405-ös erősítő tapasztalatok és hibák
- • Rádióamatőrök topikja
- • Quantum véletlenszámgenerátor
- • Lemezjátszó beállítása, javítása
- • NYÁK terv ellenőrzése
- • Mihez kezdjen manapság egy elektrotechnikai műszerész?
- • NYÁK-tervező programok
- • Villanypásztor
- • DCF77 óra
- • Crystal radio - detektoros rádió
- • Elektronikus szulfátoldó (Akku aktivátor)
- • Hangszórójavítás (otthon)
- • Skoda Octavia elektromos probléma
- • Arduino
- • Műhelyünk felszerelése, szerszámai
- • Ponthegesztő akkumulátorcellákhoz
- • Kazettás magnó (deck) javítása
- • Kávéfőzőgép hiba
- • Audiofil, High End Audio
- • LCD kijelző PC-re
- • 555-ös IC-s kapcsolások
- • DC motor/lámpa PWM szabályzása
- • LM3914
- • Mosogatógép hiba
» Több friss téma
|
A klónok CH340 Soros-USB illesztőjének drivere ( Letöltés)
Nekem gondnélkül lefordul!
Az Eszközöknél kiválasztottad az Unot?
Jogosultsági probléma lesz. Azonban közelebb visza megfejtéshez:
- Milyen arduino verzió? cc v. org + verziószám
- Oprendszer?
File - Beállítások alatt a log mutatása-t kapcsold be...
A verzió cc és azt hiszem R3. Windows XP -n futtatva. 1.6.12 verziójú a program.
Board info:
BN: Arduino/Genuino Uno
VID: 2341
PID: 0243
SN: 85534313837351302292
Próbáld egy régebbivel. Nálam jó az 1,5,7el
Szerintetek ez jó?
Arduino+PIR szenzor+GSM SIM900.
Ez működhet?
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
*
* kr1 (cleft) 2006
* released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
*
*
* The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
* (http://www.parallax.com/detail.asp?product_id=555-28027)
*
* The sensor's output pin goes to HIGH if motion is present.
* However, even if motion is present it goes to LOW from time to time,
* which might give the impression no motion is present.
* This program deals with this issue by ignoring LOW-phases shorter than a given time,
* assuming continuous motion is present during these phases.
*
*/
/////////////////////////////
//VARS
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
#include <GSM.h>
boolean PIR1=false;
boolean PIR2=false;
int calibrationTime = 30;
//the time when the sensor outputs a low impulse
long unsigned int lowIn1;
long unsigned int lowIn2;
//the amount of milliseconds the sensor has to be low
//before we assume all motion has stopped
long unsigned int pause = 100;
boolean lockLow1 = true;
boolean takeLowTime1;
boolean lockLow2 = true;
boolean takeLowTime2;
int pirPin2 = 10;
int pirPin1 = 3; //the digital pin connected to the PIR sensor's output
int ledPin = 7;
int flag1=0;
int flag2=0;
int ctr=0;
/////////////////////////////
//SETUP
void setup(){
Serial.begin(9600);
pinMode(pirPin1, INPUT);
pinMode(pirPin2, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(pirPin1, LOW);
digitalWrite(pirPin2, LOW);
//give the sensor some time to calibrate
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
//Serial connection.
Serial.begin(9600);
Serial.println("GSM Shield testing.");
}
////////////////////////////
//LOOP
void loop(){
static int relayVal = 0;
if(digitalRead(pirPin1) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow1){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow1 = false;
Serial.println("");
Serial.print(" Motion Detected PIR1 ");
delay(50);
flag1=1;
if(flag2==1)
{
ctr=ctr+1;
flag1=0;
flag2=0;
if(ctr<=0)
digitalWrite(ledPin, LOW);
if(ctr>0)
digitalWrite(ledPin, HIGH);
}
}
takeLowTime1 = true;
}
//*************8
if(digitalRead(pirPin2) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow2){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow2 = false;
Serial.println("");
Serial.print(" Motion Detected PIR2 ");
//Serial.println(flag1);
//Serial.println(flag2);
delay(50);
flag2=1;
if(flag1==1)
{
ctr=ctr-1;
flag1=0;
flag2=0;
if(ctr<=0)
digitalWrite(ledPin, LOW);
if(ctr>0)
digitalWrite(ledPin, HIGH);
}
}
takeLowTime2 = true;
}
//#####
//************
if(digitalRead(pirPin1) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime1){
lowIn1 = millis(); //save the time of the transition from high to LOW
takeLowTime1 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow1 && millis() - lowIn1 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow1 = true;
delay(50);
}
}
//#####
if(digitalRead(pirPin2) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime2){
lowIn2 = millis(); //save the time of the transition from high to LOW
takeLowTime2 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow2 && millis() - lowIn2 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow2 = true;
delay(50);
}
};
//#####
if (Serial.println("\nstatus= Motion Detected PIR1 "))
{PIR1=true;}
else if (Serial.println("\nstatus= Motion Detected PIR2 "))
{PIR2=true;}
if(PIR1=true){
(sms.SendSMS( "+381611594988", "PIR1" ));
Serial.println("\nSMS sent OK 1");
}else if (PIR2=true){
(sms.SendSMS( "+381611594988", "PIR2" ));
Serial.println("\nSMS sent OK 2");
};
};
Vagy nem jó benne valami?
Üdv.
Az érdekes , hogy előtte írtam 4-5 db olyan egyszerűbb forráskódot, amiben használtam már a delay utasítást. Azoknál nem volt semmi probléma.
Köszi. Ezzel már lefordul hibamentesen.
Szerintem ezek nem jók:
if (Serial.println("\nstatus= Motion Detected PIR1 ")) <<<<?????
...
if(PIR1=true) <<<<????
(#) |
(Felhasználó 120038) válasza Szabi1 hozzászólására (») |
Szept 26, 2016 |
 |
/ |
 |
|
Szia!
void motor_control(int my_delay)
28.{
29.
30.
31. digitalWrite(8, HIGH);
32. delayMicroseconds(my_delay);
33. delayMicroseconds(my_delay);
34. delayMicroseconds(my_delay);
35. digitalWrite(8, LOW);
36. delayMicroseconds(my_delay);
37. delayMicroseconds(my_delay);
38. delayMicroseconds(my_delay);
39.
40. lcd.setCursor(0, 1);
41. itoa(mytime, myData, 10);
42. lcd.print(myData);
43. lcd.setCursor(0, 0);
44. itoa(max_step, myData, 10);
45. lcd.print(myData);
46.}
Nem vágom a PWM-jeleket teljesen, de szerintem itt kell számolgatnod frekvenciát. Nem értem miért van 3x delay benne, ha elegendő lenne a mydelay értékét 3x-osára venni, úgy meghívni ezt a függvényt.
Van a delay-nél sokkal gyorsabb megoldás is, valaki korábban ide is belinkelte, érdekes videó!
AZ LCD kijelzés mindenképpen kiszervezném onnan, mert baromira lassítja szerintem, ezáltal ha számolsz is, nem lesz pontos!
A loopban, vagy máshonnan kellene a kiíratásokat csinálni, de azt is úgy, hogy kb minden tized másodpercben tegye.
Egyelőre ennyi, mert nincs időm, menem kell gályázni.
Említették neked a Timert, ami sokkal jobb lenne ide szerintem. (is)
Jelentkezek később! A hozzászólás módosítva: Szept 26, 2016
De miért nem?
Akkor mit kellene írni?
if (Serial.println("\nstatus= Motion Detected PIR1 "))
A Serial.println() visszaadja a kiírt byte-ok számát:
Println
Returns
size_t (long): println() returns the number of bytes written, though reading that number is optional
Az if Megvizsgálja, ha nagyobb 0-ánál? Akkor mindig igaz a feltétel!
if(PIR1=true) PIR1 legyen egyenlő 1-el! Ez is mindig igaz lesz!
Helyesen: if(PIR1 == true) PIR1 egyenlő e 1-el?
If A hozzászólás módosítva: Szept 26, 2016
Sziasztok!
Láttam gyárilag vannak lapkák ahol fogyasztók illesztését IRF 540-el oldják meg.
Nekem IRLR 024 NPBF-m van otthon jó pár.
Használhatom ezt is erre a célra?
Powerbankos működés, tehát fontos a kis vesztesé és kis hő.
Azt látom, hogy 44 helyett ez 65mΩ -os. Gondolom ez még nem akkora nagy különbség és vesztesé, de a hestore oldal szerint még pár dologban eltérnek.
ezért nem vagyok biztos benne.
Segítségeteket előre is köszönöm.
Nyugodtan használhatod azt is.
A lényeg, hogy a maximális feszültség és áramtűrését ne lépd túl...
Talán nem fogom. Nincs felfelé konvertálás feszben, és ha a Drén áram számít, akkor a 17A-t powerbakkal nem fog sikerülni
Főleg, hogy az egyes körökben max. 5-18 led lesz, hogy külön lehessen irányítani őket.
Amúgy valóban így minden nélkül a MOSFET beköthető (nem motorra, mert arra most már van egy komplett kapcsolás építve)?
Vagy tartós használat esetén (nem teszt) azért valamit még illik betenni?
Ugye nemcsak be és kikapcsolni szeretnék, hanem a PWM-el vezérelni is pl. a ledek fényerejét.
http://i.imgur.com/wHFchDt.jpg
A PWM is csak be és kikapcsolás, csak épp nagy frekvenciával...
Azt hittem, ezen már túl vagy. És barátunk százszámra ad megvalósítható kapcsolást hozzá.
Arduino controll PWM MOSFET... A hozzászólás módosítva: Szept 27, 2016
Azt tudom, hogy mi a PWM.
És igen ad is.
De mint rögtön látod:
Valamelyik esetén tesznek valamilyen ellenállást a vezérlő lábra és az arduino közé, de van, hogy a vezérlő láb a a föld közé. És van hogy semmit.
És azt viszont már nem tudom hogy mitől függ, hogy szükséges -e.
Ugye ha van egy csomó ilyen IRLR 024 NPBF-m, lletve végül is most nézem van egy darab IRF 7313, amiben 2 MOSFET van (kár, hogy nem látok olyat amiben még több lenne és irtó kicsi helyet foglalna).
Így talán ha nem rosszul nézem az adattáblát (és tényleg 6.5A-ig terhelhető és ugyanazt tudja talán), akkor egy csomó helyet tudnék spórolni a IRF 7313-mal.
Tehát a kérdés, hogy mitől függ, hogy kell -e a vezérlés elé ellenállás?
Valamelyik adatától?
IRLR 024 és akkor lehet inkább IRF 7313-ben gondolkodom. A hozzászólás módosítva: Szept 27, 2016
Ez a kérdés nem ide tartozik!
Az arduino-nak semmi köze a Te alap elektronikai tudásod, hiány pótlásához!
Légy szíves keres magadnak megfelelő fórumot!
Ne off-olj!
(#) |
sany hozzászólása |
Szept 27, 2016 |
 |
/ |
 |
|
Sziasztok!
Megint elakadtam egy forráskód lefordításánál. 
Egy IR távirányító kódjainak lekérésénél. A neten találtam a következő forráskódot:
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
Fordításnál ezt a hibát kapom:
C:\Program Files\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp:5:16: error: 'TKD2' was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to
Mi lehet a TDK2?
Üdv. Hiba a library-ban, nincs sehol definiálva a TKD2 konstans értéke. Valahová be kell írnod a progi elejére, hogy:
#define TKD2 3
Ezzel például a 3-as pin lesz a TKD2.
De itt még nem fog megállni a problémák sora, kb. 1 éve ugyanebben a topicban kapu48 kolléga már végigmagyarázta a dolog megoldását. Innentől el is olvashatod. Jó pár hozzászólás. A hozzászólás módosítva: Szept 27, 2016
Ok köszi.
Csak máskor meg, ha elhangzik, hogy arduino, akkor meg ide küldenek.
De akkor felteszem az alapban is. A hozzászólás módosítva: Szept 27, 2016
Köszi szépen!  Sikerült, azt hittem nálam van a hiba megint .
Debounce efektus millis nélkül meg oldhat másképen is?
vagyis egy led egy nyomogomb meg nyomomásakor be kapcsolva marad még egyszer megnyomás után kikapcsol ?
millis szeretném kihagyni!
Köszönöm.
Átírtam de ezt a hibaüzenetet dobja ki.
Ez miért van?
Arduino: 1.6.11 (Windows 7), Alaplap:"Arduino/Genuino Uno"
In file included from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM.h:46:0,
from C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:35:
C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h:49:125: warning: 'typedef' was ignored in this declaration
typedef enum GSM3GSMBand {UNDEFINED, EGSM_MODE, DCS_MODE, PCS_MODE, EGSM_DCS_MODE, GSM850_PCS_MODE, GSM850_EGSM_DCS_PCS_MODE};
^
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino: In function 'void loop()':
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:184:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
(sms.SendSMS( "+381611594988", "PIR1" ));
^
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:184:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:187:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
(sms.SendSMS( "+381611594988", "PIR2" ));
^
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:187:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_3'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_4'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_5'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
És itt a kijavított kód.
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
*
* kr1 (cleft) 2006
* released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
*
*
* The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
* (http://www.parallax.com/detail.asp?product_id=555-28027)
*
* The sensor's output pin goes to HIGH if motion is present.
* However, even if motion is present it goes to LOW from time to time,
* which might give the impression no motion is present.
* This program deals with this issue by ignoring LOW-phases shorter than a given time,
* assuming continuous motion is present during these phases.
*
*/
/////////////////////////////
//VARS
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
#include <GSM.h>
boolean PIR1=false;
boolean PIR2=false;
int calibrationTime = 30;
//the time when the sensor outputs a low impulse
long unsigned int lowIn1;
long unsigned int lowIn2;
//the amount of milliseconds the sensor has to be low
//before we assume all motion has stopped
long unsigned int pause = 100;
boolean lockLow1 = true;
boolean takeLowTime1;
boolean lockLow2 = true;
boolean takeLowTime2;
int pirPin2 = 10;
int pirPin1 = 3; //the digital pin connected to the PIR sensor's output
int ledPin = 7;
int flag1=0;
int flag2=0;
int ctr=0;
/////////////////////////////
//SETUP
void setup(){
Serial.begin(9600);
pinMode(pirPin1, INPUT);
pinMode(pirPin2, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(pirPin1, LOW);
digitalWrite(pirPin2, LOW);
//give the sensor some time to calibrate
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
//Serial connection.
Serial.begin(9600);
Serial.println("GSM Shield testing.");
}
////////////////////////////
//LOOP
void loop(){
static int relayVal = 0;
if(digitalRead(pirPin1) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow1){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow1 = false;
Serial.println("");
Serial.print(" Motion Detected PIR1 ");
delay(50);
flag1=1;
if(flag2==1)
{
ctr=ctr+1;
flag1=0;
flag2=0;
if(ctr<=0)
digitalWrite(ledPin, LOW);
if(ctr>0)
digitalWrite(ledPin, HIGH);
}
}
takeLowTime1 = true;
}
//*************8
if(digitalRead(pirPin2) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow2){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow2 = false;
Serial.println("");
Serial.print(" Motion Detected PIR2 ");
//Serial.println(flag1);
//Serial.println(flag2);
delay(50);
flag2=1;
if(flag1==1)
{
ctr=ctr-1;
flag1=0;
flag2=0;
if(ctr<=0)
digitalWrite(ledPin, LOW);
if(ctr>0)
digitalWrite(ledPin, HIGH);
}
}
takeLowTime2 = true;
}
//#####
//************
if(digitalRead(pirPin1) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime1){
lowIn1 = millis(); //save the time of the transition from high to LOW
takeLowTime1 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow1 && millis() - lowIn1 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow1 = true;
delay(50);
}
}
//#####
if(digitalRead(pirPin2) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime2){
lowIn2 = millis(); //save the time of the transition from high to LOW
takeLowTime2 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow2 && millis() - lowIn2 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow2 = true;
delay(50);
}
};
//#####
if (Serial.println("\nstatus= Motion Detected PIR1 "))
{PIR1 == true;}
else if (Serial.println("\nstatus= Motion Detected PIR2 "))
{PIR2 == true;}
if(PIR1 == true){
(sms.SendSMS( "+381611594988", "PIR1" ));
Serial.println("\nSMS sent OK 1");
}else if (PIR2 == true){
(sms.SendSMS( "+381611594988", "PIR2" ));
Serial.println("\nSMS sent OK 2");
};
};
A 105, és a 107 sorban is szerepel egy-egy if utasítás, ahol nincsen kapcsos zárójelbe téve az utasítás, amit tennie kellene. Ugyanígy a 132 és 134 sor is.
Köszi.
Kijavítottam de még mindig valami nem jó neki, mi lehet az?
Ez a hibakód:
Arduino: 1.6.11 (Windows 7), Alaplap:"Arduino/Genuino Uno"
In file included from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM.h:46:0,
from C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:35:
C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h:49:125: warning: 'typedef' was ignored in this declaration
typedef enum GSM3GSMBand {UNDEFINED, EGSM_MODE, DCS_MODE, PCS_MODE, EGSM_DCS_MODE, GSM850_PCS_MODE, GSM850_EGSM_DCS_PCS_MODE};
^
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino: In function 'void loop()':
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:188:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
(sms.SendSMS( "+381611594988", "PIR1" ));
^
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:188:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:191:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
(sms.SendSMS( "+381611594988", "PIR2" ));
^
C:\Users\H.Zsolt\Desktop\Tal_n_j__kett__pir_sms\Tal_n_j__kett__pir_sms.ino:191:44: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp: In constructor 'GSM3MobileMockupProvider::GSM3MobileMockupProvider()':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp:44:12: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
msgExample="Hello#World";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp: In member function 'int GSM3MobileMockupProvider::connectTCPServer(int, char*, int*)':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp:183:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
strcpy("192.168.1.1", localIP);
^
In file included from C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:34:0:
C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h:49:125: warning: 'typedef' was ignored in this declaration
typedef enum GSM3GSMBand {UNDEFINED, EGSM_MODE, DCS_MODE, PCS_MODE, EGSM_DCS_MODE, GSM850_PCS_MODE, GSM850_EGSM_DCS_PCS_MODE};
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp: In constructor 'GSM3ShieldV1BandManagement::GSM3ShieldV1BandManagement(bool)':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:38:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[UNDEFINED]="";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:39:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[EGSM_MODE]="\"EGSM_MODE\"";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:40:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[DCS_MODE]="\"DCS_MODE\"";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:41:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[PCS_MODE]="\"PCS_MODE\"";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:42:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[EGSM_DCS_MODE]="\"EGSM_DCS_MODE\"";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:43:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[GSM850_PCS_MODE]="\"GSM850_PCS_MODE\"";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:44:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
quectelStrings[GSM850_EGSM_DCS_PCS_MODE]="\"GSM850_EGSM_DCS_PCS_MODE\"";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ModemCore.cpp:39:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
char* __ok__="OK";
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ModemVerification.cpp: In member function 'String GSM3ShieldV1ModemVerification::getIMEI()':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ModemVerification.cpp:64:20: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
String number(NULL);
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1SMSProvider.cpp: In member function 'void GSM3ShieldV1SMSProvider::beginSMSContinue()':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1SMSProvider.cpp:68:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
if(theGSM3ShieldV1ModemCore.genericParse_rsp(resp, ">"))
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp: In member function 'String GSM3ShieldV1ScanNetworks::getCurrentCarrier()':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp:66:21: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
return String(NULL);
^
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp: In member function 'String GSM3ShieldV1ScanNetworks::getSignalStrength()':
C:\Program Files (x86)\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp:85:21: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
return String(NULL);
^
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_3'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_4'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_5'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Ez pedig a kijavított programkód:
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
*
* kr1 (cleft) 2006
* released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
*
*
* The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
* (http://www.parallax.com/detail.asp?product_id=555-28027)
*
* The sensor's output pin goes to HIGH if motion is present.
* However, even if motion is present it goes to LOW from time to time,
* which might give the impression no motion is present.
* This program deals with this issue by ignoring LOW-phases shorter than a given time,
* assuming continuous motion is present during these phases.
*
*/
/////////////////////////////
//VARS
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
#include <GSM.h>
boolean PIR1=false;
boolean PIR2=false;
int calibrationTime = 30;
//the time when the sensor outputs a low impulse
long unsigned int lowIn1;
long unsigned int lowIn2;
//the amount of milliseconds the sensor has to be low
//before we assume all motion has stopped
long unsigned int pause = 100;
boolean lockLow1 = true;
boolean takeLowTime1;
boolean lockLow2 = true;
boolean takeLowTime2;
int pirPin2 = 10;
int pirPin1 = 3; //the digital pin connected to the PIR sensor's output
int ledPin = 7;
int flag1=0;
int flag2=0;
int ctr=0;
/////////////////////////////
//SETUP
void setup(){
Serial.begin(9600);
pinMode(pirPin1, INPUT);
pinMode(pirPin2, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(pirPin1, LOW);
digitalWrite(pirPin2, LOW);
//give the sensor some time to calibrate
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
//Serial connection.
Serial.begin(9600);
Serial.println("GSM Shield testing.");
}
////////////////////////////
//LOOP
void loop(){
static int relayVal = 0;
if(digitalRead(pirPin1) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow1){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow1 = false;
Serial.println("");
Serial.print(" Motion Detected PIR1 ");
delay(50);
flag1=1;
if(flag2==1)
{
ctr=ctr+1;
flag1=0;
flag2=0;
if(ctr<=0)
{digitalWrite(ledPin, LOW);
}
if(ctr>0){
digitalWrite(ledPin, HIGH);
}
}
}
takeLowTime1 = true;
}
//*************8
if(digitalRead(pirPin2) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow2){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow2 = false;
Serial.println("");
Serial.print(" Motion Detected PIR2 ");
//Serial.println(flag1);
//Serial.println(flag2);
delay(50);
flag2=1;
if(flag1==1)
{
ctr=ctr-1;
flag1=0;
flag2=0;
if(ctr<=0)
{digitalWrite(ledPin, LOW);
}
if(ctr>0)
{digitalWrite(ledPin, HIGH);
}
}
}
takeLowTime2 = true;
}
//#####
//************
if(digitalRead(pirPin1) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime1){
lowIn1 = millis(); //save the time of the transition from high to LOW
takeLowTime1 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow1 && millis() - lowIn1 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow1 = true;
delay(50);
}
}
//#####
if(digitalRead(pirPin2) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime2){
lowIn2 = millis(); //save the time of the transition from high to LOW
takeLowTime2 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow2 && millis() - lowIn2 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow2 = true;
delay(50);
}
};
//#####
if (Serial.println("\nstatus= Motion Detected PIR1 "))
{PIR1 == true;}
else if (Serial.println("\nstatus= Motion Detected PIR2 "))
{PIR2 == true;}
if(PIR1 == true){
(sms.SendSMS( "+381611594988", "PIR1" ));
Serial.println("\nSMS sent OK 1");
}else if (PIR2 == true){
(sms.SendSMS( "+381611594988", "PIR2" ));
Serial.println("\nSMS sent OK 2");
};
};
Üdv.
Remélem, ékezetes betűket nem használsz a névadásnál? Az elérési útban mi az a sok aláhúzás jel?
Kb. 6 hozzászólással ezelőtt vizor felhívta a figyelmet hasonló hibakeresésre, olvas vissza!
A más hibájából is lehet tanulni!
Már írtam, hogy a 182, 184 soroknak abban a formában semmi értelmük nincsen!
Javítani kellene!
Mivel mi nem tudunk elnavigálni a Te gépeden levő jelzett hibához:
C:\Program Files(x86)\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h :49. sor, 125. karakterhez!
Így fogalmunk sincs, mi lehet a hiba?
A hozzászólás módosítva: Szept 28, 2016
Kijavítottam.
De most se jó.
Miért?
Hibakód:
Arduino: 1.6.11 (Windows 7), Alaplap:"Arduino/Genuino Uno"
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_3'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_4'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\GSM\GSM3SoftSerial.cpp.o (symbol from plugin): In function `GSM3SoftSerial::spaceAvailable()':
(.text+0x0): multiple definition of `__vector_5'
libraries\SoftwareSerial\SoftwareSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here
C:\Users\H701E~1.ZSO\AppData\Local\Temp\ccup0Sri.ltrans1.ltrans.o: In function `main':
ccup0Sri.ltrans1.o .text.startup+0x2de): undefined reference to `SMSGSM::SendSMS(char*, char*)'
ccup0Sri.ltrans1.o:(.text.startup+0x300): undefined reference to `SMSGSM::SendSMS(char*, char*)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Programkód:
/*
* //////////////////////////////////////////////////
* //making sense of the Parallax PIR sensor's output
* //////////////////////////////////////////////////
*
* Switches a LED according to the state of the sensors output pin.
* Determines the beginning and end of continuous motion sequences.
*
* @author: Kristian Gohlke / krigoo (_) gmail (_) com / http://krx.at
* @date: 3. September 2006
*
* kr1 (cleft) 2006
* released under a creative commons "Attribution-NonCommercial-ShareAlike 2.0" license
*
*
* The Parallax PIR Sensor is an easy to use digital infrared motion sensor module.
* (http://www.parallax.com/detail.asp?product_id=555-28027)
*
* The sensor's output pin goes to HIGH if motion is present.
* However, even if motion is present it goes to LOW from time to time,
* which might give the impression no motion is present.
* This program deals with this issue by ignoring LOW-phases shorter than a given time,
* assuming continuous motion is present during these phases.
*
*/
/////////////////////////////
//VARS
//the time we give the sensor to calibrate (10-60 secs according to the datasheet)
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
#include <GSM.h>
boolean PIR1=false;
boolean PIR2=false;
int calibrationTime = 30;
//the time when the sensor outputs a low impulse
long unsigned int lowIn1;
long unsigned int lowIn2;
//the amount of milliseconds the sensor has to be low
//before we assume all motion has stopped
long unsigned int pause = 100;
boolean lockLow1 = true;
boolean takeLowTime1;
boolean lockLow2 = true;
boolean takeLowTime2;
int pirPin2 = 10;
int pirPin1 = 3; //the digital pin connected to the PIR sensor's output
int ledPin = 7;
int flag1=0;
int flag2=0;
int ctr=0;
/////////////////////////////
//SETUP
void setup(){
Serial.begin(9600);
pinMode(pirPin1, INPUT);
pinMode(pirPin2, INPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(pirPin1, LOW);
digitalWrite(pirPin2, LOW);
//give the sensor some time to calibrate
Serial.print("calibrating sensor ");
for(int i = 0; i < calibrationTime; i++){
Serial.print(".");
delay(1000);
}
Serial.println(" done");
Serial.println("SENSOR ACTIVE");
delay(50);
//Serial connection.
Serial.begin(9600);
Serial.println("GSM Shield testing.");
}
////////////////////////////
//LOOP
void loop(){
static int relayVal = 0;
if(digitalRead(pirPin1) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow1){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow1 = false;
Serial.println("");
Serial.print(" 1 ");
delay(50);
flag1=1;
if(flag2==1)
{
ctr=ctr+1;
flag1=0;
flag2=0;
if(ctr<=0)
{digitalWrite(ledPin, LOW);
}
if(ctr>0){
digitalWrite(ledPin, HIGH);
}
}
}
takeLowTime1 = true;
}
//*************8
if(digitalRead(pirPin2) == HIGH){
//the led visualizes the sensors output pin state
if(lockLow2){
//makes sure we wait for a transition to LOW before any further output is made:
lockLow2 = false;
Serial.println("");
Serial.print(" 3 ");
//Serial.println(flag1);
//Serial.println(flag2);
delay(50);
flag2=1;
if(flag1==1)
{
ctr=ctr-1;
flag1=0;
flag2=0;
if(ctr<=0)
{digitalWrite(ledPin, LOW);
}
if(ctr>0)
{digitalWrite(ledPin, HIGH);
}
}
}
takeLowTime2 = true;
}
//#####
//************
if(digitalRead(pirPin1) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime1){
lowIn1 = millis(); //save the time of the transition from high to LOW
takeLowTime1 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow1 && millis() - lowIn1 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow1 = true;
delay(50);
}
}
//#####
if(digitalRead(pirPin2) == LOW){
//digitalWrite(ledPin, LOW); //the led visualizes the sensors output pin state
if(takeLowTime2){
lowIn2 = millis(); //save the time of the transition from high to LOW
takeLowTime2 = false; //make sure this is only done at the start of a LOW phase
}
//if the sensor is low for more than the given pause,
//we assume that no more motion is going to happen
if(!lockLow2 && millis() - lowIn2 > pause){
//makes sure this block of code is only executed again after
//a new motion sequence has been detected
lockLow2 = true;
delay(50);
}
};
//#####
if (Serial.available() < 2){
(sms.SendSMS( "+381611594988", "PIR1" ));
Serial.println("\nSMS sent OK 1");
} else if (Serial.available() > 2){
(sms.SendSMS( "+381611594988", "PIR2" ));
Serial.println("\nSMS sent OK 2");
};
};
A hozzászólás módosítva: Szept 28, 2016
Ha a library-ban ennyi hiba jön ki, akkor el kell gondolkodni a fordítóprogram verzióváltásán. Nálam az Arduino IDE 1.6.3. stabilan működik. Belinkelhetnéd, hogy honnan töltötted le a library-kat amiket használsz, ha nem a beépítetteket, hogy kipróbálhassuk.
Igazán el olvashatnád a hibajelzést, mielőtt ide másolod!
Hiszen írja, hogy 3 helyen is van definiálva a : …::spaceAvailable() függvény!
És ennek a megszüntetését már kitárgyaltuk az előzőleg említett helyeken!
De a mi az a spaceAvailable()
Nem tudom azt hol kell megoldani.
itt vannak a könyvtárak:
|
|