February 04, 2012

Know ArduBlock Arduino


What is ArduBlock?? is "A Graphical Programming Language for Arduino" which aims to make the Arduino is easy, for a non-programmer (student) to learn about programming.



Below are some examples of programs using ArduBlock.

1. Led by the IF program (if the button on the Arduino Pin 7 = HIGH then the LED on Arduino Pin 13 will be lit, but it's Led Off)

Code on the Arduino:
-----------------------------------------------------------
void setup()

{
pinMode( 13 , OUTPUT);
pinMode( 7 , INPUT);
}

void loop()

{
if (digitalRead( 7))
{
digitalWrite( 13 , HIGH );
}
else
{
digitalWrite( 13 , LOW );
}
}
-----------------------------------------------------------
2. Program Led (Led Output Condition on Arduino Pin 13 = Input Conditions button on the Arduino Pin 7)

Code on the Arduino:
-----------------------------------------------------------
void setup()

{
pinMode( 13 , OUTPUT);
pinMode( 7 , INPUT);
}

void loop()

digitalWrite( 13 , digitalRead( 7) ); 
}
-----------------------------------------------------------

3. Led Program Blik (Flip-flop / Led on Arduino Pin 13 of life and death with the time delay of 1 second)

Code on the Arduino:
-----------------------------------------------------------
void setup()

{
pinMode( 13 , OUTPUT);

void loop()

digitalWrite( 13 , HIGH ); 
delay( 1000 ); 
digitalWrite( 13 , LOW ); 
delay( 1000 );
}
-----------------------------------------------------------

Official Website: http://blog.ardublock.com/
Download Software: http://cloud.github.com/downloads/taweili/ardublock/ardublock-all.jar

1 comment:

  1. Poderia me ajudar num pequeno programa em ArduBlock?

    ReplyDelete