1 / 3
Automatic Key Stroker — zdjęcie 1
1 / 3

Automatic Key Stroker

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

Just a simple key stroker.

Ocena
0 / 5
Polubienia
7
Pobrania
91
Wydruki
0
Wyświetlenia
3128
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Office
Licencja
Creative Commons — Attribution — Noncommercial

Just a simple key stroker. You dont know you need one until you do... :D

It uses a mini servo, a small potentiometer (optional), and any arduino compatible board that can fit inside the box and can handle the servo. I used a cheap Wemos D1 Mini clone. You need 6x3mm bolts (same size as the bolts used in Prusa printers).

Arduino code is included in the print instructions since this website does not allow me to upload the .ino file...

Print instructions

Just use your normal settings. I included a 3mf file for reference.

Arduino code:

include <Servo.h>

include <SimpleTimer.h>

Servo myservo;
int pos = 0;
int lowpos = 0;
int highpos = 90;
int servopin = 2;
int potpin = A0;
int ledpin = D7;
int val = 0;
int oval = 0;
int pot = 0;
int servoSpeed = 4;

SimpleTimer timer;

void setup() {
myservo.attach(servopin);
myservo.write(lowpos);
Serial.begin(9600);
timer.setInterval(val);
}

void loop() {
pot = analogRead(potpin);
//Serial.println(pot);
val = map(pot,1,1024,15000,0);
val = val * 1000 / 1000;
if (abs(oval-val) > 1000) {
Serial.println(val);
oval=val;
timer.setInterval(val);
timer.reset();
}

if (timer.isReady()) {
moveServo();
}
}

void moveServo() {
for (pos = highpos; pos >= lowpos; pos -= servoSpeed) {
myservo.write(pos);
delay(15);
Serial.println(pos);
}
for (pos = lowpos; pos <= highpos; pos += servoSpeed) {
myservo.write(pos);
delay(15);
Serial.println(pos);
}

timer.reset();
}

Tagi