Instalation du programme du Ensemble de détecteur de distance ultrasonique

Bonjour
je fonctionne sous wind 11, j'ai acheté un kit Ensemble de détecteur de distance ultrasonique avec affichage TFT, alimenté par USB, tension de fonctionnement ≤36V, module de simulation pour l'apprentissage de la programmation, kits d'expérience sans batterie, chez TEMU, je l'ai monté, s'allume en le branchant, mais j'ai essayé d'installer le programme informatique, mais ça ne fonctionne pas !

https://www.temu.com/goods.html?_bg_fs=1&goods_id=601099717595925&sku_id=17592981569984&_x_msgid=69-20240512-21-B-731863867236118528-427-KT9eVCPy&_x_src=mail&_x_sessn_id=jszvd1182w&refer_page_name=bgt_order_detail&refer_page_id=10045_1743585210326_avafap5pug&refer_page_sn=10045

Je ne comprends pas, j'ai peut-être oublié quelque chose !
Peut on ne m'aider pas à pas comment faire ?
Merci

Bonjour,

Voilà où nous méne ton lien!
Ce n'est pas exploitable pour ceux qui n'ont pas de compte chez Temu

Bonjour
Merci pour ce renseignement, mais je comprend pas pourquoi vu que le site temu est accesible a tous!
Je remet le lien ci dessous, peux tu me dire si il est exploitable?

Merci pour ta reponse et ton aide

www.temu.com/goods.html?_bg_fs=1&goods_id=601099717595925&sku_id=17592981569984&_x_msgid=69-20240512-21-B-731863867236118528-427-KT9eVCPy&_x_src=mail&_x_sessn_id=jszvd1182w&refer_page_name=bgt_order_detail&refer_page_id=10045_1743676401215_wr61p0g252&refer_page_sn=10045

(attachments)

Ok, ca marche mieux.

Je suis avec Ubuntu sur mon PC, j'ai IDE Arduino version 2.3.4

J'ai telecharger le .ino là où ton lien dit qu'il y est, ca donne cela

/*mini radar kit*/
#include <Servo.h> 
#include <SPI.h>
#include "Ucglib.h"           
#define  trigPin   6          //Ultrasonic Module Trig->D6
#define  echoPin   5          //Ultrasonic Module Echo->D5
#define  ServoPin  3          //Servo Signal->D3
int Ymax = 128;               //vertical pixels of the screen
int Xmax = 160;               //horizontal pixels of the screen
int Xcent = Xmax / 2;         //Horizontal screen center position
int base = 118;               //baseline position
int scanline = 105;           //Radar scan line length
Servo baseServo; 
Ucglib_ST7735_18x128x160_HWSPI ucg(/*cd=*/ 9, /*cs=*/ 10, /*reset=*/ 8);


void setup(void)
{
      ucg.begin(UCG_FONT_MODE_SOLID); //initialization screen
      ucg.setRotate90();              //Set to horizontal screen If the screen display direction is reversed, you can modify the function setRotate90 or setRotate270
      
      pinMode(trigPin, OUTPUT);       //Set the trig Pin port mode
      pinMode(echoPin, INPUT);        //Set echo Pin port mode
      Serial.begin(115200);             //Set the serial port transmission rate
      baseServo.attach(ServoPin);     //Initialize servos
    
      //screen startup interface
      ucg.setFontMode(UCG_FONT_MODE_TRANSPARENT);
      ucg.setColor(0, 0, 100, 0);
      ucg.setColor(1, 0, 100, 0);
      ucg.setColor(2, 20, 20,20);
      ucg.setColor(3, 20, 20, 20);
      ucg.drawGradientBox(0, 0, 160, 128);
      ucg.setPrintDir(0);
      ucg.setColor(0, 5, 0);
      ucg.setPrintPos(27,42);
      ucg.setFont(ucg_font_logisoso18_tf);  
      ucg.print("Mini Radar");
      ucg.setColor(0, 255, 0);
      ucg.setPrintPos(25,40);
      ucg.print("Mini Radar");
      ucg.setFont(ucg_font_helvB08_tf);
      ucg.setColor(0, 255, 0);
      ucg.setPrintPos(40,100);
      ucg.print("Testing...");
      baseServo.write(90);
      ucg.setColor(0, 255, 0);
    
      //Test the operation of the base, pay attention to the position and rotation posture of the base, and whether there is any jamming (or wire winding).
      for(int x=0;x<180;x+=5)
          { baseServo.write(x);
            delay(50);
           }
      ucg.print("OK!");
      delay(500);
      ucg.setColor(0, 0, 0, 0);
      ucg.setColor(1, 0, 0, 0);
      ucg.setColor(2, 0, 0,0);
      ucg.setColor(3, 0, 0, 0);
    
      //clear screen
      //ucg.clearScreen();
      cls();
      
      ucg.setFont(ucg_font_orgv01_hr);
      ucg.setFontMode(UCG_FONT_MODE_SOLID);
}


void cls()
{
  //clear screen
  ucg.setColor(0, 0, 0, 0);
  
  for(int s=0;s<128;s+=8)
  for(int t=0;t<160;t+=16)
  {
    ucg.drawBox(t,s,16,8);
   // delay(1);
  }
    

}


int calculateDistance()
{ 
      long duration;
      //power off trigPin and wait 2 microseconds
      digitalWrite(trigPin, LOW); 
      delayMicroseconds(2);
      //TrigPin power on delay 10 microseconds and then power off
      digitalWrite(trigPin, HIGH); 
      delayMicroseconds(10);
      digitalWrite(trigPin, LOW);
      //Reading the echoPin returns the travel time of the sound wave (in microseconds)
      duration = pulseIn(echoPin, HIGH);
      //Convert echo time to distance value
      return duration*0.034/2;
}

void fix_font() 
{
      ucg.setColor(0, 180, 0);
      ucg.setPrintPos(70,128-120+7);
      ucg.print("100cm");
      ucg.setPrintPos(70,128-85-11);
      ucg.print("75cm");
      ucg.setPrintPos(70,128-60-8);
      ucg.print("50cm");
      ucg.setPrintPos(70,128-35-4);
      ucg.print("25cm");
}

void fix()
{

      ucg.setColor(0, 40, 0);
      //Draw a background image
      ucg.drawDisc(Xcent, base+1, 3, UCG_DRAW_ALL); 
      ucg.drawCircle(Xcent, base+1, 115, UCG_DRAW_UPPER_LEFT);
      ucg.drawCircle(Xcent, base+1, 115, UCG_DRAW_UPPER_RIGHT);
      ucg.drawCircle(Xcent, base+1, 86, UCG_DRAW_UPPER_LEFT);
      ucg.drawCircle(Xcent, base+1, 86, UCG_DRAW_UPPER_RIGHT);
      ucg.drawCircle(Xcent, base+1, 58, UCG_DRAW_UPPER_LEFT);
      ucg.drawCircle(Xcent, base+1, 58, UCG_DRAW_UPPER_RIGHT);
      ucg.drawCircle(Xcent, base+1, 29, UCG_DRAW_UPPER_LEFT);
      ucg.drawCircle(Xcent, base+1, 29, UCG_DRAW_UPPER_RIGHT);
      ucg.drawLine(0, base+1, Xmax,base+1);
     
      ucg.setColor(0, 120, 0);
      //draw scale
       for(int i= 40;i < 140; i+=2)
       {

        if (i % 10 == 0) 
          ucg.drawLine(105*cos(radians(i))+Xcent,base - 105*sin(radians(i)) , 113*cos(radians(i))+Xcent,base - 113*sin(radians(i)));
        else
        
         ucg.drawLine(110*cos(radians(i))+Xcent,base - 110*sin(radians(i)) , 113*cos(radians(i))+Xcent,base - 113*sin(radians(i)));
       }
          
       //draw some decorative patterns
       ucg.setColor(0,200,0);
       ucg.drawLine(0,0,0,18);
       for(int i= 0;i < 5; i++)
       {
          ucg.setColor(random(255),random(255),random(255));
          ucg.drawBox(2,i*4,random(14)+2,3);
       }

       ucg.setColor(0,0,180);
       ucg.drawFrame(146,0,14,14);
       ucg.setColor(0,0,60);
       ucg.drawHLine(148,0,10);
       ucg.drawVLine(146,2,10);
       ucg.drawHLine(148,13,10);
       ucg.drawVLine(159,2,10);
        
       ucg.setColor(random(255),random(255),random(255));
       //ucg.setColor(0,220,0);
       ucg.drawBox(148,2,4,4);
       ucg.setColor(0,220,0);
       ucg.drawBox(148,8,4,4);
       ucg.setColor(random(255),random(255),random(255));
       //ucg.setColor(100,0,0);
       ucg.drawBox(154,8,4,4);
       ucg.setColor(random(255),random(255),random(255));
       //ucg.setColor(0,0,150);
       ucg.drawBox(154,2,4,4);

       ucg.setColor(0,0,90);
       ucg.drawTetragon(62,123,58,127,98,127,102,123);
       ucg.setColor(0,0,160);
       ucg.drawTetragon(67,123,63,127,93,127,97,123);
       ucg.setColor(0,255,0);
       ucg.drawTetragon(72,123,68,127,88,127,92,123);
}



void loop(void)
{
  
  int distance;
  
  fix(); 
  fix_font();  //Repaint screen background elements

  for (int x=180; x > 4; x-=2){       //The base servo rotates from 180 to 0 degrees
     
      baseServo.write(x);             //Adjust the steering gear angle
      
      //Draw Radar Scanlines
      int f = x - 4; 
      ucg.setColor(0, 255, 0);
      ucg.drawLine(Xcent, base, scanline*cos(radians(f))+Xcent,base - scanline*sin(radians(f)));
      f+=2;
      ucg.setColor(0, 128, 0);
      ucg.drawLine(Xcent, base, scanline*cos(radians(f))+Xcent,base - scanline*sin(radians(f)));
      f+=2;
      ucg.setColor(0, 0, 0);
      ucg.drawLine(Xcent, base, scanline*cos(radians(f))+Xcent,base - scanline*sin(radians(f)));
      ucg.setColor(0,200, 0);
      //Get the distance value
      distance = calculateDistance();
     
      //Draw a point at the corresponding position according to the measured distance
      if (distance < 100)
      {
        ucg.setColor(255,0,0);
        ucg.drawDisc(1.15*distance*cos(radians(x))+Xcent,-(1.15*distance*sin(radians(x)))+base, 1, UCG_DRAW_ALL);
      }
      else
      { //If it is more than 1 meter, it is indicated by a yellow painting on the edge area
        ucg.setColor(255,255,0);
        ucg.drawDisc(116*cos(radians(x))+Xcent,-116*sin(radians(x))+base, 1, UCG_DRAW_ALL);
      }
    
           
      //Debug code, output angle and range value
      Serial.print("Degree:  ");
      Serial.print(x); 
      Serial.print("    ,Distance:   ");
      Serial.println(distance); 
     

      if (x > 70 and x < 110)  fix_font();  //When the scan line and the number coincide, redraw the number
 
      ucg.setColor(0,0,155,  0);
      ucg.setPrintPos(0,126);
      ucg.print("DEG: "); 
      ucg.setPrintPos(24,126);
      ucg.print(x);
      ucg.print("  ");
      ucg.setPrintPos(125,126);
      ucg.print("  ");
      ucg.print(distance);
      ucg.print("cm  "); 
      
  }
  delay(50);
  cls();
  fix(); 
  fix_font();          //Repaint screen background elements
  
  for (int  x=1; x < 176; x+=2){     
      baseServo.write(x);             //Adjust the steering gear angle
      
      //Draw Radar Scanlines
      int f = x + 4;
      ucg.setColor(0, 255, 0);
      ucg.drawLine(Xcent, base, scanline*cos(radians(f))+Xcent,base - scanline*sin(radians(f)));
      f-=2;
      ucg.setColor(0, 128, 0);
      ucg.drawLine(Xcent, base, scanline*cos(radians(f))+Xcent,base - scanline*sin(radians(f)));
      f-=2;
      ucg.setColor(0, 0, 0);
      ucg.drawLine(Xcent, base, scanline*cos(radians(f))+Xcent,base - scanline*sin(radians(f)));
      ucg.setColor(0, 200, 0);
      //测距
      distance = calculateDistance();

      //Draw a point at the corresponding position according to the measured distance
      if (distance < 100)
      {
        ucg.setColor(255,0,0);
        ucg.drawDisc(1.15*distance*cos(radians(x))+Xcent,-(1.15*distance*sin(radians(x)))+base, 1, UCG_DRAW_ALL);
      }
      else
      { //If it is more than 1 meter, it is indicated by a yellow painting on the edge area
        ucg.setColor(255,255,0);
        ucg.drawDisc(116*cos(radians(x))+Xcent,-116*sin(radians(x))+base, 1, UCG_DRAW_ALL);
      }
           
      //Debug code, output angle and range value
      Serial.print("Degree:  ");
      Serial.print(x); 
      Serial.print("    ,Distance:   ");
      Serial.println(distance); 
     
      if (x > 70 and x < 110)  fix_font();  //When the scan line and the number coincide, redraw the number
      
      ucg.setColor(0,0,155,  0);
      ucg.setPrintPos(0,126);
      ucg.print("DEG: "); 
      ucg.setPrintPos(24,126);
      ucg.print(x);
      ucg.print("   ");
      ucg.setPrintPos(125,126);
      ucg.print("   ");
      ucg.print(distance);
      ucg.print("cm   "); 
  
  }
 delay(50);
 cls();

}


J'ai telechargé les bibliothéque qui n'étaient pas installées chez moi, c.à.d Ucglib.h, j'ai téléversé le programme sur mon UNO, et je n'ai pas eut d'erreur

N'ayant que un UNO et pas le Kit radar, je ne peux pas aller plus loin!

bonjour

Bon, rien ne fonctionne!!
Apres detection, j ai le choix une carte soit Ardinio BT soit Adafruit Circuit Playground.J
ai essayé les 2, mais toujour une erreur, de plus, on me dirige vers l'IDE 2.3.5!
Ce que je ne sais pas, c est quoi installer dans la bibliothèque dans toute cette liste, et aussi dans libraierie manager, bien sur sur si il y a quelque chose a faire aussi.

Les pilotes USB sont installés aussi!
Apres, je suiqs soit 64 bit!

C est pas comprehensible, ca parrait simple pourtant!

C'est-à-dire, c'est un peu léger comme description du problème.

  • la compilation du code se déroule correctement?
  • le code se charge dans la UNO?
  • l'écran s'allume?
  • il y a de l'affichage?

Tu vas dans le menu Outils => Cartes => Arduino AVR Boards => Arduino UNO

Cette carte fait partie de celles installées par défaut avec toutes les versions de l'IDE.

Le croquis utilise 444 octets (1%) de l'espace de stockage de programmes. Le maximum est de 28672 octets.
Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 2039 octets pour les variables locales. Le maximum est de 2048 octets.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x12
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x12
Failed uploading: uploading error: exit status 1

Ensuite sur la librairie, je sais pas quoi clicker dessus si il y a besoin!

Je te joint les photos avec!

Merci beaucoup de m aider!

(attachments)



(attachments)


Tu es descendu dans cette liste pour chercher la carte "Arduino UNO"

Bonjour!

dans cette liste on me propose seulement 2 cartes en brillance Ardinio BT et Adafruit Circuit Playground, les autres sont grisees, mais je ne sais pas quoi utiliser!
De plus, je n'es pas de carte UNO , juste ce qu'il y a dans la liste de la photo jointe

Dans la doc associé à ton kit il est indiqué de choisir Arduino UNO comme type de carte.
Par défaut à l'installation de l'IDE il y a au moins une vingtaine de cartes installées.

Tu as tapé UNO dans la barre de recherche?

Le problème, c est que je ne vois pas ce choix dans la photo que j ai mis.

  • tu as fait défiler la liste avec le curseur que j'ai marqué en rouge dans le message #10 ?
  • tu as tapé UNO dans le champs de recherche de la fenêtre?

Bonjour
non, je vais faire ca, moi qui ne comprend pas bien l'anglais, j ai pas cherché autre chose, je vais voir!
J ai pu metrre la carte UNO MINI mais rien ne se passe encore!

UNO tout court pas MINI

Tu peux changer la langue dans les préférences
Menu Fichier => Preference

je vais essayer demain.
selon le kit, c est une carte UNO R3 AT mega mais je retrouve pas celle ci.

Après avoir installé La UNO,il y a autre chose à installer ?

Dans la mesure où tu as déjà réussi à compiler ton code je dirais que non.
La doc disponible par le lien sur le site de ton vendeur est assez bien détaillée. Si tu la suis scrupuleusement tu ne devrais pas avoir de problème.

j ai suivi la notice installé la carte uno, mais rien ne fonctionne.

???
Même remarque que précédemment, donne des détails.
Quel programme essaies-tu de faire tourner?

bonjour
j'ai réussi à le faire fonctionner mais il faut savoir que le nouvel IDE qu ils mettent en place n'est pas le même que l'IDE qu'il y a 6 ans quand le produit est sorti ou là c'était vraiment plus simple il y avait vraiment un IDE spécial qui radar mini qu il il n'y a plus maintenant ,il a fallu que je remette la carte uno qui fait partie des cartes méga et ensuite que j'aille chercher l'IDE de 6 ans avec le kit radar mini et que je le fasse ouvrir par le nouvel IDE pour le faire fonctionner par contre ce qui est dommage c'est que ça fonctionne à peine 2 minutes et que ça s'éteint bon ça ça doit être dans le programme c'est bon maintenant ça fonctionne merci encore pour tout