Finally
Handling Digital Input and Output
The block below basically represent the “Hello World” of Arduino Programming mapping to the code fragments
if (digitalRead(1) == HIGH) {
digitalWrite(2, HIGH);
}
Multiple events on the same pin should be support by defining multiple events on the same pin. It seems that a good visual grouping of the same pin would be a good thing and improve readability of the program.
The OpenBlocks come with a pretty cool annotation system to add comments to block. This could be leveraged to enhance the readability of the program.
Handling Analog Input and Output
The analog I/O handling should work the same way as the digital one.
Doing conditional statements with Pin. The Pin 3 is identified with color in the ‘if’ statement. Maybe a label on it will work better.
Functional Programming or Object Oriented?
Since Clojure is used as programming language to drive the ArduBlock, it seems that it pushes my design of the block language to have more functional programming favor. It may be a good thing to make program more straight forward to understand and to program. But really need to guard against the tunnel vision.
Rule Engine?
Since I am using a rule engine in a project right now, I may also be influenced by that. I see all these blocks laying out conditions to trigger actions. It may be worth a while to see if a small Reta Algorithm can be easily implemented in Arduino to handle the rules layout by the blocks. This seems to be a nature way to design a run time for this language.
First off I’d like to give huge thanks to whomever developed this. This has made arduino way more accessible to me and much more fun! I wonder if there are any examples that show multiple if statements? I work with PLC’s and would love to replace my expensive PLC’s with the much cheaper Arduino. Thank you so very much for all the work I’m sure you’re pouring into this!
What’s the use case of multiple if? Do you mean a case statement?
I would really like to use ArduBlock to help my school students learn to program Arduino – but I really need ti to be able to handle this digital input and output as is shown on this page. But at the moment it doesn’t work. Do you know if it will be added to ArduBlock soon?
many thanks!
Thanks for reminding this. We have generalize the support with the SCoop support. It’s probably time to go back and develop these blocks.
Where can i find this block?
Where can i find this block?
Where can i find this block?