CNC Mill Conversion Part 6 - Arduino Joypad Control

  Рет қаралды 1,121

The Solar Powered Engineer - Neil Dev255

The Solar Powered Engineer - Neil Dev255

Күн бұрын

A short video with detailed information on connecting up a Joypad/ Joystick to the Arduino (Sketch/program below and during the video).
I am using an old helicopter controller to control a CNC conversion project.
Please hit SUBSCRIBE to follow these projects.
This project developed through a need to speed up my Electric Vehicle Conversion Project.
This video goes through the following:
Connecting a Joypad to an Arduino Mega 2560.
Uploading a Sketch (Arduino Program) to the Arduino.
Isolating the joypad controls from the original circuit.
A circuit diagram of the Joypad and its new connections.
How to connect potentiometers (variable resistor) to an Arduino.
Reduce power consumption using high-value resistors in series.
Joypad values sent to the serial monitor for testing the controls.
Using an Arduino on a Breadboard with jumper wires.
Testing the circuit at each stage to prevent damage when switched on.
Here is a Simple Joypad joystick test Sketch that I use in the video: -
-----------------------------------------Arduino Sketch Begin---------------------------------------
int topPotPin = A0;
int topPotVal = 0;
int xAxisPin = A1;
int xAxisVal = 0;
int yAxisPin = A2;
int yAxisVal = 0;
int zAxisPin = A3;
int zAxisVal = 0;
int topSwtchPin = 46;
int topSwtchVal = 0;
int redLedPin = 50;
int yellowLedPin = 48;
void setup() {
pinMode(topSwtchPin, INPUT);
pinMode(topSwtchPin, INPUT_PULLUP);
pinMode(redLedPin, OUTPUT);
pinMode(yellowLedPin, OUTPUT);
Serial.begin(115200);
while (!Serial) ;
}
void loop(){
topPotVal = analogRead(topPotPin);
xAxisVal = analogRead(xAxisPin);
yAxisVal = analogRead(yAxisPin);
zAxisVal = analogRead(zAxisPin);
topSwtchVal = digitalRead(topSwtchPin);
Serial.print("X-Val = ");
Serial.print(xAxisVal);
Serial.print(" Y-Val = ");
Serial.print(yAxisVal);
Serial.print(" Z-Val = ");
Serial.print(zAxisVal);
Serial.print(" Top Val = ");
Serial.println(topPotVal);
if (topSwtchVal == 0){
digitalWrite(yellowLedPin, HIGH);
digitalWrite(redLedPin, LOW);
delay(500);
digitalWrite(redLedPin, HIGH);
delay(500);
digitalWrite(yellowLedPin, LOW);
digitalWrite(redLedPin, LOW);
delay(500);
digitalWrite(yellowLedPin, HIGH);
digitalWrite(redLedPin, HIGH);
delay(500);
}
}
----------------------------------------Arduino Sketch End-----------------------------------------
Music: www.bensound.com
Music :
Sunrise by Vexento / vexento
/ vexento
Tevo by Vexento / vexento
/ vexento
/ vexento
Music promoted by Audio Library • Tevo - Vexento (No Cop...
#WelcomeToMyGarage
#dev255

Пікірлер: 4
@steamskynoise
@steamskynoise 4 жыл бұрын
This is a brilliant and inspirational series. I have the same mill. Whilst I suspect I'll never do anything as involved as this, it has been fascinating to watch and also some very useful techniques that I can apply to my own mill e.g. the procedure for tramming the mill properly (a few videos back in the series). Please keep going with the series and good luck with the rest of the build & coding!
@TheSolarPoweredEngineer
@TheSolarPoweredEngineer 4 жыл бұрын
Hi Bob, thank you, there is a lot more to come 😀. I am currently working on the video for Friday and hopefully machining out some of the parts. They are very solid machines and when fully setup they are so accurate and repeatable. I measured the backlash yesterday with the new drive unit and it's only 0.12 mm. Feel free to suggest any content on the mill and I should be able to cover it 👍
@Build_the_Future
@Build_the_Future 4 жыл бұрын
I know KZbin is slow going when you first start out but I hope you keep it up at least once a week.
@TheSolarPoweredEngineer
@TheSolarPoweredEngineer 4 жыл бұрын
Hi Eric, same here I am currently working on another video that shows some milling with the Arduino and Joypad. All is working well, although it does take a while to set-up, film, do the work and edit it. I am getting faster though every time, this video should be out next Friday. Glad you are enjoying them.
CNC Mill Conversion Part 7 - Solar Powered Milling Parts with Joypad control
17:42
The Solar Powered Engineer - Neil Dev255
Рет қаралды 713
Have you ever seen soldering THIS close?
9:53
Robert Feranec
Рет қаралды 400 М.
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 92 МЛН
The BEST EVER IOT Project using ESP32 🔥🔥 | PCBGOGO
19:44
【For Beginner】How to start electronics and what item is needed
18:16
Ford RS gauges with Arduino UNO
45:38
upir
Рет қаралды 319 М.
DIY sonar scanner (practical experiments)
14:30
bitluni
Рет қаралды 1 МЛН
CNC Mill Conversion Part 9 - Machining the X-Axis, Assembling and Testing
23:29
The Solar Powered Engineer - Neil Dev255
Рет қаралды 6 М.
this can't be real.
10:16
Low Level
Рет қаралды 124 М.
DC motor PID speed control
15:29
Curio Res
Рет қаралды 236 М.
Micronics SLS nylon 3D printer makes electronic circuits
19:08
Applied Science
Рет қаралды 158 М.
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН