Search found 166 matches
- Mon Mar 01, 2021 12:44 pm
- Forum: ESP32 Arduino
- Topic: #include "mqtt_client.h"
- Replies: 4
- Views: 7789
#include "mqtt_client.h"
#include <WiFi.h> #include "certs.h" // include the connection infor for WiFi and MQTT #include "sdkconfig.h" // used for log printing #include "esp_system.h" #include "freertos/FreeRTOS.h" //freeRTOS items to be used #include "freertos/task.h" #include "mqtt_client.h" #include "esp_event.h" //// s...
- Fri Dec 18, 2020 12:43 pm
- Forum: ESP32 Arduino
- Topic: repetitive timerAlarmWrite problem?
- Replies: 4
- Views: 4915
Re: repetitive timerAlarmWrite problem?
take the code out of the isr volatile bool ItrippedOut=false; isr my thing() { ItrippedOut= true; better yet use a freeRTOS event trigger to trigger the task to be ran.} loop() { If Itrippedout then run the code that was in the isr and set iTrippedOut = false; ready for the next isr} So now loop run...
- Mon Oct 12, 2020 1:58 pm
- Forum: ESP32 Arduino
- Topic: i have problem with esp32 when i want to insert software serial
- Replies: 1
- Views: 2796
Re: i have problem with esp32 when i want to insert software serial
Use hardware serial with the ESP32.
- Sun Sep 06, 2020 7:44 pm
- Forum: ESP32 Arduino
- Topic: What runs on each core? And can you force ethernet callback routines onto core 0?
- Replies: 3
- Views: 5060
Re: What runs on each core? And can you force ethernet callback routines onto core 0?
Use xTaskCreatePinnedToCore(), internet search time. BTW xTaskCreatePinnedToCore works just like xTaskCreate().
- Fri Sep 04, 2020 12:20 pm
- Forum: ESP32 Arduino
- Topic: external interrupt ESP32
- Replies: 3
- Views: 4256
Re: external interrupt ESP32
There is this thingy that is an add on to the Arduino IDe called ESP Exception Decored which can be found here https://github.com/me-no-dev/EspExceptionDecoder that has been, for me, a great help in getting to the cause of those Guru error thingies. Why not post your code with code tags so i don't h...
- Thu Sep 03, 2020 9:18 pm
- Forum: ESP32 Arduino
- Topic: ESP32 Can't make an accurate Frequency Counter ???
- Replies: 12
- Views: 16249
Re: ESP32 Can't make an accurate Frequency Counter ???
Will the built in pulse counter work for your application?
from the ESP32 PCNT API: The PCNT (Pulse Counter) module is designed to count the number of rising and/or falling edges of an input signal.
https://docs.espressif.com/projects/esp ... /pcnt.html
from the ESP32 PCNT API: The PCNT (Pulse Counter) module is designed to count the number of rising and/or falling edges of an input signal.
https://docs.espressif.com/projects/esp ... /pcnt.html
- Tue Jul 28, 2020 12:03 pm
- Forum: ESP32 Arduino
- Topic: Serial2 is noisy [ESP32 - Arduino]
- Replies: 2
- Views: 4464
Re: Serial2 is noisy [ESP32 - Arduino]
Are the RPI and ESP32 sharing the same ground?
Have you done a loopback test on the RPi to insure the RPi can send receive serial?
Have you done a loopback test on the RPi to insure the RPi can send receive serial?
- Tue Jul 07, 2020 6:41 pm
- Forum: ESP32 Arduino
- Topic: How does ESP32 drives OLED 1106
- Replies: 5
- Views: 8161
Re: How does ESP32 drives OLED 1106
The u8g2 library works on the SH1106 OLED, https://github.com/olikraus/u8g2/wiki Example of a sh1106 instantiation, U8G2_SH1106_72X40_WISE_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); Select an instantiation that matches your OLED. You can see the default pin numbers/connection...
- Tue Jun 23, 2020 6:54 pm
- Forum: ESP32 Arduino
- Topic: Reliable WiFi and MQTT connection and reconnection?
- Replies: 5
- Views: 16239
Re: Reliable WiFi and MQTT connection and reconnection?
I did 2 things, a few days ago, that increased the MQTT connection reliability. void MQTTkeepalive( void *pvParameters ) { MQTTclient.setKeepAlive( 90 ); // setting keep alive to 90 seconds for (;;) { if ( (wifiClient.connected()) && (WiFi.status() == WL_CONNECTED) ) { //log_i( "staying alive " ); x...
- Tue Jun 16, 2020 2:16 pm
- Forum: ESP32 Arduino
- Topic: The Proper Way to Reconnect to WiFi?
- Replies: 7
- Views: 39508
Re: The Proper Way to Reconnect to WiFi?
I use the MQTT keep alive to detect a lack of network connection with MQTT. #include <WiFi.h> #include <PubSubClient.h> #include "certs.h" #include "sdkconfig.h" #include "esp_system.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/timers.h" #include "freertos/event_gr...