so I have an esp32 devkitc in use, and I want to control an (existing) relay with a pushbutton. I have done this before with another esp32 model and it worked perfectly. I have connected gpio17 to a pushbutton and back to the ground, but the problem is that I get no message in my logs that it does something. I know for sure that my connections are good, tested with a multimeter.
Scroll down to the next red cross. I’m guessing it will be next to the web server component. Not all components are available in the esp-idf framework yet but switches and binary sensors should be.
There’s a note further up the page I linked to that says:
Note
Support for the ESP32-S2 and ESP32-C3 is still in development and there could be issues.
So I did what you said, it was next to the web server indeed, so I deleted that part. Then I got the error:
INFO Reading configuration /config/esphome/esp32-1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp32-1 (board: esp32-c3-devkitm-1; framework: espidf; platform: platformio/[email protected])
--------------------------------------------------------------------------------
Platform Manager: Installing platformio/espressif32 @ 2.3.1
Error: Please upgrade to the PlatformIO Core 6
I fixed that by removing the esphome add-on and reinstalling it. That worked, kinda. Got the following error while installing:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
esphome 2023.5.3 requires pyparsing>=3.0, but you have pyparsing 2.3.1 which is incompatible.
Reading CMake configuration...
-- Found Git: /usr/bin/git (found version "2.30.2")
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is GNU
-- Found assembler: /data/cache/platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc
-- Check for working C compiler: /data/cache/platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc
-- Check for working C compiler: /data/cache/platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc -- broken
-- Configuring incomplete, errors occurred!
See also "/data/esp32-1/.pioenvs/esp32-1/CMakeFiles/CMakeOutput.log".
See also "/data/esp32-1/.pioenvs/esp32-1/CMakeFiles/CMakeError.log".
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at /data/cache/platformio/packages/tool-cmake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/data/cache/platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /data/esp32-1/.pioenvs/esp32-1/CMakeFiles/CMakeTmp
Run Build Command(s):/data/cache/platformio/packages/tool-ninja/ninja cmTC_99c16 && [1/2] Building C object CMakeFiles/cmTC_99c16.dir/testCCompiler.c.obj
FAILED: CMakeFiles/cmTC_99c16.dir/testCCompiler.c.obj
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc -march=rv32imc -o CMakeFiles/cmTC_99c16.dir/testCCompiler.c.obj -c testCCompiler.c
riscv32-esp-elf-gcc: error trying to exec 'as': execvp: No such file or directory
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
/data/cache/platformio/packages/framework-espidf/tools/cmake/project.cmake:296 (__project)
CMakeLists.txt:3 (project)
========================= [FAILED] Took 578.30 seconds =========================
Did not found any clear help on the dear internet, so I deleted the part below and made the board back to just: esp32dev
I ran the install, and it succeeded. I then tested if the binary sensor worked, it did not. So I just played around changing the GPIO numbers of the binary sensor (it was still on GPIO17), I changed it to GPIO5 and now it works when I short GPIO5 to ground so I am happy. Why it doesn’t work on 17? I wouldn’t know, but it does work on 5.