Skip to content

Instantly share code, notes, and snippets.

@forkineye
forkineye / AsyncUDP.cpp
Created January 5, 2019 16:38
joinMultcastGroup fix?
static esp_err_t joinMulticastGroup(const ip_addr_t *addr, bool join, tcpip_adapter_if_t tcpip_if=TCPIP_ADAPTER_IF_MAX)
{
struct netif * netif = NULL;
if(tcpip_if < TCPIP_ADAPTER_IF_MAX){
void * nif = NULL;
esp_err_t err = tcpip_adapter_get_netif(tcpip_if, &nif);
if (err) {
return ESP_ERR_INVALID_ARG;
}
netif = (struct netif *)nif;
@forkineye
forkineye / esp8266_pow_issue.ino
Last active August 29, 2015 14:26
ESP8266 Arduino pow() issue with floats in loops
void setup() {
Serial.begin(115200);
Serial.println("");
float x = 2.0;
float y = 2.2;
int i;
for(i = 0; i < 10; i++) {
Serial.println(pow(i, x));