This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best way to send message to esp32 to change pin state
#8
Thanks I will read though more a bit later...
LOL no "Problems" My last project used a NFR24 after the update to sketch my radio went nuts.. Several days later of debugging i realized that they had change the speed of the SPI bus. One line in my lib for the radio fix it. I am a bit worried about getting a reliable signal with the esp32.

WiFi seems a bit more robust than nrf24.. My biggest issue is the last time i did much c coding was in the Windows 3.1 era...

So I have the light going on and off via a switch to a gpio pin.
and the anchor/windspeed device updates SignalK Navigation/lights is changed to reflect this.


Code:
RPI              WiFi                ESP32
Pin high/low        ------->     Reads signalK PinState "Sensor.light.value" from GPIO tab
                                       if the state has changed do the deed
                                       Sets local Pin to match
                   <-----           Sends SignalK update navigation/lights/Off or Anchored.

Should SignalK be change just to Anchored as Off  is not really the right value if i have other lights in the future. Can I set lights to a Null if anchored is off?
Would it not be better just to have a array of bits that i could set the anchor bit on or off?
is this Stupid as lights is a enum and can only be a one of the values.

I never used Openplotter Actions but this would be easier.
How do you use Openplotter Actions? I cant seem to make it work?  
I would not have to send the  SK update if i could get  to work

What is up with source vs $source..
If i use source... SK sees the source but openplotter does not show it in diagnostic.
But if i set $source SK reports no source but displays the SKKey and Diagnostic sees the Key.
Reply


Messages In This Thread
RE: Best way to send message to esp32 to change pin state - by ddelorme - 2018-12-21, 06:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)