In the post,
@tfmccarthy wrote:
Let's fix that.
Let me know if you're successful.
Ok. When I get time I will give it a try. I have saved your post in the MET folder for later reference. At the moment I am still working on my own version.
Of course the other issue is actually understanding the code when the terminology is unfamiliar or used methods forgotten.
I have in the past communicated with professional C++ programmers, one who tried to get me to learn to use all of the C++ features but really I didn't have the time or motivation as my way of programming using a reduced set of C++ features worked for me as an occassional self taught programmer at a hobby level.
Some years ago these Arduino boards renewed my interest in electronics and programming hardware and I admit it has been enjoyable over the last week learning to program the esp32 and using ESP-NOW. A lot of frustration but it felt good when the two esp32 boards talked to each other.
In another post
https://forum.dronebotworkshop.com/esp32-esp8266/problem-compiling/
... where I was asking how to fix a compile error you wrote:
The cast is for a function pointer. The fields are the data that will be passed to that function when the function is called by the OS.
Does anyone here understand what I'm saying?
Or is it all coming across as techno-babble?
I wrongly replied out of a need not to seem ignorant that it was not all techno-babble to me but in a sense it was to some extent. Yes I know what casting means and what a pointer to a function would be but wouldn't have been able to use that to figure out how to fix the problem.
Your grasp of C++ meant you could fix the problem, I couldn't.
Ok. When I get time I will give it a try.
The intent was to insure you have a working build of the program; that you can compile the code and it runs at the most basic level on your system. You don't have to use it other than as a reference, but you know it's complete.
I have in the past communicated with professional C++ programmers, one who tried to get me to learn to use all of the C++ features but really I didn't have the time or motivation
Is this how you view my replies? That I'm trying to get you to learn more C++?
I'm not.
I wrongly replied out of a need not to seem ignorant that it was not all techno-babble to me but in a sense it was to some extent.
I'll ask you to indulge me here for a moment as that exchange triggered a automatic response.
There's a clear misunderstanding about what is C language and what is C++ language. A function pointer is a C language type. It's not a C++ innovation.
When I come across this kind of technical misinformation, I feel obliged to prevent it spreading further. So I provided a complete explanation of why the compiler complained and what the options were to correct it.
However, that doesn't change the nature of the observation; whether it's advanced C or C++, do I really need to know?
My reply is, "I think you do." The reason is that the ESP-NOW program interface (API) uses it as part of the fundamental communication interface (esp_now_register_recv_cb, etc.) If you don't understand the purpose of the function or the data type you have to give it, then your understanding of how the program works moves further from intention and closer to "magic".
"But do I really need to know this?"
Well, asking the question almost answers it. You don't always have to understand how something works to use it. So, no, you don't need to know unless you want to know why.
YMMV
No I didn't think you were trying to get me to learn more C++ it was a side comment to explaining my limitations regarding reading the more advanced C++ coding options.
I would like to have been able to become a C++ expert but it didn't happen.
Of course I don't know how the ESP-NOW program works or have access to the routines that require a function pointer to decide what function to call so in that sense it is a black box. All I need to know is what it does and how to use it.
Of course I don't know how the ESP-NOW program works or have access to the routines that require a function pointer to decide what function to call so in that sense it is a black box. All I need to know is what it does and how to use it.
A header file is like a datasheet for a program module. I think learning how to read a header file is an invaluable skill any programmer needs.
If you want to know how to go about it, I think I can explain it.
The purpose of the post was to explain why I don't write C++ programs anymore or have any interest in trying yet again. My interest in Ian's project was simply a desire to try out using ESP-NOW and try out using the esp32 board. When he let's us know that he is able to download a sketch to the esp32 board I will provide a sketch and a hardware setup (like yours) with explanations and you can comment on the code and how I code 🙂