MakerWorld
Electronics
Vai al Modello
cleaning robot
18
Download
35
Likes
1
Makes
the robot that cleans you must buy this parts:https://a.aliexpress.com/_ExGVVwUhttps://a.aliexpress.com/_EGsUXsohttps://a.aliexpress.com/_EIVd5lKhttps://a.aliexpress.com/_EvFlnuYhttps://a.aliexpress.com/_EIrWqlQhttps://a.aliexpress.com/_Ezv0hNahttps://ebay.us/m/IMDxvMand code for arduino sorry for polish language so you must replace it on english #include <Servo.h>/* ---------- PINY ---------- */#define TRIG_PIN 9#define ECHO_PIN 10#define IN1 2#define IN2 3#define IN3 4#define IN4 5#define SERVO_PIN 6/* ---------- SERWO ---------- */Servo kierunek;/* ---------- SILNIK KROKOWY 28BYJ-48 + ULN2003 (półkrok) ---------- */const int seqLen = 8;const uint8_t seq[seqLen][4] = { {1,0,0,0}, {1,1,0,0}, {0,1,0,0}, {0,1,1,0}, {0,0,1,0}, {0,0,1,1}, {0,0,0,1}, {1,0,0,0} // celowo powtórzony dla płynności};int stepIndex = 0;int stepDelay = 1; // 1 ms = szybciej (jak wcześniej)/* ---------- LOGIKA ---------- */const int DIST_THRESHOLD = 20; // cmconst int STEPS_PER_LOOP = 25; // <<< TO PRZYWRACA PRĘDK
Hai stampato questo modello? Accedi e condividi il tuo make!
Accedi per lasciare un commento
AccediAncora nessun commento – sii il primo!