Aurdiuno da KEY kodu sorunu

Katılım
7 Haz 2021
Mesajlar
8
Puanları
1
Yaş
24
Öncelikle herkeze merhaba ben Aurdiuno ya yeni başlıyorum ve bi sıkıntım var wirales alıcısı ve servo motorla beraber bi sistem yaptım lakin kodlamada iyi olmadığım için bi sıkıntı çıktı kodu ve hatayı belirttim . Ne yapıcağımı bilmiyorum yardım ederseniz sevnirim : >
bu kodu aldığım kanal :

HATA KODUDA BU

C:\Users\bedredtin\Desktop\uzaktan kmanda\sketch_jun07c\sketch_jun07c.ino: In function 'void loop()':
sketch_jun07c:45:52: error: void value not ignored as it ought to be
done = radio.read( verilerim, sizeof(verilerim));
^
sketch_jun07c:47:21: error: request for member 'verilerim' in 'map', which is of non-class type 'long int(long int, long int, long int, long int, long int)'
servodegeri=map.verilerim[0],0,1023,0,179
^~~~~~~~~
sketch_jun07c:53:18: error: no matching function for call to 'HardwareSerial::print()'
Serial.print();
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:233,
from sketch\sketch_jun07c.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
size_t print(const __FlashStringHelper *);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:65:12: note: candidate expects 1 argument, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
size_t print(const String &);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:66:12: note: candidate expects 1 argument, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
size_t print(const char[]);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:67:12: note: candidate expects 1 argument, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
size_t print(char);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:68:12: note: candidate expects 1 argument, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
size_t print(unsigned char, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: candidate expects 2 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
size_t print(int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: candidate expects 2 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
size_t print(unsigned int, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: candidate expects 2 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
size_t print(long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: candidate expects 2 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
size_t print(unsigned long, int = DEC);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: candidate expects 2 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
size_t print(double, int = 2);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:74:12: note: candidate expects 2 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
size_t print(const Printable&);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:75:12: note: candidate expects 1 argument, 0 provided
sketch_jun07c:67:3: error: expected '}' before 'else'
else
^~~~
exit status 1
void value not ignored as it ought to be









Kod:
#define KEY1 0
#define KEY2 0

#include <Servo.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

#define CE_PIN  9
#define CSN_PIN 8

const uint64_t pipe =0xE8E8F0F0E1LL;

RF24 radio(CE_PIN, CSN_PIN);

int verilerim [] = {KEY1 , KEY2};
int servodegeri, leddegeri;
Servo servoNesnesi;
int Led=2;

void setup() {
 Serial.begin(57600);
 delay (1000);

 pinMode(Led, OUTPUT);
 servoNesnesi.attach(10);

 Serial.println("Nrf24L01 Alıcı Başlatılıyor");
 radio.begin();
 radio.openReadingPipe(1, pipe);
 radio.startListening();
 
 
  // put your setup code here, to run once:

}

void loop() {
  if ( radio.available() )
 
  {
    bool done = false;
    while (!done)
    {
    done = radio.read( verilerim, sizeof(verilerim));
    digitalWrite(Led,LOW);
    servodegeri=map.verilerim[0],0,1023,0,179
    leddegeri=map(verilerim[1],0,1023,0,255);
    Serial.print("KEY1 = ");
    Serial.print(servodegeri);
    Serial.print("  Key2 = ");
    Serial.print(leddegeri);
    Serial.print();

        servoNesnesi.write(servodegeri);

        if ((leddegeri > 130) || (leddegeri <120))
        {
          digitalWrite(Led, HIGH);
        }
        else
        {
          digitalWrite(Led, LOW);
        }
  }

  else
  {
    Serial.println("Verici Bulunmadı");
 
  verilerim[0] = 0;
  verilerim[1] = 0;

  servoNesnesi.write(90);
  digitalWrite(Led,LOW);
}
 
  // put your main code here, to run repeatedly:

}
 
Son düzenleme:
Tanımsız değişkenler var. tanımlamanız gerek.
 
Tanımsız değişkenler var. tanımlamanız gerek.
yardımızın için teşekkürler birkaç düzeltme yaptım fakat galiba son hata olarak
done = radio.read( verilerim, sizeof(verilerim)); kısmında bi hata var ordaki hatayı bi türlü bulamadım tekrardan yardım ederseniz çok sevinirim
hata mesajı olarakda
void value not ignored as it ought to be
bunu veriyor
 
Son düzenleme:

Yeni mesajlar

Forum istatistikleri

Konular
128,158
Mesajlar
915,525
Kullanıcılar
449,904
Son üye
teknikbilimlers31

Yeni konular

Çevrimiçi üyeler

Geri
Üst