Παρασκευή 2 Μαρτίου 2018

ArduBlock

ArduBlock is a programming environment designed to make “physical computing with Arduino as easy as drag-and-drop.” Instead of writing code, worrying about syntax, and (mis)placing semicolons, ArduBlock allows you to visually program with an snapped-together list of code blocks.

ArduBlock builds on the simplicity of Arduino, and creates a perfect beginner gateway to physical computing. Instead of tearing your hair out debugging, you can spend your time creating!

Installing ArduBlock

ArduBlock is something of an “add-on” to Arduino, so it requires that you have the Arduino IDE installed. The benefit of that, though, is – because Arduino is multi-platform – ArduBlock works on Windows, Mac, or Linux. Plus, having Arduino already present makes the transition from visual programming to text programming easier, when the inevitability approaches.
Installing ArduBlock can be a little tricky – there’s no installer, just a Java file that needs to be stored in a very specific location.

Using ArduBlock

The ArduBlock window is split into two halves. On the left there are “bins”, which store every possible block you can add to your sketch. The blank, gray slate to the right of that is where you “draw” your sketch. To add a block to your sketch, simply drag it from the bin into the blank, gray area.
To begin, every ArduBlock sketch requires a Program block, which you can find in the “Control” bin. The Program block defines the setup and loop functions that every Arduino program requires.
 From there, you can drag more Blocks over, snapping them into either the loop or setup sections. Here, try making a blink program. The set digital pin blocks, which effect a digital output (analogous to Arduino’s digitalWrite function), are found under the “Pins” bin. The delay milliseconds block, found under “Control”, is analogous to a delay Arduino function.

ArduBlock Tips & Tricks

You can clone blocks, or groups of blocks, by right clicking and selecting “Clone”. Everything from the block you right-clicked to the bottom of that “group” will be copied and pasted into the top-left corner of the window. This is a huge timesaver for bigger drawings.
 You can temporarily remove code from your sketch by dragging it out of the entirety of the “Program” block. Anything not connected to the main Program block will be ignored when your code is compiled. This is a great debugging tool – you can remove a block of code from program execution, while not actually deleting it, much like commenting out code.
 Finally, if you peek back over at the Arduino window, after you’ve uploaded an ArduBlock drawing, you may notice something different. To create your code, the ArduBlock program simply parses your blocks and spits the equivalent Arduino code over into the Arduino window.

ArduBlock Resources

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου