arduino-esp32 | Arduino core for the ESP32
kandi X-RAY | arduino-esp32 Summary
kandi X-RAY | arduino-esp32 Summary
Arduino core for the ESP32
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of arduino-esp32
arduino-esp32 Key Features
arduino-esp32 Examples and Code Snippets
Community Discussions
Trending Discussions on arduino-esp32
QUESTION
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
...ANSWER
Answered 2021-Nov-18 at 11:37Downloading 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:
https://cloud.google.com/storage/docs/downloading-objects#rest-download-object
QUESTION
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.
...ANSWER
Answered 2021-Sep-22 at 09:32So, as romkey mentioned, I subscribed to C2D topic and after that EVENT_DATA is triggered.
QUESTION
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:
...ANSWER
Answered 2020-Dec-21 at 02:21The type of your event handle is wrong, it should return an esp_err_t
so instead be:
QUESTION
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.
...ANSWER
Answered 2020-Nov-04 at 02:34The 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):
QUESTION
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
...ANSWER
Answered 2020-Sep-19 at 17:31You 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:
QUESTION
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:
...ANSWER
Answered 2020-Jun-17 at 16:01That'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 WiFiServer
.
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.
For instance,
QUESTION
I'm testing code downloading large files (approx 1mb OTA binary file) from a server
The error happens midway through the download:
...ANSWER
Answered 2020-May-03 at 20:10You'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 async_tcp
task.
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:
QUESTION
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 onTickerCallback()
.
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.
Test.h
...ANSWER
Answered 2020-Apr-02 at 08:03The 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:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install arduino-esp32
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page