MisterBotBreak
Published

How to Make a Hovercraft #2

This project will show you how to create a Hovercraft.

BeginnerFull instructions provided5 hours2,672
How to Make a Hovercraft #2

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Arduino Nano shield
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Brushless motor + ESC
×2
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
LiPo Battery
×1
XT60 to T plug
×1
XT60 connectors
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

air_tube_extender_dN1tPogA4I.stl

direction_plate_(middle)_Gi6b4ykByN.stl

direction_plate_(sides)_YKevqgj4Rz.stl

direction_plate_support_mbmSo0tQXR.stl

direction_transmittion_stick_E58qTvSQKy.stl

general_support_mxA8rYOird.stl

microcontroller_support_WETkeEEbLW.stl

propeller_for_lifting_omN3JqdbQg.stl

servo_direction_attach_S4OX2TV2Io.stl

thrust_motor_support_USQH8xZCVf.stl

thrust_propeller_chamber_W0qeXLerDR.stl

Code

Hovercraft #2

Arduino
#include "I2Cdev.h"  
#include "MPU6050.h"
#include "math.h"
#include <Servo.h>
#include <SPI.h>                                                
#include <nRF24L01.h>
#include <RF24.h>

#define CE_PIN   3
#define CSN_PIN 4

Servo speedh;
Servo highh;
Servo directionh;

float pwmspeed = 51;
float pwmhigh = 51;
float pwmdirection = 90;

RF24 radio(CE_PIN, CSN_PIN);                               

const uint64_t adresse = 0xE8E8F0F0E1LL;  

int data[5];

void setup(){   
  Wire.begin();  
  Serial.begin(9600);                                               
  radio.begin();                                                         
  radio.openReadingPipe(1,adresse);                    
  radio.startListening();   
  
  speedh.attach(5);
  directionh.attach(6);
  highh.attach(9);
}


void loop() {
  
if (radio.available()){
  
radio.read(data, sizeof(data));                     
speedh.write(pwmspeed);
directionh.write(pwmdirection);
highh.write(pwmhigh);


pwmdirection = map(data[3], 0, 1080, 130, 50);

if(pwmspeed>50 && pwmspeed<170){
if(data[1]>600){
  pwmspeed = pwmspeed + 0.5;
}
else if(data[1]<400){
  pwmspeed = pwmspeed - 0.5;
}
}
else if(pwmspeed>=170){
  pwmspeed = 169;
}
else if(pwmspeed==50){
  pwmspeed = 51;
}


if(pwmhigh>50 && pwmhigh<170){
if(data[0]>600){
  pwmhigh = pwmhigh + 0.5;
}
else if(data[0]<400){
  pwmhigh = pwmhigh - 0.5;
}
}
else if(pwmhigh>=170){
  pwmhigh = 169;
}
else if(pwmhigh==50){
  pwmhigh = 51;
}
Serial.println(pwmhigh);
  }

delay(25);
}

Credits

MisterBotBreak

MisterBotBreak

48 projects • 151 followers
I love electronics and cats :D !

Comments