Babaste1732 PostĂ©(e) FĂ©vrier 5, 2024 PostĂ©(e) FĂ©vrier 5, 2024 Bonjour je suis bloquĂ© sur ces messages d'erreur quelqu'un peux m'aider. Arduino : 1.8.18 (Windows 10), Carte : "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)" C:\Users\slyay\AppData\Local\Temp\cckehf3g.ltrans0.ltrans.o: In function `main': C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `setup' C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop' collect2.exe: error: ld returned 1 exit status exit status 1 Erreur de compilation pour la carte Arduino Mega or Mega 2560 Ce rapport pourrait ĂȘtre plus dĂ©taillĂ© avec l'option "Afficher les rĂ©sultats dĂ©taillĂ©s de la compilation" activĂ©e dans Fichier -> PrĂ©fĂ©rences. Â
pommeverte Posté(e) Février 5, 2024 Posté(e) Février 5, 2024 Salut et bienvenue sur le forum, Franchement avec aussi peu d'informations, il est difficile de te venir en aide. Est-ce que tu essaies de compiler Marlin? si oui, quelle version? si non, peux-tu fournir ton projet pour que l'on essaie de le compiler? 1
PPAC PostĂ©(e) FĂ©vrier 5, 2024 PostĂ©(e) FĂ©vrier 5, 2024 (modifiĂ©) Salutation ! Je voulais rĂ©pondre comme notre ami @pommeverte. c-a-d "Manque d'infos. Pas simple d'aider avec juste cela."  Mais je me suis dis, allez faisons une recherche google, au pif de Il y a 9 heures, Babaste1732 a dit : main.cpp:46: undefined reference to `loop' ! ( cf https://www.google.com/search?q=main.cpp%3A46%3A+undefined+reference+to+`loop' )  et je trouve https://forum.arduino.cc/t/troubleshooting-undefined-reference-to-setup-loop-error/480678 /* Liquid flow rate sensor -DIYhacking.com Arvind Sanjeev Measure the liquid/water flow rate using this code. Connect Vcc and Gnd of sensor to arduino, and the signal line to arduino digital pin 2. */ byte statusLed = 13; byte sensorInterrupt = 0; // 0 = digital pin 2 byte sensorPin = 2; // The hall-effect flow sensor outputs approximately 4.5 pulses per second per // litre/minute of flow. float calibrationFactor = 4.5; volatile byte pulseCount; float flowRate; unsigned int flowMilliLitres; unsigned long totalMilliLitres; unsigned long oldTime; void setup() { // Initialize a serial connection for reporting values to the host Serial.begin(38400); // Set up the status LED line as an output pinMode(statusLed, OUTPUT); digitalWrite(statusLed, HIGH); // We have an active-low LED attached pinMode(sensorPin, INPUT); digitalWrite(sensorPin, HIGH); pulseCount = 0; flowRate = 0.0; flowMilliLitres = 0; totalMilliLitres = 0; oldTime = 0; // The Hall-effect sensor is connected to pin 2 which uses interrupt 0. // Configured to trigger on a FALLING state change (transition from HIGH // state to LOW state) attachInterrupt(sensorInterrupt, pulseCounter, FALLING); } /** * Main program loop */ void loop() { if((millis() - oldTime) > 1000) // Only process counters once per second { // Disable the interrupt while calculating flow rate and sending the value to // the host detachInterrupt(sensorInterrupt); // Because this loop may not complete in exactly 1 second intervals we calculate // the number of milliseconds that have passed since the last execution and use // that to scale the output. We also apply the calibrationFactor to scale the output // based on the number of pulses per second per units of measure (litres/minute in // this case) coming from the sensor. flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor; // Note the time this processing pass was executed. Note that because we've // disabled interrupts the millis() function won't actually be incrementing right // at this point, but it will still return the value it was set to just before // interrupts went away. oldTime = millis(); // Divide the flow rate in litres/minute by 60 to determine how many litres have // passed through the sensor in this 1 second interval, then multiply by 1000 to // convert to millilitres. flowMilliLitres = (flowRate / 60) * 1000; // Add the millilitres passed in this second to the cumulative total totalMilliLitres += flowMilliLitres; unsigned int frac; // Print the flow rate for this second in litres / minute Serial.print("Flow rate: "); Serial.print(int(flowRate)); // Print the integer part of the variable Serial.print("."); // Print the decimal point // Determine the fractional part. The 10 multiplier gives us 1 decimal place. frac = (flowRate - int(flowRate)) * 10; Serial.print(frac, DEC) ; // Print the fractional part of the variable Serial.print("L/min"); // Print the number of litres flowed in this second Serial.print(" Current Liquid Flowing: "); // Output separator Serial.print(flowMilliLitres); Serial.print("mL/Sec"); // Print the cumulative total of litres flowed since starting Serial.print(" Output Liquid Quantity: "); // Output separator Serial.print(totalMilliLitres); Serial.println("mL"); // Reset the pulse counter so we can start incrementing again pulseCount = 0; // Enable the interrupt again now that we've finished sending output attachInterrupt(sensorInterrupt, pulseCounter, FALLING); } } /* Insterrupt Service Routine */ void pulseCounter() { // Increment the pulse counter pulseCount++; } oĂč semble t'il, il suffit d'ajouter des retours a la lignes car sinon le compilateur va prendre tout ce qu'il y a dernier "//" pour des commentaire et Ă©chouer. En gros il faut que cela soit transformĂ© en un truc comme ce qui suit (avec des retour a la ligne lĂ oĂč il faut ! mais j'ai pas testĂ© une compilation ) /** * Liquid flow rate sensor -DIYhacking.com Arvind Sanjeev Measure the * liquid/water flow rate using this code. Connect Vcc and Gnd of sensor to * arduino, and the signal line to arduino digital pin 2. */ byte statusLed = 13; byte sensorInterrupt = 0; // 0 = digital pin 2 byte sensorPin = 2; // The hall-effect flow sensor outputs approximately 4.5 pulses per second per // litre/minute of flow. float calibrationFactor = 4.5; volatile byte pulseCount; float flowRate; unsigned int flowMilliLitres; unsigned long totalMilliLitres; unsigned long oldTime; void setup() { // Initialize a serial connection for reporting values to the host Serial.begin(38400); // Set up the status LED line as an output pinMode(statusLed, OUTPUT); digitalWrite(statusLed, HIGH); // We have an active-low LED attached pinMode(sensorPin, INPUT); digitalWrite(sensorPin, HIGH); pulseCount = 0; flowRate = 0.0; flowMilliLitres = 0; totalMilliLitres = 0; oldTime = 0; // The Hall-effect sensor is connected to pin 2 which uses interrupt 0. // Configured to trigger on a FALLING state change (transition from HIGH // state to LOW state) attachInterrupt(sensorInterrupt, pulseCounter, FALLING); } /** * Main program loop */ void loop() { if ((millis() - oldTime) > 1000) // Only process counters once per second { // Disable the interrupt while calculating flow rate and sending the value to // the host detachInterrupt(sensorInterrupt); // Because this loop may not complete in exactly 1 second intervals we calculate // the number of milliseconds that have passed since the last execution and use // that to scale the output. We also apply the calibrationFactor to scale the output // based on the number of pulses per second per units of measure (litres/minute in // this case) coming from the sensor. { flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor; } // Note the time this processing pass was executed. Note that because we've // disabled interrupts the millis() function won't actually be incrementing right // at this point, but it will still return the value it was set to just before // interrupts went away. oldTime = millis(); // Divide the flow rate in litres/minute by 60 to determine how many litres have // passed through the sensor in this 1 second interval, then multiply by 1000 to // convert to millilitres. flowMilliLitres = (flowRate / 60) * 1000; // Add the millilitres passed in this second to the cumulative total totalMilliLitres += flowMilliLitres; unsigned int frac; // Print the flow rate for this second in litres / minute Serial.print("Flow rate: "); Serial.print(int(flowRate)); // Print the integer part of the variable Serial.print("."); // Print the decimal point // Determine the fractional part. The 10 multiplier gives us 1 decimal place. frac = (flowRate - int(flowRate)) * 10; Serial.print(frac, DEC); // Print the fractional part of the variable Serial.print("L/min"); // Print the number of litres flowed in this second Serial.print(" Current Liquid Flowing: "); // Output separator Serial.print(flowMilliLitres); Serial.print("mL/Sec"); // Print the cumulative total of litres flowed since starting Serial.print(" Output Liquid Quantity: "); // Output separator Serial.print(totalMilliLitres); Serial.println("mL"); // Reset the pulse counter so we can start incrementing again pulseCount = 0; // Enable the interrupt again now that we've finished sending output attachInterrupt(sensorInterrupt, pulseCounter, FALLING); } } /** * Insterrupt Service Routine */ void pulseCounter() { // Increment the pulse counter pulseCount++; }  ModifiĂ© (le) FĂ©vrier 5, 2024 par PPAC 1
Babaste1732 PostĂ©(e) FĂ©vrier 6, 2024 Auteur PostĂ©(e) FĂ©vrier 6, 2024 Merci Ă vous pour ces rĂ©ponses je travaille avec visual studio code et marlin. Mon projet est de configurer une creality cr10 S5 avec une tĂȘte bondtech et un Bltouch J'ai contrĂŽlĂ© les lignes elles sont bien retour Ă la ligne suivante C'est ma premiĂšre programmation vous pouvez me dire ce que vous avez besoin Merci Voici mes fichiers Configuration_adv.h Configuration.h
pommeverte PostĂ©(e) FĂ©vrier 6, 2024 PostĂ©(e) FĂ©vrier 6, 2024 Salut, DĂ©jĂ , tu pars sur de trĂšs mauvaises bases . La version bugfix est plutĂŽt rĂ©servĂ©e aux bĂȘta-testeurs. Je te conseille trÚÚÚÚÚÚÚÚÚÚÚs fortement de choisir la derniĂšre version stable de Marlin (V2.1.2.1) ou au pire la version Marlin Patched Source. Pour info, tu as ce tuto qui explique comment compiler Marlin sous visual Studio code. 1
Babaste1732 PostĂ©(e) FĂ©vrier 6, 2024 Auteur PostĂ©(e) FĂ©vrier 6, 2024 Merci pour ta rĂ©ponse dĂšs que j'ai un moment je vais essayer avec ce tuto mais la compil que je t'ai envoyĂ© c'est une copine oĂč je suis revenu sur un ancien logiciel pour essayer j'avais vu ça sur des tutos mais au dĂ©part j'Ă©tais sur la derniĂšre version DĂ©solĂ© pour la faute c'est une copie
pommeverte Posté(e) Février 6, 2024 Posté(e) Février 6, 2024 Pour info (2, le retour ) : tu peux modifier ton commentaire pendant 12h en cliquant sur l'icone "..." en haut à droite de ton message puis sur Editer 1
Babaste1732 Posté(e) Février 10, 2024 Auteur Posté(e) Février 10, 2024 Bonsoir, derniÚre version téléchargé toujours pareil. Dite moi ce que vous avez besoin. Il y a tellement de chose sur le net que je suis perdu. Merci
pommeverte Posté(e) Février 10, 2024 Posté(e) Février 10, 2024 Salut, J'ai préparé les fichiers de configuration à partir de tes fichiers et ceux donnés en exemple pour la derniÚre version stable de Marlin (v2.1.2.2): Configuration.hConfiguration_adv.h_Bootscreen.h_Statusscreen.h La compilation se termine sans erreur. J'ai fait les hypothÚses suivantes: BLtouch branché sur le connecteur Z- pas de détecteur de présence de filament J'ai un doute sur la déclaration de l'écran. Par défaut , c'est le "REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER" alors que l'écran ressemble à celui des CR10 standard . J'ai donc changé pour CR10_STOCKDISPLAY. A toi de voir lors du 1er démarrage si c'était une erreur . 1
Babaste1732 PostĂ©(e) FĂ©vrier 12, 2024 Auteur PostĂ©(e) FĂ©vrier 12, 2024 Merci beaucoup je fait les essaies fin d'aprĂšs midiÂ
Babaste1732 PostĂ©(e) FĂ©vrier 12, 2024 Auteur PostĂ©(e) FĂ©vrier 12, 2024 Bonsoir les configurations je les ai ouvertes avec visual studio code. Quand je veux faire le tĂ©lĂ©versement j'ai 80 messages d'erreur je cherche et je ne comprends pas pourquoi sinon j'ai essayĂ© avec Arduino mais il ne veut pas prendre les configurations. Il me dit que c'est pas au bon format. Au sujet du bltouche il est branchĂ© directement sur la carte mĂšre et effectivement je n'ai pas de dĂ©tecteur de prĂ©sence de filament et j'ai un Ă©cran standard de CR 10. Je dois certainement faire des mauvaises manipulations ou alors je suis trĂšs mauvais. Â
pommeverte PostĂ©(e) FĂ©vrier 12, 2024 PostĂ©(e) FĂ©vrier 12, 2024 Salut, Il y a 1 heure, Babaste1732 a dit : les configurations je les ai ouvertes avec visual studio code. Quand je veux faire le tĂ©lĂ©versement j'ai 80 messages d'erreur je cherche et je ne comprends pas pourquoi moi non plus . Est-ce que tu as bien suivi le tutoriel? tu as dĂ©compressĂ© les sources Marlin V2.1.2.2 dans un dossier le plus proche possible de la racine (C:) tu as Ă©crasĂ© les fichiers marlin/configuration.h et marlin/configuration_adv.h existant par ceux que j'ai fournis tu as lancĂ© la compilation C'est Ă ce moment lĂ que tu as eu les erreurs? Pour mĂ©moire: tĂ©lĂ©verser = transfĂ©rer ; compiler = crĂ©er le firmware (fichier hex). Â
Messages recommandés
Créer un compte ou se connecter pour commenter
Vous devez ĂȘtre membre afin de pouvoir dĂ©poser un commentaire
Créer un compte
CrĂ©ez un compte sur notre communautĂ©. Câest facile !
Créer un nouveau compteSe connecter
Vous avez déjà un compte ? Connectez-vous ici.
Connectez-vous maintenant