Re: Is it possible to condense this UnO2 Control Center Code??? #UnO2


On Fri, May 6, 2022 at 11:24 AM, Jack Fenton wrote:
Maybe more of a Macro than a function as there are no function parameters or return value.  I'm working on a project and tried this technique to reduce my footprint but was unsuccessful, because I still had to set variables before calling the SendTrigger
It might be nice to introduce this concept of a function in the UnO2 "programming language", (I would definitely call it "function", all programming languages do support parameterless functions without return value). It would still do exactly the same as what you can do now, but it might be less confusing than reusing the SendTrigger construct as we do now. This would also allow to introduce optional function parameters, something you have to do now by setting a variable prior to calling the "SendTrigger". But again, in the end it would do just the same and therefore consume the same amount of resources.
I think that's the biggest issue with this whole UnO2 approach : it might look like you can do things which are obvious for higher programming languages running on a computer, but you should not forget that the code needs to get compiled into something that can run on a 30 year old 8-bit microcontroller with very limited resources. That's the main challenge... 

Join to automatically receive all group messages.