up-to-date

This commit is contained in:
Ton 2024-08-22 23:08:22 +02:00
parent 741639f268
commit 4f88a576d3
9 changed files with 14666 additions and 0 deletions

88
ATC.ino Normal file
View File

@ -0,0 +1,88 @@
/****************************************
* Dust Cover Control with Servos *
* for RapidChange ATC *
****************************************
* Programmation : JJ Hontebeyrie *
* Youtube Channel JJHONTEBEYRIE *
***************************************/
#include <Servo.h>
// Pins utilisés sur Arduino
#define RED 5
#define GREEN 6
#define BTN 7
#define SERVO1 8 // ARR
#define SERVO2 9 // AV
//Variables
boolean buttonWasUp = true;
boolean ledEnabled = false;
int pos = 0;
int lumen = 30; // A régler à votre convenance de 0 à 255
// Definition Servos
Servo SERVO_AV;
Servo SERVO_ARR;
void setup() {
//Affectation Entrées / Sorties
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode(BTN, INPUT_PULLUP);
//On dit que les servomoteurs enverrons les instructions sur des pins
SERVO_AV.attach(SERVO1);
SERVO_ARR.attach(SERVO2);
// Dust Cover ouvert au démarrage
SERVO_AV.write(180);
SERVO_ARR.write(0);
// Et lumière verte
analogWrite(RED, LOW);
analogWrite(GREEN, lumen);
}
void loop() {
// Utilise un bouton momentané comme un bouton
boolean buttonIsUp = digitalRead(BTN);
if (buttonWasUp && !buttonIsUp) {
delay(10);
buttonIsUp = digitalRead(BTN);
if (!buttonIsUp) {
ledEnabled = !ledEnabled;
if (ledEnabled) {
ProtectOn();
analogWrite(RED, lumen);
analogWrite(GREEN, 0);
}
else {
ProtectOff();
analogWrite(GREEN, lumen);
analogWrite(RED, 0);
}
}
}
buttonWasUp = buttonIsUp;
}
void ProtectOn()
// Ouvre le Dust Cover
{
for (pos = 180; pos >= 0; pos -=1)
{
SERVO_AV.write(pos);
SERVO_ARR.write(180-pos);
}
}
void ProtectOff()
// Ferme le Dust Cover
{
for(pos = 0; pos <= 180; pos += 1)
{
SERVO_AV.write(pos);
SERVO_ARR.write(180-pos);
}
}

89
ATC_Relai.ino Normal file
View File

@ -0,0 +1,89 @@
/****************************************
* Dust Cover Control with Servos *
* for RapidChange ATC *
****************************************
* Version automatique *
* (avec relai) *
****************************************
* Programmation : JJ Hontebeyrie *
* Youtube Channel JJHONTEBEYRIE *
***************************************/
#include <Servo.h>
// Pins utilisés sur Arduino
#define RED 5
#define GREEN 6
#define BTN 7
#define SERVO1 8 // ARR
#define SERVO2 9 // AV
//Variables
int pos = 0;
int lumen = 30; // A régler à votre convenance de 0 à 255 (Intensité led)
boolean ferme = false; // Dust Cover ouvert au départ
// Definition Servos
Servo SERVO_AV;
Servo SERVO_ARR;
void setup() {
//Affectation Entrées / Sorties
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode(BTN, INPUT_PULLUP);
//On dit que les servomoteurs enverrons les instructions sur des pins
SERVO_AV.attach(SERVO1);
SERVO_ARR.attach(SERVO2);
// Dust Cover ouvert au démarrage
SERVO_AV.write(180);
SERVO_ARR.write(0);
// Et lumière verte
analogWrite(RED, LOW);
analogWrite(GREEN, lumen);
}
void loop() {
// Utilise un bouton à 2 états géré par le relai
boolean buttonIsUp = digitalRead(BTN);
if (!buttonIsUp) {
ProtectOn();
analogWrite(RED, lumen);
analogWrite(GREEN, 0);
ferme = true;
}
else {
ProtectOff();
analogWrite(GREEN, lumen);
analogWrite(RED, 0);
ferme = false;
}
}
void ProtectOn()
// Ferme le Dust Cover
{
if (!ferme){
for (pos = 180; pos >= 0; pos -=1)
{
SERVO_AV.write(pos);
SERVO_ARR.write(180-pos);
}
}
}
void ProtectOff()
// Ouvre le Dust Cover
{
if (ferme){
for(pos = 0; pos <= 180; pos += 1)
{
SERVO_AV.write(pos);
SERVO_ARR.write(180-pos);
}
}
}

8351
ER20 Stepper Housings.step Normal file

File diff suppressed because it is too large Load Diff

4401
ER20_6S.step Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

BIN
Support_servoR-V2.stl Normal file

Binary file not shown.

1737
arms.step Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.