One thing that is still a bit undeveloped with the arduino is concurrency and non-blocking libraries - and it makes it harder for beginners to write code,especially complex code, because of timing issues.
At the moment there all kinds of ideas , but they are relatively complex and require some rtos knowledge.
So i've been thinking about what's the simplest way to enable concurrency for beginners:
What about software "chips" ? You basically just instantiate them(power them up), send them commands, and check if they have new data to read, and if so - read the data ?
This way requires almost zero learning(unlike all common current common concurrency methods) , because as part of learning to use the arduino users already learn the concept behind chips(or shields).
So something like this(pseudo code):
c = KeyboardScannerChip(scan_inputs, scan_outputs, speed) ; \\key scanner is a concurrent module
c.change_speed(3);
c.key_available(){
data = read_key();
}
And by requiring almost zero learning, it might have a decent chance to be adopted by the community, and significantly increase the level of abstraction and code reuse in the community.
And while writing "chips" will be more complex(since they need use an rtos, manage queues and work in parallel) , i think it would make sense to invest that effort for some people in the community, for example, shield makers. And even a small number of such chips(say 20-30) could open many opportunities for the platform.
Of course the hard part is how to implement this - which i don't have good ideas to how .And i think it might take more memory, so it might not work on the atmega and such.
So what do you think ?
At the moment there all kinds of ideas , but they are relatively complex and require some rtos knowledge.
So i've been thinking about what's the simplest way to enable concurrency for beginners:
What about software "chips" ? You basically just instantiate them(power them up), send them commands, and check if they have new data to read, and if so - read the data ?
This way requires almost zero learning(unlike all common current common concurrency methods) , because as part of learning to use the arduino users already learn the concept behind chips(or shields).
So something like this(pseudo code):
c = KeyboardScannerChip(scan_inputs, scan_outputs, speed) ; \\key scanner is a concurrent module
c.change_speed(3);
c.key_available(){
data = read_key();
}
And by requiring almost zero learning, it might have a decent chance to be adopted by the community, and significantly increase the level of abstraction and code reuse in the community.
And while writing "chips" will be more complex(since they need use an rtos, manage queues and work in parallel) , i think it would make sense to invest that effort for some people in the community, for example, shield makers. And even a small number of such chips(say 20-30) could open many opportunities for the platform.
Of course the hard part is how to implement this - which i don't have good ideas to how .And i think it might take more memory, so it might not work on the atmega and such.
So what do you think ?