Tell us about yourself!

Complete Your Profile
  • jeanlouisquero commented on Ivica_Matic's instructable L298n Arduino Library6 months ago
    L298n Arduino Library

    Ok thanks for your replyThe engines now work with this sketchThe radar on the computer works.Not on the car.Thank you for your help I will try again with your program#include <Ultrasonic.h>int trigPin = 13; // int echoPin = 12; //float v=331.5+0.6*20; // m/s // //moteur droitint L298N_IN1=2;int L298N_IN2=4;int L298N_ENA =3;//moteur gaucheint L298N_IN3=7;int L298N_IN4=8;int L298N_ENB =5;void setup() //{ pinMode(L298N_IN1, OUTPUT);pinMode(L298N_IN2, OUTPUT);pinMode(L298N_IN3, OUTPUT);pinMode(L298N_IN4, OUTPUT); pinMode(L298N_ENA, OUTPUT); pinMode(L298N_ENB, OUTPUT); Serial.begin(9600); // pinMode(trigPin, OUTPUT); // pinMode(echoPin, INPUT); // }float distanceCm(){ // // send sound pulse // digitalWrite(trigPin, LOW); // delayMicroseconds(3); // digi...

    see more »

    Ok thanks for your replyThe engines now work with this sketchThe radar on the computer works.Not on the car.Thank you for your help I will try again with your program#include <Ultrasonic.h>int trigPin = 13; // int echoPin = 12; //float v=331.5+0.6*20; // m/s // //moteur droitint L298N_IN1=2;int L298N_IN2=4;int L298N_ENA =3;//moteur gaucheint L298N_IN3=7;int L298N_IN4=8;int L298N_ENB =5;void setup() //{ pinMode(L298N_IN1, OUTPUT);pinMode(L298N_IN2, OUTPUT);pinMode(L298N_IN3, OUTPUT);pinMode(L298N_IN4, OUTPUT); pinMode(L298N_ENA, OUTPUT); pinMode(L298N_ENB, OUTPUT); Serial.begin(9600); // pinMode(trigPin, OUTPUT); // pinMode(echoPin, INPUT); // }float distanceCm(){ // // send sound pulse // digitalWrite(trigPin, LOW); // delayMicroseconds(3); // digitalWrite(trigPin, HIGH); // delayMicroseconds(5); // digitalWrite(trigPin, LOW); // // listen for echo // float tUs = pulseIn(echoPin, HIGH); // microseconds // float t = tUs / 1000.0 / 1000.0 / 2.0; // s // float d = t*v; return d*100; // cm // }void loop() { int d=distanceCm(); // Serial.println(d, DEC); delay(200); // ms // digitalWrite(L298N_ENA, HIGH); digitalWrite(L298N_ENB, HIGH); startCar();delay(1000);stopCar();delay(1000);leftTurn();delay(1000);rightTurn();delay(1000);}void startCar(){ digitalWrite(L298N_IN1, HIGH); digitalWrite(L298N_IN2, LOW); digitalWrite(L298N_IN3, HIGH); digitalWrite(L298N_IN4, LOW);}void stopCar(){digitalWrite(L298N_IN1, LOW); digitalWrite(L298N_IN2, LOW); digitalWrite(L298N_IN3, LOW); digitalWrite(L298N_IN4, LOW);}void leftTurn(){digitalWrite(L298N_IN1, LOW); digitalWrite(L298N_IN2, HIGH); digitalWrite(L298N_IN3, HIGH); digitalWrite(L298N_IN4, LOW); } void rightTurn(){ digitalWrite(L298N_IN1,HIGH ); digitalWrite(L298N_IN2, LOW); digitalWrite(L298N_IN3,LOW ); digitalWrite(L298N_IN4, HIGH); }

    View Instructable »
  • jeanlouisquero commented on jsvester's instructable Simple Arduino and HC-SR04 Example6 months ago
    Simple Arduino and HC-SR04 Example

    Ok thanks it works in a scketch alone but when i add engines nothing happensI had to make a mistake but I'm starting and I'm not sure how to write the program.I replaced the led by the engines?Can you help me thanksCordially#include <Stepper.h>#include <Ultrasonic.h>//#include <Servo.h> #define trigPin 13#define echoPin 12//moteur droitint L298N_IN1=9;int L298N_IN2=8;int L298N_ENA =2;//moteur gaucheint L298N_IN3=7;int L298N_IN4=6;int L298N_ENB =3;void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(L298N_IN1, OUTPUT);pinMode(L298N_IN2, OUTPUT);pinMode(L298N_IN3, OUTPUT);pinMode(L298N_IN4, OUTPUT); pinMode(L298N_ENA, OUTPUT); pinMode(L298N_ENB, OUTPUT);} void loop() { long duration, distance; digitalWrite(trigPin, LOW); //...

    see more »

    Ok thanks it works in a scketch alone but when i add engines nothing happensI had to make a mistake but I'm starting and I'm not sure how to write the program.I replaced the led by the engines?Can you help me thanksCordially#include <Stepper.h>#include <Ultrasonic.h>//#include <Servo.h> #define trigPin 13#define echoPin 12//moteur droitint L298N_IN1=9;int L298N_IN2=8;int L298N_ENA =2;//moteur gaucheint L298N_IN3=7;int L298N_IN4=6;int L298N_ENB =3;void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(L298N_IN1, OUTPUT);pinMode(L298N_IN2, OUTPUT);pinMode(L298N_IN3, OUTPUT);pinMode(L298N_IN4, OUTPUT); pinMode(L298N_ENA, OUTPUT); pinMode(L298N_ENB, OUTPUT);} void loop() { long duration, distance; digitalWrite(trigPin, LOW); // Added this line delayMicroseconds(2); // Added this line digitalWrite(trigPin, HIGH);// delayMicroseconds(1000); - Removed this line delayMicroseconds(10); // Added this line digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; if (distance < 4) { // This is where the LED On/Off happens digitalWrite(L298N_IN1,HIGH); // When the Red condition is met, the Green LED should turn off digitalWrite(L298N_IN2,LOW); digitalWrite(L298N_IN3,HIGH); digitalWrite(L298N_IN4,LOW);} else { digitalWrite(L298N_IN1,LOW); digitalWrite(L298N_IN2,HIGH); digitalWrite(L298N_IN3,LOW); digitalWrite(L298N_IN4,HIGH); } if (distance >= 200 || distance <= 0){ Serial.println("Out of range"); } else { Serial.print(distance); Serial.println(" cm"); } delay(500); digitalWrite(L298N_ENA, HIGH); digitalWrite(L298N_ENB, HIGH); startCar();delay(1000);stopCar();delay(1000);leftTurn();delay(1000);rightTurn();delay(1000);}void startCar(){ digitalWrite(L298N_IN1, HIGH); digitalWrite(L298N_IN2, LOW); digitalWrite(L298N_IN3, HIGH); digitalWrite(L298N_IN4, LOW);}void stopCar(){digitalWrite(L298N_IN1, LOW); digitalWrite(L298N_IN2, LOW); digitalWrite(L298N_IN3, LOW); digitalWrite(L298N_IN4, LOW);}void leftTurn(){digitalWrite(L298N_IN1, LOW); digitalWrite(L298N_IN2, HIGH); digitalWrite(L298N_IN3, HIGH); digitalWrite(L298N_IN4, LOW); } void rightTurn(){ digitalWrite(L298N_IN1,HIGH ); digitalWrite(L298N_IN2, LOW); digitalWrite(L298N_IN3,LOW ); digitalWrite(L298N_IN4, HIGH); }

    View Instructable »
  • jeanlouisquero commented on Ivica_Matic's instructable L298n Arduino Library7 months ago
    L298n Arduino Library

    une précision j'ai mis A precision I putanalogWrite(ENA,500);au lieu de zero idem pour ENBseul les moteurs ENA fonctionnentOnly ENA engines operate

    View Instructable »
  • jeanlouisquero made the instructable L298n Arduino Library7 months ago
    L298n Arduino Library

    bonjourj'ai essayé avec votre programmation mais rien ne fonctionne j'avais écrit dans un autre module :HelloI tried it with your programming but nothing worksI had written in another shetch://la pwm pour la vitesse int ENA = 10; int ENB = 5;// les broches de signal pour le sens de rotation//const int ENA = 10;//const int ENB = 5;const int in1 = 9;const int in2 =8;const int in3 = 7;const int in4 =6;void setup() { pinMode(ENA , OUTPUT); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pinMode(ENB , OUTPUT); pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);Serial.begin(15200);//on demarre moteur en avant et en roue libre analogWrite(ENA,0); digitalWrite(in1, LOW); digitalWrite(in2, HIGH); digitalWrite(in3, LOW); digitalWrite(in4, HIGH); analogWrite(ENB,0); }#include "...

    see more »

    bonjourj'ai essayé avec votre programmation mais rien ne fonctionne j'avais écrit dans un autre module :HelloI tried it with your programming but nothing worksI had written in another shetch://la pwm pour la vitesse int ENA = 10; int ENB = 5;// les broches de signal pour le sens de rotation//const int ENA = 10;//const int ENB = 5;const int in1 = 9;const int in2 =8;const int in3 = 7;const int in4 =6;void setup() { pinMode(ENA , OUTPUT); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pinMode(ENB , OUTPUT); pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);Serial.begin(15200);//on demarre moteur en avant et en roue libre analogWrite(ENA,0); digitalWrite(in1, LOW); digitalWrite(in2, HIGH); digitalWrite(in3, LOW); digitalWrite(in4, HIGH); analogWrite(ENB,0); }#include "l298n_lib.h"void loop() { // put your main code here, to run repeatedly:int vitesse = analogRead;if(vitesse > 512){ vitesse -= 512; digitalWrite(in1, LOW); digitalWrite(in2, HIGH); digitalWrite(in3, LOW); digitalWrite(in4, HIGH); Serial.print("+");} else { vitesse = 512-vitesse; digitalWrite(in1, LOW); digitalWrite(in2, HIGH); digitalWrite(in3, LOW); digitalWrite(in4, HIGH); Serial.print("-");}vitesse /= 2;//analogWrite( ENA);Serial.println(vitesse);delay(50);}et cela ne fonctionne pas j'ai brancher comme sur le schémaI plugged the connectors as in the diagram but it does not workI am all new in arduinoYesterday I had 2 engines that worked when I added the 4 nothing worksThank you for your helphier j'avais seulement deux moteurs qui fonctionnaientje n'arrive pas à faire fonctionner les 4 moteurs

    View Instructable »