Category : arduino-esp8266

I want to make this function in Arduino uint32_t GetSeconds(int hour_now, int minutes_now, int seconds_now, int hour_future, int minutes_future, int seconds_future); Something like this, but without using the day involved: uint32_t future = DateTime(2021, 1, 1, 16, 0, 0).unixtime(); DateTime now = rtc.now(); uint32_t timestamp = now.unixtime(); uint32_t seconds_to_sleep = future – timestamp; Source: Windows ..

Read more

I’ve recently been working on wifi sniffer using ESP8266, in order to sniff wifi packets there is a function called wifi_set_promiscuous_rx_cb(wifi_sniffer_packet_handler) it takes a callback function as a parameter and passes buffer pointer, which has the packet info and length of the packet as parameters to the callback function , wifi_sniffer_packet_handler(uint8_t *buff, uint16_t len) is ..

Read more

I want to use the mac address of my system as a topic name. I want something like : project/00:1B:44:11:3A:B7/temperature/status I tried in this way: #define TEMP_STATUS_TOPIC "project/" + WiFi.macAddress() + "temperature/status" #define TEMP_CONTROL_TOPIC "project/temperature/control" But I get this error: no matching function for call to ‘MQTTClient::publish(StringSumHelper&, char [128], size_t&)’ Any tip will be greatly ..

Read more

I have a class like this : class Actuator { public : enum class Action { disable, turn_on, turn_off, toggle }; private: /*Data member*/ public : /*function member*/ }; In another class i define two 2D arrays of "Action" enum class : class Constant_Value { private: static constexpr std::array<std::array<Actuator::Action, NUMBER_OF_RELAYS>, NUMBER_OF_ACTUATORS> m_actuator_relay_default_config {{ {{Actuator::Action::toggle, Actuator::Action::disable, ..

Read more

I am learning how to control P10 Led matrix 64×32 with NodeModule MCU ESP8266, I google and found this library https://github.com/2dom/PxMatrix and this tutorial https://www.instructables.com/RGB-LED-Matrix-With-an-ESP8266/. I believed that I wire between P10 and ESP8266 in true way in the tutorial, but that P10 led does not display as the example: The true result will be: ..

Read more