Myvideo

Guest

Login

мотор ардуино джойстик

Uploaded By: Myvideo
496 views
0
0 votes
0

можно крутить в разные стороны но трудно int s=10; //5 pin int s1=11; int p; int p1; void setup() { pinMode(s,OUTPUT); pinMode(s1,OUTPUT); } void w(int s, int m) { p=m; digitalWrite(s,HIGH); delayMicroseconds(p); digitalWrite(s,LOW); } void w1(int s1, int m1) { p1=m1; digitalWrite(s1,HIGH); delayMicroseconds(p1); digitalWrite(s1,LOW); } void loop() { int m=analogRead(A3); //2 pin m=map(m,0,1023,40,400); w(s,m); int m1=analogRead(A2); //2 pin m1=map(m1,0,1023,40,400); w1(s1,m1); }

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later