May 8, 2019
Hi, I want to know if its possible to lower the memory usage of the library, I just want to update two fields, Im using arduino uno + esp01 board, the write multiple fields via AT example file, it works as expected but eats " 21358 bytes (66%) of program storage space. Maximum is 32256 bytes."
Is it possible to disable functions, such as reading from thingspeak and others to save memory?
Disabling functions in the ThingSpeak library code won't reduce the compile size. The compiler is very efficient already. If a function isn't used by the application, then it leaves it out completely.
The writeFields (with an "s") function is particularly large because it handles any possible field you might want to update. Using writeField (without an "s") instead can save you a few kilobytes. Of course this becomes a challenge when updating 2 fields. If you want to try that, I would suggest putting field1 in one channel and field2 in a second channel. Then you can update them at approximately the same time without hitting the update rate limit imposed on a single channel.
March 7, 2017
While we definitely recommend using the library as much as possible, you can communicate with ThingSpeak without the library if you need to. The moisture monitor example shows how to create a POST and get the response without using the library.
There is not yet an AT command example however, so that will make the coding without the library slightly harder too. You may also be able to consider using the ESP-01 directly without the uno. It has several I/o but no ADC available without serious soldering. You can program it directly from the arduino IDE using the UNO as a programmer.
Most Users Ever Online: 166
Currently Browsing this Page:
Guest Posters: 1
Newest Members:estebanmateo93, mikewrite, onlinebusiness, winzy99, Zark_zeugan, StefanWi
Moderators: cstapels: 460
Administrators: Hans: 405, lee: 457