hey, danke für deine Antwort
ups, is mir garnicht aufgefallen, hier der Empfänger Code:
Code:
// Arduino Nano alias Empfänger - Version 2
#include <Servo.h>
#include <SPI.h>
#include "RF24.h"
Servo myservo; // create servo object to control a servo
//Контакты от радиомодуля NRF24L01 подключаем к пинамнам -> Arduino
//SCK -> 13//MISO -> 12//MOSI -> 11//CSN -> 10//CE -> 9
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL; // адрес канала
int msg[1];
void setup()
{
// Serial.begin(9600);
myservo.attach(3); // attaches the servo on pin 3 to the servo object
radio.begin();
radio.openReadingPipe(1,pipe); // Открываем один из 6-ти каналов приема
radio.startListening(); // Начинаем слушать эфир
}
void loop()
{
if (radio.available())
{
bool done = false;
while (!done)
{
done = radio.read(msg, 1);
myservo.write (msg[0]);
//Serial.println(msg[0]);
}
}
}
Ist der Code aber schon für zwei Joystick´s / Potis ?
Weil ja nur einmal:
const int potPin = 0
drin steht.
Ansogst leuchtet es mir ein was du geändert hast.
Schade das es kein Deutsches Tutorial gibt ......
Lesezeichen