Szerintem érdemes venni egy programozót. Magam régebben avrisp mk2 manapság pedig atmel ice eszközt használok. Ezekkel beégethető a prociba egy bootloader amivel már programozó nélkül lehet frissíteni a proci tartalmát.
Sziasztok, Arduino map() függvény kódban és rc szervo vezérléssel kapcsoltban kérnék segítséget privátban. A példaprogram működik, a feladat matematikai részével vagyok számszakilag bajban. Egy potméter jelére mozog az rc szervő, de ha egy másik potméterrel úgymond limitet állítok be, akkor a szervó kitérés a limit plafon elérése után visszafelé indul, úgymond visszaszabályoz. A map függvény utolsó tagjához (a servo max) kell berakni egy változót, ami limit beállító potméter adataiból táplálkozik, ha jól kalkulálok.
Üdv.: Sys_m
Törölt felhasználó
2021-08-17 20:08:38
[1954]
Visual Studio Code stm32 projekt alat hibakod jön valaki tudja e mi okoza mindegyik beálitásnál hhasonlit a hiba! funkcio beállitások: ;default_envs = VARIANT_ADC ; Variant for control via ADC input default_envs = VARIANT_USART ; Variant for Serial control via USART3 input ;default_envs = VARIANT_NUNCHUK ; Variant for Nunchuk controlled vehicle build ;default_envs = VARIANT_PPM ; Variant for RC-Remotes with PPM-Sum signal ;default_envs = VARIANT_PWM ; Variant for RC-Remotes with PWM signal ;default_envs = VARIANT_IBUS ; Variant for RC-Remotes with FLYSKY IBUS ;default_envs = VARIANT_HOVERCAR ; Variant for HOVERCAR build ;default_envs = VARIANT_HOVERBOARD ; Variant for HOVERBOARD ;default_envs = VARIANT_TRANSPOTTER ; Variant for TRANSPOTTER build https://github.com/NiklasFauth/hoverboard-firmware-hack/wiki/Build-Instruction:-TranspOtter https://hackaday.io/project/161891-transpotter-ng ;default_envs = VARIANT_SKATEBOARD ; Variant for SKATEBOARD build controlled via RC-Remotes with PWM signal
Mega 2560 3r -re szerettem volna valamelyik MARLIN programot feltölteni. Az Arduino IDE vel lefordítottam hibaüzenet nélkül, fel is töltöttem. Nem működött megfelelően, pontosabban sehogy.
Ezért egy korábban jól működő .HEX filet kerestem, mind a flash-, mind az eprom -ra. Ezeket az AVRDUDES -el töltöttem le.
Kijelöltem a filekat írásra, elindítottam a folyamatot.
Először a flash -t töltöttem föl, ami a dudes szerint rendben fel is ment.
Ezután folytatta volna az eprom töltését, de ez már nem ment, time out hibával megszakadt a folyamat.
Ezután a 2560 -hoz nem tudtam hozzáférni....
Ma USBASP programozóval próbálkoztam. Programot nem tudtam feltölteni, de megpróbáltam a bootloader beégetést.
Ez sikerült. Ezt követően rendesen hozzáfértem a panelhez a szokott módon.
Mi lehet a probléma? A dudes használata eddig nem okozott gondot.
Törölt felhasználó
2021-08-11 13:10:11
[1952]
servo példa müködik vele ha ez csak a kérdés RC ESC vezérlő ugyan az csak nincs hall viszacsatolás.... Most futatok egy hasonló projektet hc12 uart távirányitos alapon irányváltás, sebbeség szabályzás ... De a uart paracs mindegy mind küldesz el eredmény ugyanaz bluetools,wifi,lora,hc12(433,896),stb...
val1=digitalRead(inVal1); if (val1 == 1){ //Turn val1 to HIGH state stateVal="1";} else{ stateVal="0"; }
if(WiFi.status() != WL_CONNECTED){ WiFi.begin(ssid, password); delay(500); }else{ http.begin("192.168.4.1", 80, "/led/"+stateVal); int httpCode1 = http.GET(); //get value delay(100); } }
-------
server ------ /* * * https://www.14core.com/wiring-programming-esp8266-1212e-nodemcu-wifi-remote-clientserver-mode/ 14CORE | ESP8266 to ESP8266 Remote Client & Server Test /------------------------ SERVER ---------------------/ */
„The size of data from ESP8266 is too big for arduino sometimes, so the library can't receive the whole buffer because the size of the hardware serial buffer which is defined in HardwareSerial.h is too small.
Open the file from \arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.h.
See the follow line in the HardwareSerial.h file.
#define SERIAL_BUFFER_SIZE 64
The default size of the buffer is 64. Change it into a bigger number, like 256 or more.”
Igen, arduino alapú, léptetőmotoros hajtással. Sajnos a héten kénytelen voltam a próbaüzemet befejezni, mert ez a hét az unokáé. A hátsó rész oda-vissza mozgatható manuálisan, vagy végállásra futással. Az első rész egy fokos lépésekkel pozicionálható előre-hátra. Be lehet állítani a menetszámot, tekercs hosszat, huzal átmérőt. Ez utóbbinál be lehet írni a huzal átmérőt, vagy az AWG szám alapján. Van még egy pár programozási ötletem, de ez majd közben kialakul.
Egy barátom vett valahol a neten egy ArdunoMegás, Ramps v1.4-es tekercselőgép szerűséget. A működése borzalom, tele hibákkal. (szerintem valaki kezdő írhatta az Arduino programját)
Megkért engem valamit találjak ki.
Sajnos én nem értek a programozáshoz, de ha valaki ismer nyílt forráskódú cuccot azt azért meg tudnám neki építeni.
Semmi extra, a szál vastagság függvényében kellene vezetni a szálat és egy beállított tekercshossz méret szerint irányt váltogatni. A szálvezetést léptetőmotorral, golyósorsóval gondolnánk működtetni.
Ha tud valaki ilyesmit kérem jelezze!
Törölt felhasználó
2021-05-17 14:29:42
[1937]
Nem tudom ez itt valakit érdekelné, de csináltam egy Arduino Uno kontroll dobozt a CNC-mre ami egy léptető motort örökké forgatja. Ide berakom az Arduino kódot mert itt gondolom több a programozással foglalkozó mint más téma alatt.
//------------------------------------------------------------------------------------------------------------ // // Version information to display at start: // #define Ver_nr 10 #define Ver_date 20210516 // // This software is created by Adapting Camera. You are free to use it in a non-commercial basis. // // YouTube: https://www.youtube.com/c/AdaptingCamera/videos // Blogger: https://adapting-camera.blogspot.com/ // // This is a program to run a stepper motor an infinite number of steps in CW or CCW direction // to allow constant rotation. The idea is to use a 4th axis of a CNC as a lathe. // This will result in a sort of "poor man's lathe", with limited useability, but enough for my needs for now. // // Functionality is simple, three buttons, one for each direction and one for stoping the stepper rotation. // Maximum speed is 380 rpm in this implementation, which in my case is equal to 2280 RPM for the stepper // motor, due to the 1/6 reduction gear I have. The chuck RPM can be set via a rotational encoder // between 0 - Chuck_rpm_max, which is set to 380 below. // If used with faster motors or a different gear ratio then Gear_Ratio and Chuck_rpm_max must be changed. // // Stepper motor acceleration and deceleration is implemented, which can be set in seven steps. // Fastest is Max_Acceleration (7000) steps/s² and that value is divided by the value of the BCD wheel value. // The push button of the rotary encoder is connected to the Arduino reset and acts as an emergency stop. // // Uses interrupt for the stepper pulse generation and also for the rotary encoder handling. // The rotary encoder is using a simple acceleration parameter, rotating the kob very fast results in jumps // of ten units per detent, less fast results in jumps of 5 units per detent, and slow rotation results in // one unit per detent. The drawback of using interrupt on the rotarional encoder is that if the knob is // rotated very fast it may interfere with the timing of stepper pulses, which may stop the stepper, or // result in step loss and loud bang when the stepper jumps into roattion again. This can only be avoided // if the RPM is left alone during stepper rotation, or if the rotary encoder would be handled outside // the interrupt handling routines, but in that case reading the encoder would present a problem. // The three buttons are outside the interrupt chain and are read in the normal program loop. This has the // Disadvantage of a bit slower reaction, so an very short push may not result in any reaction. // I may change this later to handle it as state change IRQ on the inputs, but I think this is good enough. // // The last used RPM is saved in the EEPROM every time one of the two rotation direction button is pressed. // This saved value is read back after each reset or after powering up the unit. // // This code is tested only with Arduino Uno, but it will probably work also with other Arduino devices. // // Good luck. // #include "FastAccelStepper.h" #include <LiquidCrystal.h> #include <EEPROM.h> #include <RotaryEncoder.h>
int Gear_Ratio = 6.0; // 6:1 gear in rotary axis float Chuck_rpm_k = (1/0.15) * Gear_Ratio; // This is a constant which is used for chuck RPM for frequency conversion int Chuck_rpm_max = 380; // Maximum rpm for the chuck int Running_rpm; // This is the speed now
int SpeedInHz; int Acceleration; // Set after the read of BCD wheel #define Max_Acceleration 7000 // Set as default acceleration 7000 steps/s²
volatile byte A_Flag = 0; // Rising edge on pinA to signal that the encoder has arrived at a detent volatile byte B_Flag = 0; // Rising edge on pinB to signal that the encoder has arrived at a detent volatile int Encoder_Pos = 0; // Current value of encoder position. volatile byte EEPROM_Enc_pos = 0; // EEPROM adress of the saved encoder position. This adress read at start. volatile int Old_Enc_Pos = 0; // Last encoder position value. volatile byte Reading = 0; // Direct values read from our interrupt pins before checking to see if moved a whole detent volatile int ms = 0; // Time between roraty encoder pulses
FastAccelStepperEngine Engine = FastAccelStepperEngine(); FastAccelStepper *A_stepper = NULL; LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // Use these IO pins for LCD RS,E,D4,D5,D6,D7 RotaryEncoder Rotary(pinA, pinB, RotaryEncoder::LatchMode::FOUR3);
void setup() { Serial.begin(115200); lcd.begin(16, 2); // Initialize the 16 x 2 LCD
byte hiByte = EEPROM.read(EEPROM_Enc_pos); // Read the last saved speed before reset byte loByte = EEPROM.read(EEPROM_Enc_pos + 1); Encoder_Pos = word(hiByte, loByte); // Need to split the integer into two bytes for the EEPROM
digitalWrite(RightButton, HIGH); //use the internal pullup resistor digitalWrite(DownButton, HIGH); //use the internal pullup resistor digitalWrite(LeftButton, HIGH); //use the internal pullup resistor
digitalWrite(BCD_0, HIGH); //use the internal pullup resistor digitalWrite(BCD_2, HIGH); //use the internal pullup resistor digitalWrite(BCD_4, HIGH); //use the internal pullup resistor
pinMode(pinA, INPUT_PULLUP); // Set pinA as an input, pulled HIGH pinMode(pinB, INPUT_PULLUP); // Set pinB as an input, pulled HIGH attachInterrupt(0,PinA,RISING); // Set an interrupt on PinA for a rising edge and execute PinA ISR attachInterrupt(1,PinB,RISING); // Set an interrupt on PinB for a rising edge and execute PinB ISR
//------------------------------------------------------------------------------------------------------------ // // Start the main loop // // Read the BCD wheel, the rotary encoder and three buttons in the loop. // void loop() {
//------------------------------------------------------------------------------------------------------------ // // Read the BCD encoder and set acceleration accordingly. // The acceleration is set by dividing Max_Acceleration with the value of the encoder. // Read_BCD = PINC & B00111000; // Read port C and mask the BNC encoder bits Read_BCD = Read_BCD >> 3; // Right shift 3 times if(Old_BCD != Read_BCD) { Acceleration = Max_Acceleration / Read_BCD; // Calculate the divisor A_stepper->setAcceleration(Acceleration); // Set the new acceleration value Old_BCD = Read_BCD; DisplayOnLCD(); }
//------------------------------------------------------------------------------------------------------------ // // Read the rotary encoder and set chuck rpm accordingly. // The rpm is set through converting the encoder value to pulse time in microseconds. // This value is used as speed value for the stepper. // if(Old_Enc_Pos != Encoder_Pos) { // ms = Rotary.getMillisBetweenRotations(); if ( Encoder_Pos <= 0 ) { Encoder_Pos = 0; SpeedInHz = 0; } else { if ( Encoder_Pos >= Chuck_rpm_max ) { Encoder_Pos = Chuck_rpm_max; } } Old_Enc_Pos = Encoder_Pos; if ( Encoder_Pos << 0 ) { SpeedInHz = (Encoder_Pos * Chuck_rpm_k); } DisplayOnLCD(); attachInterrupt(0,PinA,RISING); // Set an interrupt on PinA, looking for a rising edge signal and executing the "PinA" Interrupt Service Routine (below) attachInterrupt(1,PinB,RISING); // Set an interrupt on PinB, looking for a rising edge signal and executing the "PinB" Interrupt Service Routine (below) }
//------------------------------------------------------------------------------------------------------------ // // Read buttons to set rotation direction or to stop the rotation // if ( digitalRead(DownButton) == false) { // Stop with decelerating to zero RPM A_stepper->stopMove(); Running_rpm = 0; DisplayOnLCD(); delay (2000); }
if (digitalRead(LeftButton) == false) { // Set CCW rotation... if (Running_CW == true) { // ...but only if not rotating to CCW now. A_stepper->stopMove(); delay (2000); Running_CW = false; } if ( Encoder_Pos >> 0 ) { A_stepper->setAcceleration(Acceleration); A_stepper->setSpeedInHz(SpeedInHz); A_stepper->runBackward(); } else { A_stepper->stopMove(); } Running_rpm = Encoder_Pos; DisplayOnLCD(); EEPROM.write(EEPROM_Enc_pos, highByte(Encoder_Pos)); // Save in EEPROM the current speed as last speed EEPROM.write(EEPROM_Enc_pos + 1, lowByte(Encoder_Pos)); }
if ( digitalRead(RightButton) == false) { // Set CW rotation... if (Running_CW == false) { // ...but only if not rotating to CW now. A_stepper->stopMove(); delay (2000); Running_CW = true; } if ( Encoder_Pos >> 0 ) { A_stepper->setAcceleration(Acceleration); A_stepper->setSpeedInHz(SpeedInHz); A_stepper->runForward(); } else { A_stepper->stopMove(); } Running_rpm = Encoder_Pos; DisplayOnLCD(); EEPROM.write(EEPROM_Enc_pos, highByte(Encoder_Pos)); // Save in EEPROM the current speed as last speed EEPROM.write(EEPROM_Enc_pos + 1, lowByte(Encoder_Pos)); } delay(100); }
void DisplayOnLCD() { lcd.setCursor(0,0); // Erase the display lcd.print(" "); lcd.setCursor(0,1); lcd.print(" "); lcd.setCursor(0,0); // Display the values lcd.print("Set RPM: "); lcd.print(Encoder_Pos); lcd.setCursor(0,1); lcd.print("Run RPM: "); lcd.print(Running_rpm); if (Running_rpm == 0) { lcd.setCursor(12,1); lcd.print("STOP"); } else { if (Running_CW == false) { lcd.setCursor(13,1); lcd.print("CCW"); } else { lcd.setCursor(13,1); lcd.print("CW"); } } } //------------------------------------------------------------------------------------------------------------ // // Interrupt handling routines for the rotation encoder to interpret left or right rotation. // The rotation will increment or decrement the value of Encoder_Pos. // Time between pulses is beasured and acceleration is applied if it is faster than 150ms between pulses. // void PinA(){ Rotary.tick(); ms = Rotary.getMillisBetweenRotations();
detachInterrupt(PinA); // Disable interrupts to stop happening before we read pin values Reading = PIND & 0xC; // Read all eight pin values then strip away all but pinA and pinB's values if(Reading == B00001100 && A_Flag) { // Check that we have both pins at detent (HIGH) and that we are expecting detent on this pin's rising edge Encoder_Pos --; // Decrement the encoder's position count if ( ms <= 150) { // Accelerate the counting if time between pulses is shorter than 150ms if ( ms <= 25){ Encoder_Pos = Encoder_Pos - 9; // Decrement 9 each time if time between pulses is shorter than 25ms } else { Encoder_Pos = Encoder_Pos - 5; // Else decrement 4 } } if (Encoder_Pos <= 0) { Encoder_Pos = 0; } B_Flag = 0; // Reset flags for the next turn A_Flag = 0; } else if (Reading == B00000100) B_Flag = 1; // Signal that we're expecting pinB to signal the transition to detent from free rotation // Enable interrupts again in the main loop }
void PinB(){ Rotary.tick(); ms = Rotary.getMillisBetweenRotations(); detachInterrupt(PinB); // Disable interrupts to stop happening before we read pin values Reading = PIND & 0xC; // Read all eight pin values then strip away all but pinA and pinB's values if (Reading == B00001100 && B_Flag) { // Check that we have both pins at detent (HIGH) and that we are expecting detent on this pin's rising edge Encoder_Pos ++; // Increment the encoder's position count if ( ms <= 150) { // Accelerate the counting if time between pulses is shorter than 150ms if ( ms <= 25){ Encoder_Pos = Encoder_Pos + 9; // Add 9 each time if time between pulses is shorter than 25ms } else { Encoder_Pos = Encoder_Pos + 4; // Else add 4 } } if (Encoder_Pos >= Chuck_rpm_max) { Encoder_Pos = Chuck_rpm_max; } B_Flag = 0; // Reset flags for the next turn A_Flag = 0; } else if (Reading == B00001000) A_Flag = 1; // Signal that we're expecting pinA to signal the transition to detent from free rotation // Enable interrupts again in the main loop }
Sziasztok! Szeretném megtudni, hogy az A4988 bipoláris vezérlőt, ha 16-od mikrosteppel használom, milyen gyors legyen a STEP jel. Mennyi legyen a jel hossza és a két magas állapot közti szünet hossza. Közönöm.
Törölt felhasználó
2021-04-27 20:02:04
[1929]
Jobban preferálom a wmwaret legvalosabb a hadweres szimulácioja ez a funkció vissza álitja alaphelyzetre amit beálitotál honan induljon az adot rendszer... Erösen ajánlot az ssdröl... vmware non persistent disk
Modult telepiteted nem kell mindig max uj winfosnál csak... De nehéz kiszedni teljesen ami beépült regedit,user map,data folderekböl ... Más.. W10 ami frisitős verzios az teljesen felborit mindent mert direkt fejlesztős környezetre LTSC verziot használnak .... De ajánlom a virtuális oprendszer (virtualbox,wmvare) alatti kisérletézeket ott alap helyzetbe vissza álitható az oprendszer ahonan inditod ha be van álitva ez a funkció igy végtelen probálkozások száma ...
Az az átkozott "kisördög" csak piszkálódik! Ha újra megpróbálkozok ezekkel a parancsokkal, és újra nem működik, akkor mennyi esélyem lehet a mostani állapot visszaállítására?
Open source szinte mindig ráfizetés forrás vagy motor (környezet) szinte mindig van verzios kiadási problémák és csak néha időhuzás lesz belöle ... Fejlesztöi szintü emberkék kérdezve küzdenek a fenti problémákal forumokon jól is látszik...
Nos én is ezzel kezdtem! Mert ezt megtaláltam én is. De a tegnap esti képernyőkép készítése óta működik!!! Lefuttattam egy pár soros kis kódocskát legalább 10x és nem állt le, nem fagyott meg!!! Lehet, hogy elkiabálom, de úgy tűnik hogy MŰKÖDIK! Vagy csak megijedt a konkurenciától, mert már a Mach3-at is feltelepítettem mérgemben.
Microsoft Windows [Version 10.0.19042.928] (c) Microsoft Corporation. Minden jog fenntartva.
C:\Windows\system32>pip install python3 python3-pyqt5 python3-serial ERROR: Could not find a version that satisfies the requirement python3 (from versions: none) ERROR: No matching distribution found for python3 WARNING: You are using pip version 20.2.3; however, version 21.1 is available. You should consider upgrading via the 'c:\users\arany\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
C:\Windows\system32>'get' is not recognized as an internal or external command, ''get'' is not recognized as an internal or external command, operable program or batch file.
Ez meg a fordítás:
C: \ Windows \ system32> 'get' nem ismerhető fel belső vagy külső parancsként, '' get '' nem ismerhető fel belső vagy külső parancsként, működőképes program vagy kötegelt fájl.
Egy ilyen megoldja a problémádat... Fö probléma pc gnd és a védöföld közös ponton van (asztali pc táp ilyen) ahol a zavar bemegy motorok gerjesztése miat az usb busz részén adat hibákat okoz mert ott is jelen van... teljes elszigetelés kell csinálni fenti eszköz megoldja!
Biztos tök rossz értékek a dos os pc hez képest. (Ja ehhez is kell dos vagy win98 hogy összerakd) Ja mégse rossz, nem kezeli a robsy dos alatt lpt portról a +-10V jelet, meg 3 mérőlécet vagy encodert...Hát az csak egy vezérlő, ez meg szabályzó(mégha vezérlőnek is hívjuk). Step dir es világon túl is van élet.