How to use a pneumatic cylinder | Arduino tutorial

How to use a pneumatic cylinder | Arduino tutorial

Hey everyone! If this video went a little fast, and you would like a BEGINNER ARDUINO TUTORIAL. check this video out; https://www.youtube.com/watch?v=vS2-lkh3hM8&t=249s . In this video, the basics of Arduino are explained IN DEPTH. So check it out, if you would like to broaden your knowledge.

PARTS:

Cylinder (Recommended): https://amzn.to/2NG5Qna

Tubing: https://amzn.to/2NJtIWO

Tube connectors: https://amzn.to/2CfAz8p

1/4″ female to 1/8″ male (for air compressor fitting): https://amzn.to/2NH5Jb0

Air compressor intake fittings: https://amzn.to/2yluNzc

OPTIONAL Air dispursers: https://amzn.to/2J1MdW1

OPTIONAL speed controller (Airflow adjuster): https://amzn.to/2pTAiRl

Solenoid: https://amzn.to/2CidK4a

Air compressor (I use and like): https://amzn.to/2CNW2q6

Arduino: https://amzn.to/2xCHm8V

9V battery connector for Arduino: https://amzn.to/2RNycyY

(Optional) Wired power for Arduino: https://amzn.to/2pUpZMQ

Wiring for Arduino: https://amzn.to/2xApX0y

Motion sensor: https://amzn.to/2Cfr4pM

plumbers tape: https://amzn.to/2CjoAqe

Power adaptor with connections: https://amzn.to/2IUh5r8

___________CODE____________

Int sol = 8; //Tell the Arduino that the positive end of the solenoid is
//plugged into pin 8

Int sen = 1; //Tell the Arduino that the positive end of the Sensor is
//plugged into pin 1

Void setup() { //this is included in every code we will be
//dealing with. This part runs once.

pinMode(sol, OUTPUT); //These two lines tell the Arduino if the
pinMode(sen, INPUT); // connections are INPUTS or OUTPUTS
}

void loop() { // this will run continuously after the Void setup has
// run once

Int val = digitalRead(sen); // Instate a new variable, that is reading
// weather the sensor is sensing
//movement or not. (High or Low)

if(val == HIGH){ //If statutes ask the Arduino if the
//sensor value is reading HIGH (movement)

digitalWrite(sol, HIGH); // if it is high we will send power
// to the solenoid
delay(1000);

}else{ // if it is high we will send power
// to the solenoid
digitalWrite(sol, LOW);
delay(1000);

}

}
How to use a pneumatic cylinder | Arduino tutorial



How to use a pneumatic cylinder | Arduino tutorial

46 Comments

Add a Comment

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *