ты смотришь в код и не видишь код.... мягко говоря.... можно посоветовать 64 года читать матчасть и повторять всякие скетчи, ну либо пока не придет понимание, а если не придет - топить тему до смертного одра всю эту дуруина-херню можно выучить за неделю, максимум две, усердного изучения, просмотра видео, чтения книг и работой с примерами т.ч. вместо всовывания\высовывания пальцев в ноздри - займись делом, это позволяет экономить до 64 лет жизни и не помереть необучаемым

Комментарии: 15

  1. Koshakis

    Тебе 64? А вообще верно, пока не осознаешь, не поймешь

    • Bulochka

      пока нет, но дело за малым)

      • Venom

        #include #if !defined(ARDUINO_ESP32C3_DEV) // This is due to a bug in RISC-V compiler, which requires unused function sections :-(. #define DISABLE_CODE_FOR_RECEIVER // Disables static receiver code like receive timer ISR handler and static IRReceiver and irparams data. Saves 450 bytes program memory and 269 bytes RAM if receiving functions are not required. #endif #include "PinDefinitionsAndMore.h" // Define macros for input and output pin etc. #define IR_SEND_PIN 2 #include void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(115200); #if defined(__AVR_ATmega32U4__) || defined(SERIAL_PORT_USBVIRTUAL) || defined(SERIAL_USB) /*stm32duino*/|| defined(USBCON) /*STM32_stm32*/ \ || defined(SERIALUSB_PID) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_attiny3217) delay(4000); // To be able to connect Serial monitor after reset or power up and before first print out. Do not wait for an attached Serial Monitor! #endif // Just to know which program is running on my Arduino Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE)); Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN))); IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin } const uint8_t rawDataP[] PROGMEM = { 180, 90 /*Start bit*/, 11, 11, 11, 11, 11, 34, 11, 11/*0010 0x4 of 8 bit address LSB first*/, 11, 11, 11, 11, 11, 11, 11, 11/*0000*/, 11, 34, 11, 34, 11, 11, 11, 34/*1101 0xB*/, 11, 34, 11, 34, 11, 34, 11, 34/*1111*/, 11, 11, 11, 11, 11, 11, 11, 34/*0001 0x08 of command LSB first*/, 11, 34, 11, 11, 11, 11, 11, 11/*1000 0x01*/, 11, 34, 11, 34, 11, 34, 11, 11/*1110 Inverted 8 of command*/, 11, 11, 11, 34, 11, 34, 11, 34/*0111 inverted 1 of command*/, 11 /*stop bit*/}; const uint16_t rawData[] = { 9000, 4500/*Start bit*/, 560, 560, 560, 560, 560, 1690, 560, 560/*0010 0x4 of 8 bit address LSB first*/, 560, 560, 560, 560, 560, 560, 560, 560/*0000*/, 560, 1690, 560, 1690, 560, 560, 560, 1690/*1101 0xB - inverted 0x04*/, 560, 1690, 560, 1690, 560, 1690, 560, 1690/*1111 - inverted 0*/, 560, 560, 560, 560, 560, 560, 560, 1690/*0001 0x08 of command LSB first*/, 560, 1690, 560, 560, 560, 560, 560, 560/*1000 0x01*/, 560, 1690, 560, 1690, 560, 1690, 560, 560/*1110 Inverted 8 of command*/, 560, 560, 560, 1690, 560, 1690, 560, 1690/*1111 inverted 0 of command*/, 560 /*stop bit*/}; // Using exact NEC timing uint32_t tRawData[]={0x26C3AE52, 0x700FFD9, 0x916EF8}; void loop() { #if FLASHEND > 0x1FFF Serial.println(F("Send NEC 8 bit address=0x04 (0xFB04) and command 0x18 (0xE718) with exact timing (16 bit array format)")); Serial.flush(); IrSender.sendRaw(rawData, sizeof(rawData) / sizeof(rawData[0]), NEC_KHZ); delay(1000); // delay must be greater than 8 ms (RECORD_GAP_MICROS), otherwise the receiver sees it as one long signal IrSender.sendPulseDistanceWidthFromArray(38, 3200, 1550, 450, 1150, 450, 300, &tRawData[0], 88, PROTOCOL_IS_LSB_FIRST, 50, 3); #endif IrSender.sendPulseDistanceWidthFromArray(38, 3200, 1550, 450, 1150, 450, 300, &tRawData[0], 88, PROTOCOL_IS_LSB_FIRST, 50, 3); Serial.println(F("Send NEC 8 bit address 0x04 and command 0x18 with (50 us) tick resolution timing (8 bit array format) ")); Serial.flush(); IrSender.sendRaw_P(rawDataP, sizeof(rawDataP) / sizeof(rawDataP[0]), NEC_KHZ); delay(100); Serial.println(F("Send NEC 16 bit address 0x04, 8 bit command 0x18 with NEC encoder")); Serial.flush(); IrSender.sendNEC(0x04, 0x18, 0); delay(300); }

        • Venom

          вот так?

          • Bulochka

            сектор 0 на барабане, ваш ход переходит к следующему игроку

          • Koshakis

            Проще никак?

            • Venom

              ну не знаю

              • Bulochka

                узнай.... не спроси, не угадай - узнай! представь себе поход в гости по твоему методу о, наверно эта улица, наверно этот дом, таааак, вот эта квартира наверно! идиотизм, не?

                • Venom

                  не

                  • Bulochka

                    ладно.... живи так, твой выбор я пас

        • Venom

          ? так ведь? Получается, я должен делать так: 1. Захожу и получаю сигнал с пульта приёмником в ReceiverDemo. 2. Получившиеся tRawData пихаю в SendRawDemo. 3. Передатчиком пытаюсь передавать ИК.

          • Venom

            так ведь?

            • Ibrahim

              Я незнаю..

      • Koshakis

        Брр, как представлю

        • Bulochka

          мне это всё напоминает одного жмурика-стримера, который себе в голову всякое вживлял.... не знаю живой ещё или нет.... тот ещё елон муцк, тоже лез куда не звали, без базы

Не нашли ответ?

Вам также может быть интересно