Fórum témák

» Több friss téma
Fórum » Arduino
A klónok CH340 Soros-USB illesztőjének drivere (Letöltés)
Lapozás: OK   401 / 853
(#) morzsa15 válasza benjami hozzászólására (») Dec 3, 2017 /
 
Rendben neki kezdek majd jelentkezem még ma. Köszönöm a segítséget!
(#) benjami válasza RoliNyh hozzászólására (») Dec 3, 2017 /
 
Nem fogsz elférni a 4kB flash és a 256byte ram-ban.
(#) morzsa15 válasza benjami hozzászólására (») Dec 3, 2017 /
 
Na ilyen lett! Köszönöm a segítséget még egyszer!
(#) jointsilver36 hozzászólása Dec 3, 2017 /
 
Sziasztok! Ezt az induktivításmérőt szeretném elkészíteni:Bővebben: http://electronoobs.com/eng_arduino_tut10_3.php
A programot a nanomba akarom áttküldeni ezt a hibaüzenetet adja ki . alul a képen.Pedig mindent letöltöttem hozzá és bemásoltam a könyvtárba.Mi lehet a hiba?Köszi a válaszokat.
A hozzászólás módosítva: Dec 3, 2017
(#) game4812 válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Egyrészt a #error kezdetű sort törölni kell, miután a következőben átjavítottad a kondenzátor értékét az általad használtra, ezt is jelenti az a sor angolul. Másrészt a linkelt kódban az inductance_mH kezdetű sor nincs benne, gondolom te írtad bele, de nem hoztál létre ilyen nevű változót, a void setup felé egy "unsigned long inductance_mH;" sor megteszi.
(#) jointsilver36 válasza game4812 hozzászólására (») Dec 3, 2017 /
 
Áltlam használt kondi értéke?Amivel beállítom a mérést?ez a kód.
A hozzászólás módosítva: Dec 3, 2017
(#) jointsilver36 válasza game4812 hozzászólására (») Dec 3, 2017 /
 
  1. /*Thanks. Remember to visit my Youtube channel
  2.   If you don't whant to Serial print the valeus just delete the serial. print lines
  3.   and leave just the LCD print ones.
  4.   I've used a i2c LCD screen module.
  5. */
  6. //LCD config
  7. #include <Wire.h>
  8. #include <LiquidCrystal_I2C.h>
  9. LiquidCrystal_I2C lcd(0x3f,20,4);  //sometimes the adress is not 0x3f. Change to 0x27 if it dosn't work.
  10.  
  11. //13 is the input to the circuit (connects to 150ohm resistor), 11 is the comparator/op-amp output.
  12. double pulse, frequency, capacitance, inductance;
  13. void setup(){
  14.   lcd.init();
  15.   lcd.backlight();
  16.   Serial.begin(115200);
  17.   pinMode(11, INPUT);
  18.   pinMode(13, OUTPUT);
  19.   Serial.println("Why hello!");
  20.   delay(200);
  21. }
  22. void loop(){
  23.   digitalWrite(13, HIGH);
  24.   delay(5);//give some time to charge inductor.
  25.   digitalWrite(13,LOW);
  26.   delayMicroseconds(100); //make sure resination is measured
  27.   pulse = pulseIn(11,HIGH,5000);//returns 0 if timeout
  28.   if(pulse > 0.1){ //if a timeout did not occur and it took a reading:
  29.    
  30.    
  31.   #error insert your used capacitance value here. Currently using 2uF. Delete this line after that
  32.   capacitance = 2.E-6; // - insert value here
  33.  
  34.  
  35.   frequency = 1.E6/(2*pulse);
  36.   inductance = 1./(capacitance*frequency*frequency*4.*3.14159*3.14159);//one of my profs told me just do squares like this
  37.   inductance *= 1E6; //note that this is the same as saying inductance = inductance*1E6
  38.  
  39.   //Serial print
  40.   Serial.print("High for uS:");
  41.   Serial.print( pulse );
  42.   Serial.print("\tfrequency Hz:");
  43.   Serial.print( frequency );
  44.   Serial.print("\tinductance uH:");
  45.   Serial.println( inductance );
  46.   delay(10);
  47.  
  48.   //LCD print
  49.   lcd.clear();
  50.   lcd.setCursor(0,0);
  51.   lcd.print("Inductance:");
  52.   lcd.setCursor(0,1);
  53.   lcd.print(inductance);
  54.   lcd.setCursor(14,1);
  55.   lcd.print("uH");          
  56.   delay(10);
  57.   }
  58. }
(#) jointsilver36 válasza game4812 hozzászólására (») Dec 3, 2017 /
 
Így töltöttem le a kódot. nem tudtam,hogy nem működik.
(#) vargaf válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
De a kommentet nem olvastad el, abban írják le mit tegyél ezzel a sorral. Nem tetted meg, így a hibajelzés is jogos.
(#) jointsilver36 válasza vargaf hozzászólására (») Dec 3, 2017 /
 
Most akkor mit tegyek ?
(#) vargaf válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Már leírták, nem olvastad el?
Teendők
(#) jointsilver36 válasza vargaf hozzászólására (») Dec 3, 2017 1 /
 
Ha megkérlek áttírnád nekem ott a kódot ahol kell és elküldenéd? Mert megprobáltam és csak szívok vele .Nem értek a programozáshoz ,csak szerettem volna megépíteni a mérőműszert.
Arra nem gondoltak ,hogy nem mindenki programozó matematikus ,Csak írta volna oda a nyomi ,ne csináld meg mert csak szivatlak
A hozzászólás módosítva: Dec 3, 2017
(#) game4812 válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Ebből a kódból kitörlöd azt a sort, hogy "#error insert your used capacitance value here. Currently using 2uF. Delete this line after that", így menni fog. Ha 2 µF kondenzátort használtál, jól fog mérni. ha nem, akkor "capacitance = 2.E-6" ezt írd át alatta, a 2-est változtasd, például 1µF-nál 1-re. Semmi programozás nincs a dologban.
(#) vargaf válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Ne a közzétevőt szidd, ő jót tett közzé. Ha valamit szeretnél megépíteni, akkor tájékozódj, ha meghaladja a képességeidet keress más megoldást. Egy programsorból pár karaktert törölni nem igényel programozó matematikusi végzettséget. Egy megadott és leírt utasítás sort beszúrni nem okozhat gondot.
(#) jointsilver36 válasza vargaf hozzászólására (») Dec 3, 2017 /
 
  1. /*Thanks. Remember to visit my Youtube channel
  2.  If you don't whant to Serial print the valeus just delete the serial. print lines
  3.  and leave just the LCD print ones.
  4.  I've used a i2c LCD screen module.
  5.  */
  6. //LCD config
  7. #include <Wire.h>
  8. #include <LiquidCrystal_I2C.h>
  9. LiquidCrystal_I2C lcd(0x3f,20,4);  //sometimes the adress is not 0x3f. Change to 0x27 if it dosn't work.
  10.  
  11. //13 is the input to the circuit (connects to 150ohm resistor), 11 is the comparator/op-amp output.
  12. double pulse, frequency, capacitance, inductance, inductance__mH;
  13. void setup(){
  14.   lcd.init();
  15.   lcd.backlight();
  16.   Serial.begin(115200);
  17.   pinMode(11, INPUT);//output through a 150 ohm resistor to thr LC circuit
  18.   pinMode(12, OUTPUT);//Input  the comparator output//Use any other pin you
  19.   Serial.println("Hi there!");
  20.   delay(1000);
  21.   Serial.println("ELECTRONOOBS inductance meter");
  22.   delay(2500);
  23. }
  24. void loop(){
  25.   digitalWrite(12, HIGH);
  26.   delay(5);//give some time to charge inductor.
  27.   digitalWrite(12,LOW);
  28.   delayMicroseconds(100); //make sure resination is measured
  29.   pulse = pulseIn(11,HIGH,5000);//returns 0 if timeout
  30.   if(pulse > 0.1){ //if a timeout did not occur and it took a reading:
  31.  
  32.  
  33.  
  34.     capacitance = 2.E-6; // <- insert value here
  35.  
  36.  
  37.     frequency = 1.E6/(2*pulse);
  38.     inductance = 1./(capacitance*frequency*frequency*4.*3.14159*3.14159);//one of my profs told me just do squares like this
  39.     inductance *= 1E6; //note that this is the same as saying inductance = inductance*1E6
  40.     inductance_mH = inductance * 1000; //note that this is the same as saying inductance = inductance*1E6
  41.  
  42.     //Serial print
  43.     Serial.print("High for uS:");
  44.     Serial.print( pulse );
  45.     Serial.print("\tfrequency Hz:");
  46.     Serial.print( frequency );
  47.     Serial.print("\tinductance uH:");
  48.     Serial.println( inductance );
  49.     delay(10);
  50.  
  51.     //LCD print
  52.     lcd.clear();
  53.     lcd.setCursor(0,0);
  54.     lcd.print("uH Inductance mH");
  55.     lcd.setCursor(0,1);
  56.     lcd.print(inductance);
  57.     lcd.setCursor(10,1);
  58.     lcd.print(inductance_mH);        
  59.     delay(10);
  60.   }
  61. }
(#) jointsilver36 válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Így néz ki most a kód de így sem megy átt a nanoba.
(#) vargaf válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Idézet:
„a void setup felé egy "unsigned long inductance_mH;" sor megteszi.”


Ez hol van ebben a kódban?
(#) jointsilver36 válasza vargaf hozzászólására (») Dec 3, 2017 /
 
  1. /*Thanks. Remember to visit my Youtube channel
  2.  If you don't whant to Serial print the valeus just delete the serial. print lines
  3.  and leave just the LCD print ones.
  4.  I've used a i2c LCD screen module.
  5.  */
  6. //LCD config
  7. #include <Wire.h>
  8. #include <LiquidCrystal_I2C.h>
  9. LiquidCrystal_I2C lcd(0x3f,20,4);  //sometimes the adress is not 0x3f. Change to 0x27 if it dosn't work.
  10.  
  11. //13 is the input to the circuit (connects to 150ohm resistor), 11 is the comparator/op-amp output.
  12. double pulse, frequency, capacitance,
  13.   inductance, inductance__mH;
  14.   void setup(){
  15.   lcd.init();
  16.   lcd.backlight();
  17.   Serial.begin(115200);
  18.   pinMode(11, INPUT);//output through a 150 ohm resistor to thr LC circuit
  19.   pinMode(12, OUTPUT);//Input  the comparator output//Use any other pin you
  20.   Serial.println("Hi there!");
  21.   delay(1000);
  22.   Serial.println("ELECTRONOOBS inductance meter");
  23.   delay(2500);
  24. }
  25. unsigned long inductance_mH
  26. void loop(){
  27.   digitalWrite(12, HIGH);
  28.   delay(5);//give some time to charge inductor.
  29.   digitalWrite(12,LOW);
  30.   delayMicroseconds(100); //make sure resination is measured
  31.   pulse = pulseIn(11,HIGH,5000);//returns 0 if timeout
  32.   if(pulse > 0.1){ //if a timeout did not occur and it took a reading:
  33.  
  34.  
  35.  
  36.     capacitance = 2.E-6; // <- insert value here
  37.  
  38.  
  39.     frequency = 1.E6/(2*pulse);
  40.     inductance = 1./(capacitance*frequency*frequency*4.*3.14159*3.14159);//one of my profs told me just do squares like this
  41.     inductance *= 1E6; //note that this is the same as saying inductance = inductance*1E6
  42.     inductance_mH = inductance * 1000; //note that this is the same as saying inductance = inductance*1E6
  43.  
  44.     //Serial print
  45.     Serial.print("High for uS:");
  46.     Serial.print( pulse );
  47.     Serial.print("\tfrequency Hz:");
  48.     Serial.print( frequency );
  49.     Serial.print("\tinductance uH:");
  50.     Serial.println( inductance );
  51.     delay(10);
  52.  
  53.     //LCD print
  54.     lcd.clear();
  55.     lcd.setCursor(0,0);
  56.     lcd.print("uH Inductance mH");
  57.     lcd.setCursor(0,1);
  58.     lcd.print(inductance);
  59.     lcd.setCursor(10,1);
  60.     lcd.print(inductance_mH);        
  61.     delay(10);
  62.   }
  63. }
(#) berkesandor hozzászólása Dec 3, 2017 /
 
Projektemben külső tápot használok, nem a mini sajátját.
Ezzel együtt működik a sim modul kommunikációja: Bővebben: Link

Ezzel meg nem: Bővebben: Link

Mi a okozhatja ?
(#) tbarath válasza vargaf hozzászólására (») Dec 3, 2017 /
 
Nem az a baj.
Vagyis az, de nem úgy.

A letölthető kódban ez a deklaráció:
  1. double pulse, frequency, capacitance, inductance, inductance__mH;

Tehát "inductance__mH" 2 aláhúzással. Itt egy aláhúzás kell.
Valamint a LiquidCrystal_I2C.h lib-et is telepíteni kell, ha még nincs. Ezekkel - és persze a kapacitás előtti hibasor törlésével együtt - már fordul.
(#) tbarath válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Rossz helyre tetted és hiányzik a végéről a pontosvessző.
Értem én, hogy nem tudsz programozni, de akkor is katasztrófa amit itt művelsz. Kb. ugyanazt a kódot beírtad 3x, hibaüzenetet semmit nem írsz, így nehéz segíteni...
Az előző kommentemben ott a megfejtés egyébként...
A hozzászólás módosítva: Dec 3, 2017
(#) vargaf válasza tbarath hozzászólására (») Dec 3, 2017 /
 
Én csak idéztem egy másik hozzászólásból, nem is néztem végig a kódot.
(#) RoliNyh válasza benjami hozzászólására (») Dec 3, 2017 /
 
Pfff, mégis mennyi kellene, hogy működjön?
(#) tbarath válasza vargaf hozzászólására (») Dec 3, 2017 /
 
Vágom, én meg letöltöttem és lefordítottam, aztán kiszúrta a szememet. Zavaró az ilyen typo, a kezdő versenyzőket jól megszívatja ezzel...
(#) jointsilver36 válasza tbarath hozzászólására (») Dec 3, 2017 /
 
Ez a hibaüzenet.

hibakod.jpg
    
(#) jointsilver36 válasza tbarath hozzászólására (») Dec 3, 2017 /
 
Már az is nagy segítség lenne ha valaki feltenné id e a kódot úgy ,hogy működik és már nem is zavarnák senkit.Amúgy meg lehet én meg olyat tudok ami másnak szívás nekem meg logikus és kézenfekvő.
(#) jointsilver36 válasza tbarath hozzászólására (») Dec 3, 2017 /
 
Ez telepítve van.LiquidCrystal_I2C.h
(#) tbarath válasza jointsilver36 hozzászólására (») Dec 3, 2017 /
 
Igen, az a hiba, hogy nem zártad le pontosvesszővel az előző sorban a deklarációt.

Amúgy nem az a baj, hogy nem tudsz programozni. Az a baj, hogy nehéz így segíteni, pedig hidd el, hogy szeretnénk.

Mellékletben a kód (az erroros részt visszatettem ha jól emlékszem, mert lehet hogy megépítem én is ezt egyszer, aztán emlékezzek rá).
A hozzászólás módosítva: Dec 3, 2017
(#) benjami válasza RoliNyh hozzászólására (») Dec 3, 2017 /
 
Írd meg a programot mondjuk atmega328-ra, a fordító ki fogja írni, hogy mennyi memóriát foglal.
(#) jointsilver36 válasza tbarath hozzászólására (») Dec 3, 2017 /
 
Ez milyen program?
Következő: »»   401 / 853
Bejelentkezés

Belépés

Hirdetés
XDT.hu
Az oldalon sütiket használunk a helyes működéshez. Bővebb információt az adatvédelmi szabályzatban olvashatsz. Megértettem