Replies: 5 comments 8 replies
-
The sodium file, as well as numerous others, should be part of the Arduino-ESP32 board definitions. Have you installed Arduino-ESP32? Also, when compiling, have you selected an ESP32 board (as opposed to an Arduino board)? |
Beta Was this translation helpful? Give feedback.
-
thank you, i have solved the problem, re install esp32 by online. |
Beta Was this translation helpful? Give feedback.
-
You will want to use two separate pins. One pin should be set to control the relay to turn on the lamp. This pin is controlled by HomeKit and will enable you to turn on the lamp from the Home App. You would then use a second pin to install a push button (connecting the pin you choose to ground when pressed). This is the pin on which you create a SpanButton() object. You then include logic in the lamp service (LightBulb Service) based on the examples that looks for button presses, and when found it changes the output of the pin that is connected to the relay, as well as sends HomeKit a notification that the lamp status has changed. |
Beta Was this translation helpful? Give feedback.
-
i have used "05-WorkingLED" sample, it work well. do you have a full sample that for control relay , where can see define the relay I/O pin and switch button I/O pin. I have see your sample "15-RealPushButtons", that is for dimmer. I don't know how to use the sample, do you have more details or video tour? I just want to use 4 relays, can you help me, Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
with the new Arduino-ESP32 3.0.0 board definitions, the libsodium library is not included anymore. I can't compile my homespan sketch with the new board definitions. Can this be fixed? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
hello. When i install library online and compile in arduino 1.8.13, it have follows:
C:\Users\xxx\Documents\Arduino\libraries\HomeSpan\src\HAP.cpp:30:20: fatal error: sodium.h: No such file or directory
i can't find the sodium.h file, where is it? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions