Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for the ESP32 architecture & boards. #742

Merged
merged 16 commits into from
Jun 16, 2019
Merged

Initial support for the ESP32 architecture & boards. #742

merged 16 commits into from
Jun 16, 2019

Conversation

crankyoldgit
Copy link
Owner

Similar send & receive functionality as the ESP8266 platform.
i.e. It bit-bangs a software PWM signal when sending IR messages.

  • Tested on a GOOUUU-ESP32 development board, and on ESP8266 boards (d1_mini, nodemcuv2)
  • IRrecvDumpV2 and IRMQTTServer examples appear to work as expected.
  • IRMQTTServer example code requires the development version of the WifiManager library.
  • All examples build successfully on ESP32. Not all of them have been tested.
  • Full platformio support and platformio.inis for each example added. Everything automatically builds out of the box under PlatformIO.
  • Reduce some of the ESP8266-isms and references in the library as it now also supports ESP32.
  • Improvements to how IRMQTTServer handles first boot and/or corrupted SPIFFS situations.

If you have an ESP32 board, please test this an let us know if there are any issues.

@u4mzu4
Copy link

u4mzu4 commented Jun 13, 2019

Hello!
Have you ever thought about RMT instead of SW PMW?
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/rmt.html
Or does this modification need much more effort as the expected benefit?

@crankyoldgit
Copy link
Owner Author

@u4mzu4 I've started looking at HW PWM on the ESP32, but using the existing code base (software pwm) means I know it just works. Just getting something working out first is the priority. i.e. baby steps. :-) I'll certainly look into the rmt stuff, I didn't know it even existed.

When researching PWM for the ESP32 the other night, I only saw the ledc stuff. I don't have an oscilloscope so I can't verify the duty-cycle stuff myself. If you have access to an oscilloscope, an ESP32, and are willing to do some testing for me, we can explore those avenues sooner rather than later.

@crankyoldgit
Copy link
Owner Author

@u4mzu4 Btw, did you try it out?

@rahuljawale
Copy link
Collaborator

Lot of commits!! Will work on review during this weekend!

@crankyoldgit
Copy link
Owner Author

@rahuljawale That would be great. Any of the open PR that you can review would be fantastic!

@u4mzu4
Copy link

u4mzu4 commented Jun 13, 2019

Hi again!
1.) ESP32 test:
I have this board with bulit-in IR led (GPIO12) and receiver (GPIO39) as well:
https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware
(Un)fortunately I'm on holiday, but surely I'm looking forward to testing it sometime after 24.06.
2.) RMT:
I'm just browsing this library, which seems quite rudimentary (by comparison), but uses RMT.
https://github.com/haxplore/ESP32_RMT_IRLib
Otherwise, the SW PMW solution is great enough, there are plenty of resources on ESP32. :-)
Moreover, oscilloscope and ESP32 are available, will see how can fight further.

@crankyoldgit
Copy link
Owner Author

@u4mzu4 Excellent. Hit me up via an Issue when you get back and we can try to work together to make it more hardware based on the ESP32.

@crankyoldgit
Copy link
Owner Author

Merging after 7 days of no "review" feedback.

@crankyoldgit crankyoldgit merged commit f2f1e53 into crankyoldgit:master Jun 16, 2019
crankyoldgit added a commit that referenced this pull request Jun 16, 2019
_v2.6.2 (20190616)_

**[Features]**
- Initial support for the ESP32 architecture & boards. (#742)
- Add changable GPIO settings to IRMQTTServer. (#730)
- IRMQTTServer: Enforce a repeat for all Coolix calls (#752)
- Basic DAIKIN 160bit send and decode. (#754)
- Add example code for a Smart(er) IR Repeater. (#740)
- Enforce Samsung A/C Quiet & Powerful mutual exclusivity.

**[Misc]**
- IRMQTTServer: Add some memory alloc safety checks. (#749)
- Move some ToString() functions to IRac.cpp (#748)
- Increase tolerance value for TCL112AC protocol. (#745)
- Fix compiler warning in IRutils_test.cpp (#756)
- Scrape Supported Protocols and generate SupportedProtocols.md (#755)
- Make supported device info more organised. (#753)
@crankyoldgit crankyoldgit mentioned this pull request Jun 16, 2019
crankyoldgit added a commit that referenced this pull request Jun 16, 2019
_v2.6.2 (20190616)_

**[Features]**
- Initial support for the ESP32 architecture & boards. (#742)
- Add changable GPIO settings to IRMQTTServer. (#730)
- IRMQTTServer: Enforce a repeat for all Coolix calls (#752)
- Basic DAIKIN 160bit send and decode. (#754)
- Add example code for a Smart(er) IR Repeater. (#740)
- Enforce Samsung A/C Quiet & Powerful mutual exclusivity.

**[Misc]**
- IRMQTTServer: Add some memory alloc safety checks. (#749)
- Move some ToString() functions to IRac.cpp (#748)
- Increase tolerance value for TCL112AC protocol. (#745)
- Fix compiler warning in IRutils_test.cpp (#756)
- Scrape Supported Protocols and generate SupportedProtocols.md (#755)
- Make supported device info more organised. (#753)
@1technophile
Copy link
Contributor

Woww, thanks for this PR. I will certainly test it in the coming weeks !

@u4mzu4
Copy link

u4mzu4 commented Jun 21, 2019

@crankyoldgit
Short status report:
Sending on ESP32 is working properly, however I've some challenge with signal reception on pin 39
(with IRrecvDumpV2).

@crankyoldgit crankyoldgit deleted the esp32-dev branch June 22, 2019 05:38
@crankyoldgit
Copy link
Owner Author

@u4mzu4 Please log an issue.

However, doing some quick research: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

GPIOs 34 to 39 are GPIs – input only pins. These pins don’t have internal pull-ups or pull-down resistors. They can’t be used as outputs, so use these pins only as inputs:

No idea if you need to use a pull up/down resistor or not for your module. If it works on other GPIOs, then it could be the issue. Seems some boards use those GPIs for other purposes, so your mileage may vary. :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants