Further information about the Software
Friday, March 30th, 2007On Sunday the first workshop starts. So here comes another update for the software (a windows version as my Mac is at home) inluding new blocks to represent a waituntil command and to print serial values on the Serial Monitor.
Although there are easy textual languages for children – mostly based on Logo- we decided to combine text with a visual language based on building blocks. As textual language we use standard Arduino at the moment. The code can be produced by dragging building blocks together. In our first user testing sessions we found that language is extremely important. Using English blocks and dialogs is a problem for the 11-years-olds we worked with. That is why we work with a language file in the software. At the moment English and German exist. To change the language you can go to the lib folder and change e.g. probs.properties.eng name to probs.properties.
To further explain the functionality take a look at the example.
On the left you can see the building blocks. “On”, “OnFor”, “Off” and “Thermo” are used to “switch” a digital port on or off. “If “and “Waituntil” are followed by dialogs to produce (analog or digital) sensor queries. “Monitor” allows you to print the value of a sensor to Arduinos “Serial Monitor”. That is helpful to get an idea of what values you need to construct for example if-statements.
To produce code you can either drag blocks directly under the loop method or start your own method with the rounded “MethodStart” block. You can drag the cornered “Method” block under the loop block to call your own method. Some blocks (“If”, “WaitUntil”, “Delay”, “OnFor” and “Repeat”) require neighbors as you can guess because of their shape. If you use these blocks their right neighbors will be interpreted for the code.

In our example the algorithm starts with the first block under the “
Blocks that are on the canvas but not under a method block are not interpreted.
Below you can see the code translated to a rather unclean but working Arduino code.
int val= 0;
int compare=0;
int Pin0 = 0;
int Variable56=1000;
int Variable106=1000;
int Pin1 = 1;
int Variable253=1000;
int Pin13 = 13;
void setup(){
pinMode(Pin0, OUTPUT);
pinMode(Pin0, OUTPUT);
pinMode(Pin1, OUTPUT);
pinMode(Pin0, INPUT);
pinMode(Pin13, OUTPUT);
}
void loop(){
digitalWrite(Pin0, HIGH);
delay(Variable56);
digitalWrite(Pin0, LOW);
delay(Variable106);
WaitUntilTest();
}
void WaitUntilTest()
{
while(analogRead(Pin0)>454){
digitalWrite(Pin1, HIGH);
delay(500);
digitalWrite(Pin1, LOW);
delay(500);
}digitalWrite(Pin13, HIGH);
delay(Variable253);
digitalWrite(Pin13, LOW);
}







