bitlash: Can't save user functions to startup?
I hope I am getting it wrong, but after trying many times, I could define a new user function and fire it, but I could not set the system to fire it on startup, no matter what .
So in Arduino :
addBitlashFunction("ran", (bitlash_function) ran);
and the function
numvar ran(void) {
//also print not working .
digitalWrite(13, HIGH); // delay only for this matter
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
When you try to run it , it works, but if you try to
function startup { ran; }
// here you get back “saved”
you get on boot the error - “unexpected number” , no matter what you do in this function.
I hope I am doing it wrong, otherwise whats the benefit of user functions ?
Thanks anyway!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (4 by maintainers)
Curnelius:
May I offer a couple of points to close out the thread?
function runit { myfunction; } function startup { runit; }
Since the user-defined function is not run directly from the startup function, the bug is avoided. This works here with the code you sent, amended to compile. I’d be happy to know whether or not this sorts out your problem, and good luck with your project!
Back to coding, everyone. And be careful out there.
-br