bonjour,
je n arrive pas bloquer et a ralentir mes mini cerveau
j ai construit et coder un bras robot mais je voudrais a l aide du bouton que l on retrouve dans le joysticke bloquer le mini cerveau pendant son mouvement
j ai super bien chercher mais pas trouver de reponse voici mon code
#include <Servo.h>
Servo rotation;
Servo alongeur;
Servo pince;
Servo longueur;
const char AN_POTENTIOMETRE = 0;
const char ServoMoteur1 = 7;
const char ServoMoteur2 = 8;
const char ServoMoteur3 = 9;
const char ServoMoteur4 = 10;
const char axeY1joy = A1;
const char axeX1joy = A2;
const char axeX2joy = A3;
const char axeY2joy = A4;
unsigned int positionDuServo = 0;
unsigned int valeurX1joy = 0;
unsigned int valeurY1joy = 0;
unsigned int valeurX2joy = 0;
unsigned int valeurY2joy = 0;
void setup()
{
rotation.attach(7);
alongeur.attach(8);
pince.attach(9);
longueur.attach(10);
rotation.write(axeY1joy);
longueur.write(axeX1joy);
alongeur.write(axeX2joy);
pince.write(axeY2joy);
}
void loop()
{
valeurY1joy = analogRead(axeY1joy);
positionDuServo = analogRead(AN_POTENTIOMETRE);
positionDuServo = map(positionDuServo, 0, 1023, 0, 180);
rotation.write(positionDuServo);
{
 valeurX2joy = analogRead(axeX2joy);
 positionDuServo = analogRead(AN_POTENTIOMETRE);
 positionDuServo = map(positionDuServo, 0, 1023, 0, 180);
 alongeur.write(positionDuServo);
 {
  valeurY2joy = analogRead(axeY2joy);
  positionDuServo = analogRead(AN_POTENTIOMETRE);
  positionDuServo = map(positionDuServo, 0, 1023, 0, 180);
  pince.write(positionDuServo);
  {
  valeurX1joy = analogRead(axeX1joy);
  positionDuServo = analogRead(AN_POTENTIOMETRE);
  positionDuServo = map(positionDuServo, 0, 1023, 0, 180);
  longueur.write(positionDuServo);
  }
 }
 }
}
ps : si vous avez deja vus ce message c est volontaire car je ne c est comment retrouver mes post sur le forum si vous pouvez m aider sur ce poins se serai super
un super gros merci d avance pour votre aide
un débutant en la matiere ( excuser moi aussi pour les fautes d orthographe)
Edit de jfs : mise en forme du code entre les balises code...