need help with this code

I wish to operate a servo via NRF24l01 and Arduino Uno with a potentiometer via another NRF24l01 and Arduino Uno.
I found a code that should work on Make.Robimek.com, but there are some things about it that will not compile to my sketch. I am an utter noob with this, so your help is needed if I am to get this to work. Below is the transmit and receive codes. If someone could point out the problems and assist me in correcting them I would be grateful. I do realize that some of it is in Turkish but I don’t know how to fix it.

Transmitter Software:

#include <SPI.h>
#include <nRF24L01p.h>
nRF24L01p verici(7,8);
/* CSN - > 7, CE -> 8 olarak belirlendi */
 
int pot=A0;
int val;
char pos;
 
void setup() {
Serial.begin(9600);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
/* SPI başlatıldı */
verici.channel(90);
verici.TXaddress("kontrol");
verici.init();
/* Verici ayarları yapıldı */
}
void loop() {
val = analogRead(pot); /* pot değeri okuma */
pos= map(val,0,1023,0,180);/* servo açısına çevirme */
Serial.print("Servo = ");
Serial.print(pos);
Serial.println(" derece");/* Açı bilgileri ekrana yazdırıldı */
 
verici.txPL(pos);
boolean gondermedurumu = verici.send(FAST);
/* açı bilgisi nRF24L01'e aktarıldı */
/* Eğer gönderim başarısız olursa göndermedurumu'nun değeri false olacaktır */
if(gondermedurumu==true){
Serial.println("mesaji gonderildi");
}else{
Serial.println("mesaji gonderilemedi");
}
 
delay(1000); 
}


Receiver Software:

#include <SPI.h>
#include <nRF24L01p.h>
#include <Servo.h>
nRF24L01p alici(7,8);
/* CSN - > 7, CE -> 8 olarak belirlendi */
Servo servo1;
void setup(){
Serial.begin(9600);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
/* SPI başlatıldı */
alici.channel(90);
alici.RXaddress("kontrol");
alici.init();
/* Alıcı ayarları yapıldı */
servo1.attach(9);
}

char deger;

void loop(){
while(alici.available()){
/* Modülden veri geldiği sürece while devam edecek */
alici.read();
alici.rxPL(deger);

servo1.write(deger);
}
}

Welcome to the Forum. Please read the two posts at the top of this Forum by Nick Gammon on guidelines for posting here, especially the use of code tags which make the code looklike thiswhen posting source code files. Also, before posting the code, use Ctrl-T in the IDE to reformat the code in a standard format, which makes it easier for us to read.

If you have already posted without using code tags, open your message and select “modify” from the pull down menu labelled, “More”, at the lower left corner of the message. Highlight your code by selecting it (it turns blue), and then click on the “</>” icon at the upper left hand corner. Click on the “Save” button.

Thanks aarg. I have now modified the post and hoping for some assistance. Thanks!

#include &amp;lt;SPI.h&amp;gt;

&lt; is html for <
&gt ishtml for >

You will need to go through the code and change those strings for the proper characters.

If there are still problems, post the code correctly, with the error messages EXACTLY as output by the compiler.

Hello PaulS here is the corrected code.
The error message says: ERROR COMPILING and is at the 8 in line 4.
Should I remove the "olarak belirlendi*/

#include <SPI.h>
#include <nRF24L01p.h>
nRF24L01p verici(7,8);
/* CSN - > 7, CE → 8, olarak belirlendi */

int pot=A0;
int val;
char pos;

void setup() {
Serial.begin(9600);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
/* SPI başlatıldı /
verici.channel(90);
verici.TXaddress(“kontrol”);
verici.init();
/
Verici ayarları yapıldı /
}
void loop() {
val = analogRead(pot); /
pot değeri okuma /
pos= map(val,0,1023,0,180);/
servo açısına çevirme /
Serial.print(“Servo = “);
Serial.print(pos);
Serial.println(” derece”);/
Açı bilgileri ekrana yazdırıldı */

verici.txPL(pos);
boolean gondermedurumu = verici.send(FAST);
/* açı bilgisi nRF24L01’e aktarıldı /
/
Eğer gönderim başarısız olursa göndermedurumu’nun değeri false olacaktır */
if(gondermedurumu==true){
Serial.println(“mesaji gonderildi”);
}else{
Serial.println(“mesaji gonderilemedi”);
}

delay(1000);
}

That's not corrected. You still have the & stuff in there. Go look at some other exmple of aruino code and see what an include is supposed to look like.

You also neglected to use code tags again...

The only errors I get when I try to compile your code relate to the fact that I don't have the nRF24L01p library. Where did you get that library?

Really sorry I at first didn’t understand about changing to < or >. I think I got that part now. Also apologize for not using code tags. I will be more diligent in future.
I got the library from Github and its called Maniacbug, but it doesn’t seem that the compiler is accessing the library. Am I supposed to insert part of it into the Uno somehow first?

It needs to be placed in the libraries folder in your sketch folder. Do a little investigation on Google. Using libraries with Arduino isn't some arcane secret.

Thank you for all the pointers.

I have tried to include the .zip file but it keeps returning the error "specified folder/zip does not contain a valid library". I researched Wordpress, the Arduino site here, googled it, etc. I don't exactly know what I'm looking for. I click on sketch and attempt to include a library and go over to the .zip file I downloaded from Maniacbug, but I must be doing something wrong.

You have to extract the zip file.

Reminds me of a story. Long ago the Americans were studying bird strikes on airplanes so they built a chicken gun. It did just what it sounds like. It fired chickens with high pressure air into the windshields of airplanes to study the effects and whether the windshield could take the strike as bird strikes was (and still is) a major cause of damage to airplanes. Later, the Brits wanted to borrow the gun to test some of their airplanes. But you can't fire just any chicken, they had to be exactly the right size and weight to fit the gun. So in addition to the chicken gun, the Americans also sent over a bunch of frozen chickens of the right "caliber" for the Brits to use. The Brits sent a letter back to the Americans saying that they were terribly confused because their windscreens (that's what they call a windshield) wasn't holding up nearly as well as the Americans had reported and the chickens were doing all sorts of major damage. The legend goes that the Americans replied in a short letter with a single sentence.

"Sir, you have to thaw the chickens."

i'm from indonesia

Good day , I need a solution to make the phase difference detection device ( chosphi meters ) I was confused to make a difference angle detection program zerro crosing output of the detector . Other words I want to make proogram to calculate the length of time that a logic 1 ( HIGH ) when the phase difference . Thank you. e-mail me rizqi.wigapala@gmail.com

rizqi_wp:
i’m from indonesia

Good day , I need a solution to make the phase difference detection device ( chosphi meters )
I was confused to make a difference angle detection program zerro crosing output of the detector .
Other words I want to make proogram to calculate the length of time that a logic 1 ( HIGH ) when the phase difference .
Thank you.
e-mail me
rizqi.wigapala@gmail.com

@rizqi_wp, you are hijacking Guitartexan’s thread. This is a no-no. (And made worse by the fact that your topic is totally unrelated to the topic of this thread.)
Very bad manners.

Start your own thread please!
Don’t expect people to email you with solutions either.

well, now that I’ve thawed out the chickens, I still have a few questions about the gun and how to load it :~l

I’ve downloaded and included the library “RF24” and installed it in the libraries without an error flag. I put in the sketch and it begins to compiles and then gives several errors like 'class RF 24 has no member named ‘getchannel’ and others as shown below.
I researched the library and there is a “getchannel” listed in the classes section referring to getting the currently configured RF channel.
Question: how do I find the correct terms to use in this code? How do I find the currently configured RF channel?

your patience and assistance is much appreciated.

Arduino: 1.6.6 (Windows 7), Board: “Arduino Nano, ATmega328”

C:\Users\Tia\AppData\Local\Temp\arduino_6071d66aeb1df6647d589d3208cdcd3f\sketch_nov13b.ino: In function ‘void setup()’:

sketch_nov13b:12: error: ‘class RF24’ has no member named ‘getchannel’

alici.getchannel(90);

^

sketch_nov13b:13: error: ‘class RF24’ has no member named ‘RXaddress’

alici.RXaddress(“control”);

^

sketch_nov13b:14: error: ‘class RF24’ has no member named ‘init’

alici.init();

^

C:\Users\Tia\AppData\Local\Temp\arduino_6071d66aeb1df6647d589d3208cdcd3f\sketch_nov13b.ino: In function ‘void loop()’:

sketch_nov13b:24: error: no matching function for call to ‘RF24::read()’

alici.read();

^

C:\Users\Tia\AppData\Local\Temp\arduino_6071d66aeb1df6647d589d3208cdcd3f\sketch_nov13b.ino:24:16: note: candidate is:

In file included from C:\Users\Tia\AppData\Local\Temp\arduino_6071d66aeb1df6647d589d3208cdcd3f\sketch_nov13b.ino:2:0:

C:\Users\Tia\Documents\Arduino\libraries\RF24/RF24.h:304:8: note: bool RF24::read(void*, uint8_t)

bool read( void* buf, uint8_t len );

^

C:\Users\Tia\Documents\Arduino\libraries\RF24/RF24.h:304:8: note: candidate expects 2 arguments, 0 provided

sketch_nov13b:25: error: ‘class RF24’ has no member named ‘rxPL’

alici.rxPL(deger);

^

exit status 1
‘class RF24’ has no member named ‘getchannel’

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.

#include <SPI.h>
#include <RF24.h>
#include <Servo.h>
RF24 alici(7,8);
/* CSN - > 7, CE -> 8 olarak belirlendi */
Servo servo1;
void setup(){
Serial.begin(9600);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
/* SPI başlatıldı */
alici.getchannel(90);
alici.RXaddress("kontrol");
alici.init();
/* Alıcı ayarları yapıldı */
servo1.attach(9);
}

char deger;

void loop(){
while(alici.available()){
/* Modülden veri geldiği sürece while devam edecek */
alici.read();
alici.rxPL(deger);

servo1.write(deger);
}
}

Can you give us a link to the RF24 library you're using?

Hello again Delta_G

Here is that link: http://tmrh20.github.io/RF24/index.html

I know what the problem is but not how to solve it. I've taken the code from Make.robimek.com LINK:http://make.robimek.com/arduino-using-nrf24l01-rf-module/

and I'm using this github library. The two are not sourced from the same, so I need to modify the Robimek code to work with this (or another) RF library. I do not know enough to do that at present, although I am trying hard.

Not very nice of them not to include a link to the library they were using in that demo was it?

I found the "RF24" library, but it doesn't have all of the methods called in your code. It might be a different version to the one you're using. Do you have a link to the library that you installed? (It looks like you're reading the same documentation that I am, but your function calls don't match the library at all.)

In the one that I found, there's no 'getchannel()', but there is a 'getChannel()'. (Maybe just a typo on this one.)

There are no RXaddress() or init() at all, there is a 'read', but it's not 'read()', it's 'read(void *buf, uint8_t len)', there's no rxPL(), etc.

That's his problem. He's got demo code from one website that uses one library and a library from somewhere else. And the site where he got the demo code doesn't have a link to the library it uses.