Arnov Sharma
Published © LGPL

3D Printed Jet Turbine V2

Version 2 of My Previous 3D Printed Jet Turbine Project!

BeginnerFull instructions provided4 hours4,391
3D Printed Jet Turbine V2

Things used in this project

Story

Read more

Custom parts and enclosures

thin

Schematics

sch

TRANSMITTER

RECEIVER

SCH for basic knob x esc arduino setup-

Code

TRANSMITTER

C/C++
#include <SPI.h>
#include <RF24.h>
#include <nRF24L01.h>

#define POTX A1
#define POTY A0

RF24 radio(7, 8); // CE, CSN

const byte addresses[][6] = {"000001", "000002"};
int led_switch = LOW;

void setup() {
	pinMode(POTX, INPUT);
	pinMode(POTY, INPUT);
	Serial.begin(9600);

    radio.begin();
    radio.openWritingPipe(addresses[1]);
    radio.openReadingPipe(1, addresses[0]);
    radio.setPALevel(RF24_PA_MIN);
    radio.stopListening();
}

void loop() {
	int angle_x = map(analogRead(POTX), 0, 1023, 0, 180);
	radio.write(&angle_x, sizeof(angle_x));
	Serial.print("Angle X : ");
	Serial.println(angle_x);
	delayMicroseconds(1);
}

RECEIVER

C/C++
#include <Servo.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

#define LED 3
#define MOT1 3
#define MOT2 5
#define MOT3 6
#define MOT4 9

int speed = 75;
const byte addresses[][6] = {"000001", "000002"};
uint8_t state = LOW;
uint8_t val_x = 0x00, val_y = 0x00;
RF24 radio(7, 8);

Servo ser1, ser2, ser3, ser4;

void setup() {
	ser1.attach(MOT1);
	ser2.attach(MOT2);
	ser3.attach(MOT3);
	ser4.attach(MOT4);

    radio.begin();
    radio.openWritingPipe(addresses[0]);
    radio.openReadingPipe(1, addresses[1]);
    radio.setPALevel(RF24_PA_MIN);
	radio.startListening();
}

void loop() {
	while(radio.available()) {
		radio.read(&val_x, sizeof(val_x));
		_delay_ms(1);
		ser1.write(val_x);
		ser2.write(val_x);
		ser3.write(val_x);
		ser4.write(val_x);
	}
}

Credits

Arnov Sharma

Arnov Sharma

306 projects • 306 followers
Just your average MAKER

Comments