Moin Leute!
Beim Versuchen den Code auf meinen Arduino Uno hochzuladen bekomme ich folgende Fehlermelung:Arduino: 1.8.3 (Windows 10), Board: "Arduino/Genuino Uno"
Mark_sende_rund_empf_nger:6: error: expected initializer before numeric constant
int SE_PIN 12;
error: 'vw_set_ptt_inverted' was not declared in this scope
vw_set_ptt_inverted(true);
^
error: 'vw_setup' was not declared in this scope
vw_setup(2000);
^
17: error: 'SE_PIN' was not declared in this scope
vw_set_tx_pin(SE_PIN);
^
17: error: 'vw_set_tx_pin' was not declared in this scope
vw_set_tx_pin(SE_PIN);
^
In function 'void loop()':
Mark_sende_rund_empf_nger:31: error: invalid operands of types 'const char [13]' and 'float' to binary 'operator+'
const char *temp = "Temperatur: " + t + " C";
^
'vw_send' was not declared in this scope
vw_send((uint8_t *)temp,strlen(temp));
^
: error: 'vw_wait_tx' was not declared in this scope
vw_wait_tx();
^
exit status 1
expected initializer before numeric constant
Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.´
#include "DHT.h"
#define DHTPIN 4
#define DHTTYPE DHT22 //type DHT22
int SE_PIN 12;
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
Serial.println("DHT22 - Test!");
vw_set_ptt_inverted(true);
vw_setup(2000);
vw_set_tx_pin(SE_PIN);
dht.begin();
}
void loop() {
float t = dht.readTemperature(); //Temperatur auslesen
Serial.print("Temperatur: ");
Serial.print(t);
Serial.println(" C");
const char *temp = "Temperatur: " + t + " C";
vw_send((uint8_t *)temp,strlen(temp));
vw_wait_tx();
delay(200);
}
}