alors pour commençer on aurait besoin d'un schema :

composants :
- 4 servos motor
- Arduino
- HC-05
- transistor, capacité ( question de sécurité)
- pile 9V.
Aprés vous devez telecharger app : Blynk 






En suite vous devez passer le programme suivant à l'Arduino :
A ne pas oublier de mettre votre propre Auth 
----------------------------------
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
#include <Servo.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "0404d96b9074493c9d69bf14742f5ec3";
SoftwareSerial SerialBLE(10, 11); // RX, TX
Servo baseServo, forwardServo, upServo, clawServo;
BLYNK_WRITE(V3)
{
  baseServo.write(param.asInt());
}
BLYNK_WRITE(V4)
{
  forwardServo.write(param.asInt());
}
BLYNK_WRITE(V5)
{
  upServo.write(param.asInt());
}
BLYNK_WRITE(V6)
{
  clawServo.write(param.asInt());
}
void setup()
{
  // Debug console
  Serial.begin(9600);
  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);
  Serial.println("Waiting for connections...");
  baseServo.attach(3);
  forwardServo.attach(5);
   upServo.attach(6);
  clawServo.attach(9);
  baseServo.write(0);
  forwardServo.write(0);
   upServo.write(0);
  clawServo.write(0);
}
void loop()
{
  Blynk.run();
}
-----------------------------------
⛔ si vous arrivez a un problème n'hésiter pas de me contacter sur l'un des réseaux sociaux.

Post a Comment

أحدث أقدم