Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SPI.h>
- #include <nRF24L01.h>
- #include <RF24.h>
- #define CE_PIN 9
- #define CSN_PIN 10
- const uint64_t pipe = 0xE8E8F0F0E1LL;
- RF24 radio(CE_PIN, CSN_PIN);
- int pack[7];
- void setup()
- {
- delay(1000);
- radio.begin();
- radio.openReadingPipe(1, pipe);
- radio.startListening();
- }
- void loop()
- {
- if (radio.available()) {
- radio.read( joystick, sizeof(joystick) );
- for(int i=0; i<7; i++) {
- Serial.println(joystick[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement