-
Notifications
You must be signed in to change notification settings - Fork 66
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
Not lighting up even though successful execution #16
Comments
@weilie91 , please check this function in App.c which is the callback. You can add your hardware logic there. ESP32-DevKit-C, which is our most common boar,d does not have in-built user controllable LED, and so the example too does not have any hardware control. |
Is there a simple GPIO blinking led example? I am familiar with Arduino (and C) but I have no idea how to start to control the GPIOs for this board from the App.c function. |
Ok I find what to add, I report here because it can be useful for other beginners with ESP32 like me. Maybe you could add this (commented?) in the App.c as example of how to turn on the GPIO. Everything goes in
then you need to setup at the startup the GPIO as output. I am not sure where is the better place to put this code, but I setup it in the
finally the logic to turn it on on off stays in the
That's all. This will turn on and off the GPIO pin with the number 2 on the board (on some board where the red led is connected to number 2 you will see that one blinking as well, mine is not connected to any GPIO). |
@emanuelelaface it is better to use this example to setup the output: In this way you can avoid possible unwanted behavior of the I/O peripherals. |
Thanks, I see that it may be safer to initialize it in the proper way. Where would you put the init part in the homekit example? I sued the |
For me the proper place would be in the InitializePlatform function inside app_main.c |
Hi, I am new to this. I have followed the instructions thoroughly and managed to proceed without any issue, except that the light is not lighting up when I switch it on homekit. I tried finding the file to check the output(which I assumed it's the inbuilt LED) but to no avail. Please advise. Thanks
The text was updated successfully, but these errors were encountered: