kandi X-RAY | arduino-esp32 Summary
kandi X-RAY | arduino-esp32 Summary
Arduino core for the ESP32
Top functions reviewed by kandi - BETA
arduino-esp32 Key Features
arduino-esp32 Examples and Code Snippets
Trending Discussions on arduino-esp32
So I'm trying to download a binary file from a GCS (google cloud storage) bucket to update the firmware of an
esp32 using the following supported structure:
code looks like this...
ANSWERAnswered 2021-Nov-18 at 11:37
Downloading stuff from a storage bucket requires authenticating your client. You can't just point an HTTPS client to a storage bucket URL and merrily download. You need to generate a OAuth2 token first, then include it in a header of your request:
I am trying to use arduino-esp32 methods defined in file mqtt_client.h for my project. I've used this: https://docs.microsoft.com/en-us/samples/azure/azure-sdk-for-c/how-to-setup-and-run-azure-sdk-for-embedded-c-iot-hub-client-on-espressif-esp32/ example.
My device is connecting to IoT Hub Azure and successfully sends data to it. My problem is when I'm trying to send a message from IoTHub to device from azure console. The MQTT_EVENT_DATA is not fired....
ANSWERAnswered 2021-Sep-22 at 09:32
So, as romkey mentioned, I subscribed to C2D topic and after that EVENT_DATA is triggered.
I am trying to use arduino-esp32 methods defined in file mqtt_client.h for my ESP32/Arduino IDE project :
I am struggling to make an event handler out of this.
I currently have:...
ANSWERAnswered 2020-Dec-21 at 02:21
The type of your event handle is wrong, it should return an
esp_err_t so instead be:
I am having trouble figuring out how to disable then re-enable (upon a triggering event) the hw (esp32-hal-timer) timer from the esp-arduino library, here for a stepper motor controller application with my esp32 development board. It will count down and trigger the ISR as desired as many times as I want, but when I disable it (so that the ISR is not unnecessarily called), it will not start when I try to start it again. The weird thing is that it is started the same way it was the first time, so I'm not sure if it is an issue with my code or the way that that particular library handles garbage collection. This is also my first time trying to work with interrupts at all. My code is below.
To avoid having to wade through too much, the general process is to initialize the timer (called motorTimer) in the setup method, then connect to wifi, within the callback method for mqtt any message with the payload of an integer will trigger the 'moveTo' method in the motor.h class, and then the update method in that same class will be triggered when the ISR timer is triggered. The timer will then change its time with each iteration, for acceleration compensation. This works great, until it comes time to kill the timer and then restart it later - then the ISR is not called at all, like the timer wasn't stopped properly. And that is where my issue lies....
ANSWERAnswered 2020-Nov-04 at 02:34
The word 'restart' had me thinking that it would just immediately start the timer again, but it turns out that is not the case. If the reload was set false previously, the timer has to be set again before it will actually execute - which works perfectly for my use case. Below is my new code (figured I would include the wifi and mqtt stuff to help anyone else as well):
Hello i can't find out how i can add the Esp32 Wifi Library (https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi) to my PlatformIO Project (VS-Code). How am I able to add and import it? I tried to copy it into the libs folder, and add the link to lib_deps
And Stackoverflow just says this Problem is not described good enough... Sorry for the lines at the end...
ANSWERAnswered 2020-Sep-19 at 17:31
You don't need to explicitly add the Wifi library. It's part of the ESP32 Arduino Core support.
You do need a correctly written
platformio.ini file for that to work. That file would look something like this:
I have gotten my ESP32 to create a wireless access point. It shows up fine on any device however, no matter what device I try and connect (iPhone 6s, iPhone 8, Windows desktop), the ESP32 just says that there is no device connected. My code is:...
ANSWERAnswered 2020-Jun-17 at 16:01
That's not how this works. Your program is working properly; your expectations are wrong.
WiFiServer is poorly named. It has nothing to do with clients connecting to the wifi network that
softAP creates. Instead it creates a server listening on the TCP port number that you gave it when you created the object (in this case, 48899). It should really be called
TCPServer but sadly, it's not, and we all just have to live with it.
If I connect a device, it should increase to 1 however it doesn't.
This is incorrect. If you connect a device to the wifi network it's not the same thing as connecting to a
For your code to work, each device that connects to the wifi network your ESP32 is providing will also have to be run a program on it that opens a TCP connection to port 48899 on the ESP32. Otherwise the loop will never see a client available because there will be none.
If you want to know whether any devices have connected to the WiFi access point, you can use
WiFi.softAPgetStationNum() - it will return the number of currently connected devices.
I'm testing code downloading large files (approx 1mb OTA binary file) from a server
The error happens midway through the download:...
ANSWERAnswered 2020-May-03 at 20:10
You're doing too much in the HTTP callback. While the callback is running, the watchdog timer can't be reset. If that happens for too long you'll get the error you're seeing -
Task watchdog got triggered. The big clue is that it happens in the
Try rewriting your code so that the
HTTP_POST handler sets a global variable to indicate that
execOTA() needs to be called, rather than calling it itself. Then have
loop() do the heavy lifting.
Something like this:
Can someone help me with the following code ?
I have a custom class and I want to define a callback for the
ticker the function
It compiles and runs on ESP8266 but not on ESP32.
I see that ESP32
Ticker::once has a different declaration but my c++ knowledge does not help me to find a solution.
ANSWERAnswered 2020-Apr-02 at 08:03
The implementations of the two Ticker.h files are a bit different. On ESP8266, the once method expects type "callback_function_t" where callback_function_t is defined as:
No vulnerabilities reported
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page