Mutabor 251 Posted September 16 Парни, а есть у кого прошивка MMJOY2 для трёхосных педалей ВКБ 19-3? Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted September 16 5 минут назад, Mutabor сказал: Парни, а есть у кого прошивка MMJOY2 для трёхосных педалей ВКБ 19-3? А в педалях контроллер Ардуина про микро? Share this post Link to post Share on other sites
Mutabor 251 Posted September 16 3 минуты назад, MYCYJIbMAHUH сказал: А в педалях контроллер Ардуина про микро? А как посмотреть? Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted September 16 (edited) 7 минут назад, Mutabor сказал: А как посмотреть? Можно разобрать девайс и посмотреть Можно у производителя поспрашивать Можно запустить конфигуратор mmjoy-2 и попробовать педалям нелинейность накрутить. Можно просто мне поверить на слово-у ваших педалей контроллер не совместим с mmjoy-2. По последнему пункту могу крупно ошибаться. Edited September 16 by MYCYJIbMAHUH Share this post Link to post Share on other sites
Mutabor 251 Posted September 16 Только что, MYCYJIbMAHUH сказал: Можно просто мне поверить на слово-у ваших педалей контроллер не совместим с mmjoy-2. ok, поверю вам на слово. Share this post Link to post Share on other sites
Vumpel18 758 Posted September 16 (edited) Для этого существует программа для определения прошивки USB устройств. Брать по ссылке http://vkb-sim.pro/support/software/. Почему возник вопрос прошивки по упомянутым педалям? Edited September 16 by Vumpel18 Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 16 18 минут назад, Mutabor сказал: ok, поверю вам на слово. кидай сюда фото контролера Share this post Link to post Share on other sites
Mutabor 251 Posted September 16 Спасибо, настроил(откалибровал). А то на левую педаль тяга подвесилась... Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 18 (edited) Тумблер с фиксацией ON -OF вот так пишут надо цитата" В софте все прекрасно настравивается. Подключаетесь к двум ножкам тумблера, если их три то к средней и крайней. Например тумблер у нас будет физ. кнопка 1, указываем ее в двух окошках, выбираем режим тумблер ВКЛ, а в другом ВЫКЛ. Указываем таймер и записываем в контроллер. Теперь при замыкании одна кнопка срабатывает, а при размыкании вторая." сделал как написано не работает вообще тумблер.... ? Сделал так и работает в DCS, тумблер ON -OF кнопка логическая 2 одно положение on и кнопка логическая 3 другое положение тумблера. Но в ИЛ2 БзС работает только как в одном положении ON Как сделать Тумблер с фиксацией ON -OF работающем как две логические кнопки везде, при замыкании одна кнопка срабатывает, а при размыкании вторая? Таймер выставлен 100 мс. Edited September 18 by =N=Bonaparte Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 18 Всё заработало таймер правильно поставил ОН, а неправильно ОН-ОФ ставил не работал. Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 19 (edited) 03.08.2016 в 14:39, mega_mozg_13 сказал: MMJOY2 (бесплатная прошивка и софт для самодельного контроллера джойстика) Уважаемый Мегамозг, множишь увеличить количество на шифт кнопок,"32 + хатка", побольше надо? Edited September 19 by =N=Bonaparte Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 19 в темноте напечатал , сорри Share this post Link to post Share on other sites
huligan 928 Posted September 22 12.09.2019 в 16:51, Vumpel18 сказал: Не забывать как работает режим загрузчика. в смысле? Share this post Link to post Share on other sites
Vumpel18 758 Posted September 22 23 минуты назад, huligan сказал: в смысле? В режиме Bootloader 8-мь секунд и с другим com портом. 1 Share this post Link to post Share on other sites
oldracoon 12 Posted September 23 Не понимаю в чем дело: Задействовал семь осей с обычных потенциометров на 10 кОм, но одна из осей работает ровно на четверть хода. Такая проблема с осью, которую подключаю на D7 или B4. Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted September 23 50 минут назад, oldracoon сказал: Не понимаю в чем дело: Задействовал семь осей с обычных потенциометров на 10 кОм, но одна из осей работает ровно на четверть хода. Такая проблема с осью, которую подключаю на D7 или B4. Попробуйте"сохранить с центром". Share this post Link to post Share on other sites
oldracoon 12 Posted September 23 Ну помогло конкретно для этой оси выставить точность 12 бит (остальные все по 10). Не знаю насколько так правильно, но теперь все работает хорошо. Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 23 8 часов назад, oldracoon сказал: Не понимаю в чем дело: Задействовал семь осей с обычных потенциометров на 10 кОм, но одна из осей работает ровно на четверть хода. Такая проблема с осью, которую подключаю на D7 или B4. У меня так же часто бывает на последней прошивке (ТЛЕ и КМА200), раньше не было. Share this post Link to post Share on other sites
oldracoon 12 Posted September 24 Кстати, а можно уточнить? Последняя пошивка это какая и где ее можно взять? Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted September 24 2 часа назад, oldracoon сказал: Кстати, а можно уточнить? Последняя пошивка это какая и где ее можно взять? https://sites.google.com/site/mmjoyproject/fajly-dla-skacivania Share this post Link to post Share on other sites
huligan 928 Posted September 28 платка прошиваю скетч Logitech_Shifter_USB.zip схема в arduino-1.8.3,arduino-1.8.7,arduino-1.8.10 всё,как тут но кнопки(передачи) 3 и 4 нажимают 5-ю и 6-ю кнопки(как и 5-я и 6-я) что не так? может через MMJOY2 можно прошить,но как там потом настроить? Share this post Link to post Share on other sites
huligan 928 Posted September 28 (edited) Я понял,в чём у меня проблема. Там на ручке обычный 2-х осный джойстик,на который по углам отклонения прилеплены кнопки(при определённом угле наклона ручки отрабатывается назначенная кнопка,Угол отклонения по оси Х+угол по оси Y даёт нажатие кнопки) Но у меня ручка на коробке передач по середине имеет приличный люфт и при положении по центру вверх(вниз) перемещается правее и по скетчу нажимается кнопка 5(или 6),а если переместить ручку вверх(вниз) и придержать рукой левее до упора,то отрабатывается правильная кнопка 3(или 4 внизу) Кто подскажет,как отредактировать скетч,чтобы 3 и 4 кнопки срабатывали и при небольшом отклонении вправо? пробовал увеличивать x>HS_XAXIS_56 до x>HS_XAXIS_100 +меняя и в строке #define HS_XAXIS_56 500 на #define HS_XAXIS_100 500 но всё по прежнему.Не могу понять,что тут нужно изменять??? Logitech_Shifter_USB.zip отбой воздушной тревоги Сам нашёл,что нужно исправить! #define HS_XAXIS_56 500 на #define HS_XAXIS_56 600 ----------------- как бы поудалять кучу мусора в моих постах выше? Edited September 28 by huligan Share this post Link to post Share on other sites
huligan 928 Posted September 29 Как изменить имя игрового устройство через regedit ? сам нашёл. Почему нельзя ни удалить,ни изменить своё сообщение в форуме?(((((((((((((((((((😡 Share this post Link to post Share on other sites
huligan 928 Posted September 29 (edited) что нужно изменить в скетче,чтобы отображались оси джойстика? И как добавить ещё две кнопки по краям Y-оси при максимальных отклонениях? и как активировать в скетче HANDBRAKE_MODE ? Скрытый текст //Logitech Driving Force Shifter USB Adapter //By Armandoiglesias 2018 //Based on Jason Duncan functionreturnfunction Project //Video tutorial https://www.youtube.com/watch?v=dLpWEu8kCec //Use Arduino Leonardo //Install Joystick Library //Attribution-NonCommercial-NoDerivatives 4.0 International #include <Joystick.h> // Create the Joystick Joystick_ Joystick; // H-shifter mode analog axis thresholds #define HS_XAXIS_12 400 #define HS_XAXIS_56 600 #define HS_YAXIS_135 800 #define HS_YAXIS_246 300 // Sequential shifter mode analog axis thresholds #define SS_UPSHIFT_BEGIN 670 #define SS_UPSHIFT_END 600 #define SS_DOWNSHIFT_BEGIN 430 #define SS_DOWNSHIFT_END 500 // Handbrake mode analog axis limits #define HB_MAXIMUM 530 #define HB_MINIMUM 400 #define HB_RANGE (HB_MAXIMUM-HB_MINIMUM) // Digital inputs definitions #define DI_REVERSE 1 #define DI_MODE 3 #define DI_RED_CENTERRIGHT 4 #define DI_RED_CENTERLEFT 5 #define DI_RED_RIGHT 6 #define DI_RED_LEFT 7 #define DI_BLACK_TOP 8 #define DI_BLACK_RIGHT 9 #define DI_BLACK_LEFT 10 #define DI_BLACK_BOTTOM 11 #define DI_DPAD_RIGHT 12 #define DI_DPAD_LEFT 13 #define DI_DPAD_BOTTOM 14 #define DI_DPAD_TOP 15 // Shifter state #define DOWN_SHIFT -1 #define NO_SHIFT 0 #define UP_SHIFT 1 // Shifter mode #define SHIFTER_MODE 0 #define HANDBRAKE_MODE 1 // LED blink counter int led=0; // Shifter state int shift=NO_SHIFT; // Handbrake mode int mode=SHIFTER_MODE; int b[16]; int gear=0; // Default value is neutral // Constant that maps the phyical pin to the joystick button. //const int pinToButtonMap = 9; void setup() { // G29 shifter analog inputs configuration pinMode(A0, INPUT_PULLUP); // X axis pinMode(A2, INPUT_PULLUP); // Y axis pinMode(2, INPUT); for(int i=0; i<16; i++) b = 0; b[DI_MODE] =0; // Initialize Joystick Library Joystick.begin(); } // Last state of the buttonint lastButtonState = 0; void loop() { int x=analogRead(0); // X axis int y=analogRead(2); // Y axis int _isreverse = digitalRead(2); int _gear_ = 0; if( _isreverse == 1 ){ _gear_ = 8; b[DI_REVERSE]= 1; }else{ if(b[DI_MODE]==0) // H-shifter mode? { if(x<HS_XAXIS_12) // Shifter on the left? { if(y>HS_YAXIS_135) _gear_=1; // 1st gear if(y<HS_YAXIS_246) _gear_=2; // 2nd gear } else if(x>HS_XAXIS_56) // Shifter on the right? { if(y>HS_YAXIS_135) _gear_=5; // 5th gear if(y<HS_YAXIS_246) _gear_=6; // 6th gear } else // Shifter is in the middle { if(y>HS_YAXIS_135) _gear_=3; // 3rd gear if(y<HS_YAXIS_246) _gear_=4; // 4th gear } } } if(gear!=6) b[DI_REVERSE]=0; // Reverse gear is allowed only on 6th gear position if (_gear_ != gear ){ gear = _gear_; desactivar(); Joystick.setButton(gear-1, HIGH); } delay(50);} void desactivar(){ // Depress virtual button for current gear for(int i = 0; i <= 10 ; i++ ) Joystick.setButton(i, LOW);} Edited September 29 by huligan Share this post Link to post Share on other sites
huligan 928 Posted September 29 (edited) нашёл скетч для аквивации осей на ручке(оставил только 2 нужных оси) Скрытый текст #include <Joystick.h> Joystick_ Joystick; int zAxis_ = 0; int RyAxis_ = 0; const bool initAutoSendState = true; void setup() { Joystick.begin(); } void loop(){ zAxis_ = analogRead(A0); zAxis_ = map(zAxis_,0,1023,0,255); Joystick.setZAxis(zAxis_); RyAxis_ = analogRead(A2); RyAxis_ = map(RyAxis_,0,1023,0,255); Joystick.setRyAxis(RyAxis_); delay (50); } //AMSTUDIO Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. Вопрос-как объединить эти скетчи,чтобы и кнопки и оси работали? скетчи базируются на Joystick.cpp Скрытый текст /* Joystick.cpp Copyright (c) 2015-2017, Matthew Heironimus This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "Joystick.h" #if defined(_USING_DYNAMIC_HID) #define JOYSTICK_REPORT_ID_INDEX 7 #define JOYSTICK_AXIS_MINIMUM -32767 #define JOYSTICK_AXIS_MAXIMUM 32767 #define JOYSTICK_SIMULATOR_MINIMUM -32767 #define JOYSTICK_SIMULATOR_MAXIMUM 32767 #define JOYSTICK_INCLUDE_X_AXIS B00000001 #define JOYSTICK_INCLUDE_Y_AXIS B00000010 #define JOYSTICK_INCLUDE_Z_AXIS B00000100 #define JOYSTICK_INCLUDE_RX_AXIS B00001000 #define JOYSTICK_INCLUDE_RY_AXIS B00010000 #define JOYSTICK_INCLUDE_RZ_AXIS B00100000 #define JOYSTICK_INCLUDE_RUDDER B00000001 #define JOYSTICK_INCLUDE_THROTTLE B00000010 #define JOYSTICK_INCLUDE_ACCELERATOR B00000100 #define JOYSTICK_INCLUDE_BRAKE B00001000 #define JOYSTICK_INCLUDE_STEERING B00010000 Joystick_::Joystick_( uint8_t hidReportId, uint8_t joystickType, uint8_t buttonCount, uint8_t hatSwitchCount, bool includeXAxis, bool includeYAxis, bool includeZAxis, bool includeRxAxis, bool includeRyAxis, bool includeRzAxis, bool includeRudder, bool includeThrottle, bool includeAccelerator, bool includeBrake, bool includeSteering) { // Set the USB HID Report ID _hidReportId = hidReportId; // Save Joystick Settings _buttonCount = buttonCount; _hatSwitchCount = hatSwitchCount; _includeAxisFlags = 0; _includeAxisFlags |= (includeXAxis ? JOYSTICK_INCLUDE_X_AXIS : 0); _includeAxisFlags |= (includeYAxis ? JOYSTICK_INCLUDE_Y_AXIS : 0); _includeAxisFlags |= (includeZAxis ? JOYSTICK_INCLUDE_Z_AXIS : 0); _includeAxisFlags |= (includeRxAxis ? JOYSTICK_INCLUDE_RX_AXIS : 0); _includeAxisFlags |= (includeRyAxis ? JOYSTICK_INCLUDE_RY_AXIS : 0); _includeAxisFlags |= (includeRzAxis ? JOYSTICK_INCLUDE_RZ_AXIS : 0); _includeSimulatorFlags = 0; _includeSimulatorFlags |= (includeRudder ? JOYSTICK_INCLUDE_RUDDER : 0); _includeSimulatorFlags |= (includeThrottle ? JOYSTICK_INCLUDE_THROTTLE : 0); _includeSimulatorFlags |= (includeAccelerator ? JOYSTICK_INCLUDE_ACCELERATOR : 0); _includeSimulatorFlags |= (includeBrake ? JOYSTICK_INCLUDE_BRAKE : 0); _includeSimulatorFlags |= (includeSteering ? JOYSTICK_INCLUDE_STEERING : 0); // Build Joystick HID Report Description // Button Calculations uint8_t buttonsInLastByte = _buttonCount % 8; uint8_t buttonPaddingBits = 0; if (buttonsInLastByte > 0) { buttonPaddingBits = 8 - buttonsInLastByte; } // Axis Calculations uint8_t axisCount = (includeXAxis == true) + (includeYAxis == true) + (includeZAxis == true) + (includeRxAxis == true) + (includeRyAxis == true) + (includeRzAxis == true); uint8_t simulationCount = (includeRudder == true) + (includeThrottle == true) + (includeAccelerator == true) + (includeBrake == true) + (includeSteering == true); uint8_t tempHidReportDescriptor[150]; int hidReportDescriptorSize = 0; // USAGE_PAGE (Generic Desktop) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x05; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // USAGE (Joystick - 0x04; Gamepad - 0x05; Multi-axis Controller - 0x08) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = joystickType; // COLLECTION (Application) tempHidReportDescriptor[hidReportDescriptorSize++] = 0xa1; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // REPORT_ID (Default: 3) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x85; tempHidReportDescriptor[hidReportDescriptorSize++] = _hidReportId; if (_buttonCount > 0) { // USAGE_PAGE (Button) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x05; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; // USAGE_MINIMUM (Button 1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x19; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // USAGE_MAXIMUM (Button 32) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x29; tempHidReportDescriptor[hidReportDescriptorSize++] = _buttonCount; // LOGICAL_MINIMUM (0) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x15; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // LOGICAL_MAXIMUM (1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x25; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // REPORT_SIZE (1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // REPORT_COUNT (# of buttons) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = _buttonCount; // UNIT_EXPONENT (0) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x55; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // UNIT (None) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x65; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // INPUT (Data,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x02; if (buttonPaddingBits > 0) { // REPORT_SIZE (1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // REPORT_COUNT (# of padding bits) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = buttonPaddingBits; // INPUT (Const,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x03; } // Padding Bits Needed } // Buttons if ((axisCount > 0) || (_hatSwitchCount > 0)) { // USAGE_PAGE (Generic Desktop) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x05; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; } if (_hatSwitchCount > 0) { // USAGE (Hat Switch) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x39; // LOGICAL_MINIMUM (0) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x15; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // LOGICAL_MAXIMUM (7) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x25; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x07; // PHYSICAL_MINIMUM (0) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x35; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // PHYSICAL_MAXIMUM (315) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x46; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x3B; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // UNIT (Eng Rot:Angular Pos) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x65; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x14; // REPORT_SIZE (4) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x04; // REPORT_COUNT (1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // INPUT (Data,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x02; if (_hatSwitchCount > 1) { // USAGE (Hat Switch) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x39; // LOGICAL_MINIMUM (0) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x15; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // LOGICAL_MAXIMUM (7) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x25; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x07; // PHYSICAL_MINIMUM (0) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x35; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; // PHYSICAL_MAXIMUM (315) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x46; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x3B; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // UNIT (Eng Rot:Angular Pos) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x65; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x14; // REPORT_SIZE (4) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x04; // REPORT_COUNT (1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // INPUT (Data,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x02; } else { // Use Padding Bits // REPORT_SIZE (1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // REPORT_COUNT (4) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x04; // INPUT (Const,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x03; } // One or Two Hat Switches? } // Hat Switches if (axisCount > 0) { // USAGE (Pointer) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; // LOGICAL_MINIMUM (-32767) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x16; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x80; // LOGICAL_MAXIMUM (+32767) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x26; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xFF; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x7F; // REPORT_SIZE (16) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x10; // REPORT_COUNT (axisCount) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = axisCount; // COLLECTION (Physical) tempHidReportDescriptor[hidReportDescriptorSize++] = 0xA1; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; if (includeXAxis == true) { // USAGE (X) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x30; } if (includeYAxis == true) { // USAGE (Y) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x31; } if (includeZAxis == true) { // USAGE (Z) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x32; } if (includeRxAxis == true) { // USAGE (Rx) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x33; } if (includeRyAxis == true) { // USAGE (Ry) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x34; } if (includeRzAxis == true) { // USAGE (Rz) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x35; } // INPUT (Data,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x02; // END_COLLECTION (Physical) tempHidReportDescriptor[hidReportDescriptorSize++] = 0xc0; } // X, Y, Z, Rx, Ry, and Rz Axis if (simulationCount > 0) { // USAGE_PAGE (Simulation Controls) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x05; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x02; // LOGICAL_MINIMUM (-32767) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x16; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x01; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x80; // LOGICAL_MAXIMUM (+32767) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x26; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xFF; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x7F; // REPORT_SIZE (16) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x75; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x10; // REPORT_COUNT (simulationCount) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x95; tempHidReportDescriptor[hidReportDescriptorSize++] = simulationCount; // COLLECTION (Physical) tempHidReportDescriptor[hidReportDescriptorSize++] = 0xA1; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x00; if (includeRudder == true) { // USAGE (Rudder) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xBA; } if (includeThrottle == true) { // USAGE (Throttle) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xBB; } if (includeAccelerator == true) { // USAGE (Accelerator) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xC4; } if (includeBrake == true) { // USAGE (Brake) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xC5; } if (includeSteering == true) { // USAGE (Steering) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0xC8; } // INPUT (Data,Var,Abs) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x81; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x02; // END_COLLECTION (Physical) tempHidReportDescriptor[hidReportDescriptorSize++] = 0xc0; } // Simulation Controls // END_COLLECTION tempHidReportDescriptor[hidReportDescriptorSize++] = 0xc0; // Create a copy of the HID Report Descriptor template that is just the right size uint8_t *customHidReportDescriptor = new uint8_t[hidReportDescriptorSize]; memcpy(customHidReportDescriptor, tempHidReportDescriptor, hidReportDescriptorSize); // Register HID Report Description DynamicHIDSubDescriptor *node = new DynamicHIDSubDescriptor(customHidReportDescriptor, hidReportDescriptorSize, false); DynamicHID().AppendDescriptor(node); // Setup Joystick State if (buttonCount > 0) { _buttonValuesArraySize = _buttonCount / 8; if ((_buttonCount % 😎 > 0) { _buttonValuesArraySize++; } _buttonValues = new uint8_t[_buttonValuesArraySize]; } // Calculate HID Report Size _hidReportSize = _buttonValuesArraySize; _hidReportSize += (_hatSwitchCount > 0); _hidReportSize += (axisCount * 2); _hidReportSize += (simulationCount * 2); // Initalize Joystick State _xAxis = 0; _yAxis = 0; _zAxis = 0; _xAxisRotation = 0; _yAxisRotation = 0; _zAxisRotation = 0; _throttle = 0; _rudder = 0; _accelerator = 0; _brake = 0; _steering = 0; for (int index = 0; index < JOYSTICK_HATSWITCH_COUNT_MAXIMUM; index++) { _hatSwitchValues[index] = JOYSTICK_HATSWITCH_RELEASE; } for (int index = 0; index < _buttonValuesArraySize; index++) { _buttonValues[index] = 0; } } void Joystick_::begin(bool initAutoSendState) { _autoSendState = initAutoSendState; sendState(); } void Joystick_::end() { } void Joystick_::setButton(uint8_t button, uint8_t value) { if (value == 0) { releaseButton(button); } else { pressButton(button); } } void Joystick_::pressButton(uint8_t button) { if (button >= _buttonCount) return; int index = button / 8; int bit = button % 8; bitSet(_buttonValues[index], bit); if (_autoSendState) sendState(); } void Joystick_::releaseButton(uint8_t button) { if (button >= _buttonCount) return; int index = button / 8; int bit = button % 8; bitClear(_buttonValues[index], bit); if (_autoSendState) sendState(); } void Joystick_::setXAxis(int16_t value) { _xAxis = value; if (_autoSendState) sendState(); } void Joystick_::setYAxis(int16_t value) { _yAxis = value; if (_autoSendState) sendState(); } void Joystick_::setZAxis(int16_t value) { _zAxis = value; if (_autoSendState) sendState(); } void Joystick_::setRxAxis(int16_t value) { _xAxisRotation = value; if (_autoSendState) sendState(); } void Joystick_::setRyAxis(int16_t value) { _yAxisRotation = value; if (_autoSendState) sendState(); } void Joystick_::setRzAxis(int16_t value) { _zAxisRotation = value; if (_autoSendState) sendState(); } void Joystick_::setRudder(int16_t value) { _rudder = value; if (_autoSendState) sendState(); } void Joystick_::setThrottle(int16_t value) { _throttle = value; if (_autoSendState) sendState(); } void Joystick_::setAccelerator(int16_t value) { _accelerator = value; if (_autoSendState) sendState(); } void Joystick_::setBrake(int16_t value) { _brake = value; if (_autoSendState) sendState(); } void Joystick_::setSteering(int16_t value) { _steering = value; if (_autoSendState) sendState(); } void Joystick_::setHatSwitch(int8_t hatSwitchIndex, int16_t value) { if (hatSwitchIndex >= _hatSwitchCount) return; _hatSwitchValues[hatSwitchIndex] = value; if (_autoSendState) sendState(); } int Joystick_::buildAndSet16BitValue(bool includeValue, int16_t value, int16_t valueMinimum, int16_t valueMaximum, int16_t actualMinimum, int16_t actualMaximum, uint8_t dataLocation[]) { int16_t convertedValue; uint8_t highByte; uint8_t lowByte; int16_t realMinimum = min(valueMinimum, valueMaximum); int16_t realMaximum = max(valueMinimum, valueMaximum); if (includeValue == false) return 0; if (value < realMinimum) { value = realMinimum; } if (value > realMaximum) { value = realMaximum; } if (valueMinimum > valueMaximum) { // Values go from a larger number to a smaller number (e.g. 1024 to 0) value = realMaximum - value + realMinimum; } convertedValue = map(value, realMinimum, realMaximum, actualMinimum, actualMaximum); highByte = (uint8_t)(convertedValue >> 8); lowByte = (uint8_t)(convertedValue & 0x00FF); dataLocation[0] = lowByte; dataLocation[1] = highByte; return 2; } int Joystick_::buildAndSetAxisValue(bool includeAxis, int16_t axisValue, int16_t axisMinimum, int16_t axisMaximum, uint8_t dataLocation[]) { return buildAndSet16BitValue(includeAxis, axisValue, axisMinimum, axisMaximum, JOYSTICK_AXIS_MINIMUM, JOYSTICK_AXIS_MAXIMUM, dataLocation); } int Joystick_::buildAndSetSimulationValue(bool includeValue, int16_t value, int16_t valueMinimum, int16_t valueMaximum, uint8_t dataLocation[]) { return buildAndSet16BitValue(includeValue, value, valueMinimum, valueMaximum, JOYSTICK_SIMULATOR_MINIMUM, JOYSTICK_SIMULATOR_MAXIMUM, dataLocation); } void Joystick_::sendState() { uint8_t data[_hidReportSize]; int index = 0; // Load Button State for (; index < _buttonValuesArraySize; index++) { data[index] = _buttonValues[index]; } // Set Hat Switch Values if (_hatSwitchCount > 0) { // Calculate hat-switch values uint8_t convertedHatSwitch[JOYSTICK_HATSWITCH_COUNT_MAXIMUM]; for (int hatSwitchIndex = 0; hatSwitchIndex < JOYSTICK_HATSWITCH_COUNT_MAXIMUM; hatSwitchIndex++) { if (_hatSwitchValues[hatSwitchIndex] < 0) { convertedHatSwitch[hatSwitchIndex] = 8; } else { convertedHatSwitch[hatSwitchIndex] = (_hatSwitchValues[hatSwitchIndex] % 360) / 45; } } // Pack hat-switch states into a single byte data[index++] = (convertedHatSwitch[1] << 4) | (B00001111 & convertedHatSwitch[0]); } // Hat Switches // Set Axis Values index += buildAndSetAxisValue(_includeAxisFlags & JOYSTICK_INCLUDE_X_AXIS, _xAxis, _xAxisMinimum, _xAxisMaximum, &(data[index])); index += buildAndSetAxisValue(_includeAxisFlags & JOYSTICK_INCLUDE_Y_AXIS, _yAxis, _yAxisMinimum, _yAxisMaximum, &(data[index])); index += buildAndSetAxisValue(_includeAxisFlags & JOYSTICK_INCLUDE_Z_AXIS, _zAxis, _zAxisMinimum, _zAxisMaximum, &(data[index])); index += buildAndSetAxisValue(_includeAxisFlags & JOYSTICK_INCLUDE_RX_AXIS, _xAxisRotation, _rxAxisMinimum, _rxAxisMaximum, &(data[index])); index += buildAndSetAxisValue(_includeAxisFlags & JOYSTICK_INCLUDE_RY_AXIS, _yAxisRotation, _ryAxisMinimum, _ryAxisMaximum, &(data[index])); index += buildAndSetAxisValue(_includeAxisFlags & JOYSTICK_INCLUDE_RZ_AXIS, _zAxisRotation, _rzAxisMinimum, _rzAxisMaximum, &(data[index])); // Set Simulation Values index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_RUDDER, _rudder, _rudderMinimum, _rudderMaximum, &(data[index])); index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_THROTTLE, _throttle, _throttleMinimum, _throttleMaximum, &(data[index])); index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_ACCELERATOR, _accelerator, _acceleratorMinimum, _acceleratorMaximum, &(data[index])); index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_BRAKE, _brake, _brakeMinimum, _brakeMaximum, &(data[index])); index += buildAndSetSimulationValue(_includeSimulatorFlags & JOYSTICK_INCLUDE_STEERING, _steering, _steeringMinimum, _steeringMaximum, &(data[index])); DynamicHID().SendReport(_hidReportId, data, _hidReportSize); } #endif и Joystick.h Скрытый текст /* Joystick.h Copyright (c) 2015-2017, Matthew Heironimus This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef JOYSTICK_h #define JOYSTICK_h #include <DynamicHID/DynamicHID.h> #if ARDUINO < 10606 #error The Joystick library requires Arduino IDE 1.6.6 or greater. Please update your IDE. #endif // ARDUINO < 10606 #if ARDUINO > 10606 #if !defined(USBCON) #error The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.). #endif // !defined(USBCON) #endif // ARDUINO > 10606 #if !defined(_USING_DYNAMIC_HID) #warning "Using legacy HID core (non pluggable)" #else // !defined(_USING_DYNAMIC_HID) //================================================================================ // Joystick (Gamepad) #define JOYSTICK_DEFAULT_REPORT_ID 0x03 #define JOYSTICK_DEFAULT_BUTTON_COUNT 32 #define JOYSTICK_DEFAULT_AXIS_MINIMUM 0 #define JOYSTICK_DEFAULT_AXIS_MAXIMUM 1023 #define JOYSTICK_DEFAULT_SIMULATOR_MINIMUM 0 #define JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM 1023 #define JOYSTICK_DEFAULT_HATSWITCH_COUNT 2 #define JOYSTICK_HATSWITCH_COUNT_MAXIMUM 2 #define JOYSTICK_HATSWITCH_RELEASE -1 #define JOYSTICK_TYPE_JOYSTICK 0x04 #define JOYSTICK_TYPE_GAMEPAD 0x05 #define JOYSTICK_TYPE_MULTI_AXIS 0x08 class Joystick_ { private: // Joystick State int16_t _xAxis; int16_t _yAxis; int16_t _zAxis; int16_t _xAxisRotation; int16_t _yAxisRotation; int16_t _zAxisRotation; int16_t _throttle; int16_t _rudder; int16_t _accelerator; int16_t _brake; int16_t _steering; int16_t _hatSwitchValues[JOYSTICK_HATSWITCH_COUNT_MAXIMUM]; uint8_t *_buttonValues = NULL; // Joystick Settings bool _autoSendState; uint8_t _buttonCount; uint8_t _buttonValuesArraySize = 0; uint8_t _hatSwitchCount; uint8_t _includeAxisFlags; uint8_t _includeSimulatorFlags; int16_t _xAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM; int16_t _xAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM; int16_t _yAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM; int16_t _yAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM; int16_t _zAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM; int16_t _zAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM; int16_t _rxAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM; int16_t _rxAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM; int16_t _ryAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM; int16_t _ryAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM; int16_t _rzAxisMinimum = JOYSTICK_DEFAULT_AXIS_MINIMUM; int16_t _rzAxisMaximum = JOYSTICK_DEFAULT_AXIS_MAXIMUM; int16_t _rudderMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM; int16_t _rudderMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM; int16_t _throttleMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM; int16_t _throttleMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM; int16_t _acceleratorMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM; int16_t _acceleratorMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM; int16_t _brakeMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM; int16_t _brakeMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM; int16_t _steeringMinimum = JOYSTICK_DEFAULT_SIMULATOR_MINIMUM; int16_t _steeringMaximum = JOYSTICK_DEFAULT_SIMULATOR_MAXIMUM; uint8_t _hidReportId; uint8_t _hidReportSize; protected: int buildAndSet16BitValue(bool includeValue, int16_t value, int16_t valueMinimum, int16_t valueMaximum, int16_t actualMinimum, int16_t actualMaximum, uint8_t dataLocation[]); int buildAndSetAxisValue(bool includeAxis, int16_t axisValue, int16_t axisMinimum, int16_t axisMaximum, uint8_t dataLocation[]); int buildAndSetSimulationValue(bool includeValue, int16_t value, int16_t valueMinimum, int16_t valueMaximum, uint8_t dataLocation[]); public: Joystick_( uint8_t hidReportId = JOYSTICK_DEFAULT_REPORT_ID, uint8_t joystickType = JOYSTICK_TYPE_JOYSTICK, uint8_t buttonCount = JOYSTICK_DEFAULT_BUTTON_COUNT, uint8_t hatSwitchCount = JOYSTICK_DEFAULT_HATSWITCH_COUNT, bool includeXAxis = true, bool includeYAxis = true, bool includeZAxis = true, bool includeRxAxis = true, bool includeRyAxis = true, bool includeRzAxis = true, bool includeRudder = true, bool includeThrottle = true, bool includeAccelerator = true, bool includeBrake = true, bool includeSteering = true); void begin(bool initAutoSendState = true); void end(); // Set Range Functions inline void setXAxisRange(int16_t minimum, int16_t maximum) { _xAxisMinimum = minimum; _xAxisMaximum = maximum; } inline void setYAxisRange(int16_t minimum, int16_t maximum) { _yAxisMinimum = minimum; _yAxisMaximum = maximum; } inline void setZAxisRange(int16_t minimum, int16_t maximum) { _zAxisMinimum = minimum; _zAxisMaximum = maximum; } inline void setRxAxisRange(int16_t minimum, int16_t maximum) { _rxAxisMinimum = minimum; _rxAxisMaximum = maximum; } inline void setRyAxisRange(int16_t minimum, int16_t maximum) { _ryAxisMinimum = minimum; _ryAxisMaximum = maximum; } inline void setRzAxisRange(int16_t minimum, int16_t maximum) { _rzAxisMinimum = minimum; _rzAxisMaximum = maximum; } inline void setRudderRange(int16_t minimum, int16_t maximum) { _rudderMinimum = minimum; _rudderMaximum = maximum; } inline void setThrottleRange(int16_t minimum, int16_t maximum) { _throttleMinimum = minimum; _throttleMaximum = maximum; } inline void setAcceleratorRange(int16_t minimum, int16_t maximum) { _acceleratorMinimum = minimum; _acceleratorMaximum = maximum; } inline void setBrakeRange(int16_t minimum, int16_t maximum) { _brakeMinimum = minimum; _brakeMaximum = maximum; } inline void setSteeringRange(int16_t minimum, int16_t maximum) { _steeringMinimum = minimum; _steeringMaximum = maximum; } // Set Axis Values void setXAxis(int16_t value); void setYAxis(int16_t value); void setZAxis(int16_t value); void setRxAxis(int16_t value); void setRyAxis(int16_t value); void setRzAxis(int16_t value); // Set Simuation Values void setRudder(int16_t value); void setThrottle(int16_t value); void setAccelerator(int16_t value); void setBrake(int16_t value); void setSteering(int16_t value); void setButton(uint8_t button, uint8_t value); void pressButton(uint8_t button); void releaseButton(uint8_t button); void setHatSwitch(int8_t hatSwitch, int16_t value); void sendState(); }; #endif // !defined(_USING_DYNAMIC_HID) #endif // JOYSTICK_h Edited September 29 by huligan Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted October 6 (edited) 11.09.2019 в 15:09, MYCYJIbMAHUH сказал: Расскажите как сделать жало для пайки смд элементов.Например жало "микроволна". Я таки сделал себе жало для пайки "микроволна".Надфилем пропилил вертикальную бороздку на старом жале. Два сдвиговых регистра запаял за одну минуту.Провёл по ножкам жалом как по клавишам пианино и готово.Качество пайки супер. Edited October 6 by MYCYJIbMAHUH Share this post Link to post Share on other sites
Komaroff 270 Posted October 6 Флюс тоже не последнее дело. Какой флюс использовал? Share this post Link to post Share on other sites
Antony99 85 Posted October 6 А если после прошивки не появилось устройство в списке что делать,при отключении и подключении не чего не меняется в винде тишина? Share this post Link to post Share on other sites
=FA=CATFISH 1356 Posted October 6 4 минуты назад, Antony99 сказал: А если после прошивки не появилось устройство в списке что делать,при отключении и подключении не чего не меняется в винде тишина? Прошивку надо записать в контроллер. Потом считать из контроллера. Эти два пункта надо проделывать каждый раз, когда что-то меняешь Share this post Link to post Share on other sites
Antony99 85 Posted October 6 3 минуты назад, =FA=CATFISH сказал: Прошивку надо записать в контроллер. Потом считать из контроллера. Эти два пункта надо проделывать каждый раз, когда что-то меняешь А как считать ее, у меня в списке не появился ММJOY Share this post Link to post Share on other sites
=FA=CATFISH 1356 Posted October 6 2 минуты назад, Antony99 сказал: А как считать ее, у меня в списке не появился ММJOY После записи попробуй отключить от USB на 5 сек и включи обратно. Share this post Link to post Share on other sites
Antony99 85 Posted October 6 18 минут назад, =FA=CATFISH сказал: После записи попробуй отключить от USB на 5 сек и включи обратно. Не фига блин 22 минуты назад, =FA=CATFISH сказал: После записи попробуй отключить от USB на 5 сек и включи обратно. Все работает.Ступил блин, не тем файлом прошился. Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted October 7 (edited) 11 часов назад, Komaroff сказал: Флюс тоже не последнее дело. Какой флюс использовал? Самый дешёвый купил для сравнения с гелевым флюсом,который дороже в три раза. https://www.promelec.ru/product/71469/?yclid=5893265269767308266&utm_source=yandex-direct&term={cpb_name} Edited October 7 by MYCYJIbMAHUH 1 Share this post Link to post Share on other sites
=Ping=Sarmatt 85 Posted October 7 MMJOY2 на Windows10 работает? Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted October 7 25 минут назад, =Ping=Sarmatt сказал: MMJOY2 на Windows10 работает? Аж летает. 1 1 Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted October 7 (edited) Сижу работаю над одной идеей.Копаю я значит с утра огород и тут меня мысль посетила! Бросил лопату побежал включать кампутер))). А что если сделать загрузку на неодимовых магнитах!?Взял два магнита аксиальной намагниченности.Приложил к линейке,развернув друг к другу одним полюсом. Магниты начинают отталкиваться уже при четырёх сантиметрах между собой. В чертилке построил механизм с углом хода 20 градусов,сделал так что 1см от себя-на себя.т.е центральному магниту надо пройти путь в 1см от центра в край. Принцип такой.Центральный магнит ниже центра на 25 мм.при отклонениях центральный магнит идёт навстречу крайним магнитам.Т.к полюса друг к другу одинаковые ,происходит сопротивление.Также эти крайние магниты центруют шток в центр. Магниты цилиндрической формы диаметр 8мм,высота 6 мм. Возможно из-за магнитного поля,датчики придётся вынести подальше.И тут же вопрос появился-есть такой сенсор который будет работать между двух магнитов идущим навстречу с одинаковыми полюсами? Edited October 7 by MYCYJIbMAHUH Share this post Link to post Share on other sites
=FA=CATFISH 1356 Posted October 7 (edited) 25 минут назад, MYCYJIbMAHUH сказал: Сижу работаю над одной идеей.Копаю я значит с утра огород и тут меня мысль посетила! Бросил лопату побежал включать кампутер))). А что если сделать загрузку на неодимовых магнитах!?Взял два магнита аксиальной намагниченности.Приложил к линейке,развернув друг к другу одним полюсом. Магниты начинают отталкиваться уже при четырёх сантиметрах между собой. В чертилке построил механизм с углом хода 20 градусов,сделал так что 1см от себя-на себя.т.е центральному магниту надо пройти путь в 1см от центра в край. Принцип такой.Центральный магнит ниже центра на 25 мм.при отклонениях центральный магнит идёт навстречу крайним магнитам.Т.к полюса друг к другу одинаковые ,происходит сопротивление.Также эти крайние магниты центруют шток в центр. Магниты цилиндрической формы диаметр 8мм,высота 6 мм. Возможно из-за магнитного поля,датчики придётся вынести подальше.И тут же вопрос появился-есть такой сенсор который будет работать между двух магнитов идущим навстречу с одинаковыми полюсами? Можно попробовать два SS495 включенных по мостовой схеме и развернутых на 180 град. друг к другу. Надо испытывать. Линейность характеристики такого датчика довольно сомнительна Edited October 7 by =FA=CATFISH Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted October 7 Купил два кольцевых магнита.У меня же оказывается уже есть подопытный. Магниты надеть на осевой палец,между полусферой и регулировочным фланцем.Верхний магнит по видимому подпружинить надо будет,а может и нет. Share this post Link to post Share on other sites
=N=Bonaparte 153 Posted October 8 (edited) Сделал тумблер ШИФТ, теперь на кнопках дополнительные 30 функций. проверил работают все настройка кнопок Edited October 8 by =N=Bonaparte Share this post Link to post Share on other sites
MYCYJIbMAHUH 156 Posted October 10 (edited) Если не тяжело,дорисуйте пожалуйста как соединить два регистра 74HC165 между собой и как подцепить кнопку. Есть куча регистров,но нет плат расширения.Помогите напрямую всё сделать. Edited October 10 by MYCYJIbMAHUH Share this post Link to post Share on other sites