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

Cannot Compile Esphome #139

Open
ginjac opened this issue Jan 1, 2024 · 1 comment
Open

Cannot Compile Esphome #139

ginjac opened this issue Jan 1, 2024 · 1 comment

Comments

@ginjac
Copy link

ginjac commented Jan 1, 2024

Hope someone can help. When I try to compile for esp32 in Esphome I am getting this error at the very end. Not sure how to define the pins that are need for this. Esp8266 compiles fine. Had some esp32's hanging around and want to give it a shot. Thanks.
: In lambda function:
:55:9: error: 'GPIO18' was not declared in this scope
:55:9: note: suggested alternative: 'GPIO'
:56:9: error: 'GPIO19' was not declared in this scope
:56:9: note: suggested alternative: 'GPIO'
:57:9: error: 'GPIO23' was not declared in this scope
:57:9: note: suggested alternative: 'GPIO'
:58:9: error: 'GPIO5' was not declared in this scope
:58:9: note: suggested alternative: 'GPIO'
:59:9: error: 'GPIO2' was not declared in this scope
:59:9: note: suggested alternative: 'GPIO'
:64:24: error: could not convert '{my_sensor}' from '' to 'std::vectoresphome::sensor::Sensor*'
*** [.pioenvs/shit1/src/main.cpp.o] Error 1
========================= [FAILED] Took 251.20 seconds =========================

@ginjac
Copy link
Author

ginjac commented Jan 4, 2024

Fixed this issue, Do not put "GPIOXX in esphome yaml. Just needs the number like this...
sensor:

  • platform: custom
    lambda: |-
    auto my_sensor = new CC1101(
    18, // SCK
    19, // MISO
    23, // MOSI
    5, // CSN
    22, // GDO0
    25, // GDO2
    96.96, // bandwidth_in_khz
    303.90 // freq_in_mhz
    );
    Unfortunatly, my esp32's are bootlooping now. Not sure why yet. I can add the first turn_on command, then the bootloop occurs as soon as the "turn_off" section is added to the esphome yaml. Enabled GDO2 still bootlooping. Happens at transmission end to transmisson begin. If I uncomment the last 2 lines it bootloops. This is only the first switch of many in the esphome yaml. GDO0 is set for transmit GDO2 is set for receive. Stumped.
    • lambda: get_cc1101(transciver_1).endTransmission();
      #turn_off_action:
      #- lambda: get_cc1101(transciver_1).beginTransmission();

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

No branches or pull requests

1 participant