Further information about the Software

On 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 “Loop” method. It switches port 0 on. Afterwards a “Delay” block follows- it needs a neighbor – a variable. As we dragged a variable there and set it to 1000 our algorithm waits a second. The port 0 is switched off. Again it waits a second and then calls the method “WaitUntilTest” that is located somewhere else on the canvas. With a dialog WaitUntil was set to wait for a certain sensor event. While it happens (e.g. while the light sensor says it is quite bright) the method goes on and switches Pin 1 on and off. That is what the block thermo does as we use it mainly for thermochromic ink where we do not want to overheat the fabric. When it is getting darker the algorithm leaves the loop and pin 13 (here an LED) is switched on once.

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);

}

« »

3 Responses to “Further information about the Software”

Tomas says:

Will there be more updates of the software?

I mean – when can we start on the translations to Slovak? If we can use the same language file also for later versions this question is obviously pointless – then we can start to translate the “blocks” right now…

I have also seen the pics from your first workshop and the idea of working on the algorithm, where each kid is part of it, sounds great to me. I was trying to think about how we deal with this relatively difficult programming stuff in a way that all the kids are involved and the way you did it looks good…

Milena says:

There will be more updates (especially after the workshop). But of course you can use the language file from this version and start to translate. Maybe there will some more words in later version but we can add them to the language file you translate

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>