ArduinoPWCT
ArduinoPWCT - Simple program using ArduinoCPWCT and 3 LEDs Waseem Salem El-Mofty 04October2014 | 09:52 AM

 

 

 

 

ArduioPWCT 1.0 First Sesbania
Waseem Salem El-Mofty <waseem_m_s@hotmail.com> 2014
syria

_____________________________________________________________________________________

Table of contents

1 - Introduction

2 - Implementation steps

3 - Final Steps Tree

4 - Application during the runtime

1 - Introduction

In this lesson we are going to create a simple program using ArduinoPWCT and 3 LEDs

2 - Implementation Steps

s1.JPG

Fig. (1) Goal Desginer - Steps Tree

Select the step (The First Step - Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

1 - Click Interact to open the components browser

2 - Select the domain (Structure)

3 - Select the component (Setup)

The fast way (Using Keyboard shortcuts):

1 - Get the component using its name by typing (Setup)

Note : Stop typing when you see the required component is selected

s2.JPG

Fig. (2) Component Browser � Select the component (Setup)

After selecting the component click Ok or press ENTER

s3.JPG

Fig. (3) Goal Desginer - Steps Tree

Select the step (The First Step - Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Structure)

            3 - Select the component (Loop)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Loop)

            Note : Stop typing when you see the required component is selected

s4.JPG

Fig. (4) Component Browser � Select the component (Loop)

After selecting the component click Ok or press ENTER

s5.JPG

Fig. (5) Goal Desginer - Steps Tree

Select the step (Declare System PINs)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Variables)

            3 - Select the component (Integer)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Integer)

            Note : Stop typing when you see the required component is selected

s6.JPG

Fig. (6) Component Browser � Select the component (Integer)

After selecting the component click Ok or press ENTER

s7.JPG

Fig. (7) Interaction page - Set the properties and enter the required data as in the image above

s8.JPG

Fig. (8) Goal Desginer - Steps Tree

Select the step (Declare System PINs)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Variables)

            3 - Select the component (Integer)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Integer)

            Note : Stop typing when you see the required component is selected

s9.JPG

Fig. (9) Component Browser � Select the component (Integer)

After selecting the component click Ok or press ENTER

s10.JPG

Fig. (10) Interaction page - Set the properties and enter the required data as in the image above

s11.JPG

Fig. (11) Goal Desginer - Steps Tree

Select the step (Declare System PINs)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Variables)

            3 - Select the component (Integer)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Integer)

            Note : Stop typing when you see the required component is selected

s12.JPG

Fig. (12) Component Browser � Select the component (Integer)

After selecting the component click Ok or press ENTER

s13.JPG

Fig. (13) Interaction page - Set the properties and enter the required data as in the image above

s14.JPG

Fig. (14) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (pinMode)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (pinMode)

            Note : Stop typing when you see the required component is selected

s15.JPG

Fig. (15) Component Browser � Select the component (pinMode)

After selecting the component click Ok or press ENTER

s16.JPG

Fig. (16) Interaction page - Set the properties and enter the required data as in the image above

s17.JPG

Fig. (17) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (pinMode)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (pinMode)

            Note : Stop typing when you see the required component is selected

s18.JPG

Fig. (18) Component Browser � Select the component (pinMode)

After selecting the component click Ok or press ENTER

s19.JPG

Fig. (19) Interaction page - Set the properties and enter the required data as in the image above

s20.JPG

Fig. (20) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (pinMode)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (pinMode)

            Note : Stop typing when you see the required component is selected

s21.JPG

Fig. (21) Component Browser � Select the component (pinMode)

After selecting the component click Ok or press ENTER

s22.JPG

Fig. (22) Interaction page - Set the properties and enter the required data as in the image above

s23.JPG

Fig. (23) Goal Desginer - Steps Tree

Select the step (Gust Green)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s24.JPG

Fig. (24) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s25.JPG

Fig. (25) Interaction page - Set the properties and enter the required data as in the image above

s26.JPG

Fig. (26) Goal Desginer - Steps Tree

Select the step (Gust Green)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s27.JPG

Fig. (27) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s28.JPG

Fig. (28) Interaction page - Set the properties and enter the required data as in the image above

s29.JPG

Fig. (29) Goal Desginer - Steps Tree

Select the step (Gust Green)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s30.JPG

Fig. (30) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s31.JPG

Fig. (31) Interaction page - Set the properties and enter the required data as in the image above

s32.JPG

Fig. (32) Goal Desginer - Steps Tree

Select the step (Gust Green)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Time)

            3 - Select the component (Delay)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Delay)

            Note : Stop typing when you see the required component is selected

s33.JPG

Fig. (33) Component Browser � Select the component (Delay)

After selecting the component click Ok or press ENTER

s34.JPG

Fig. (34) Interaction page - Set the properties and enter the required data as in the image above

s35.JPG

Fig. (35) Goal Desginer - Steps Tree

Select the step (Gust Yellow)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s36.JPG

Fig. (36) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s37.JPG

Fig. (37) Interaction page - Set the properties and enter the required data as in the image above

s38.JPG

Fig. (38) Goal Desginer - Steps Tree

Select the step (Gust Yellow)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s39.JPG

Fig. (39) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s40.JPG

Fig. (40) Interaction page - Set the properties and enter the required data as in the image above

s41.JPG

Fig. (41) Goal Desginer - Steps Tree

Select the step (Gust Yellow)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

1 - Click Interact to open the components browser

2 - Select the domain (Digital)

3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

1 - Get the component using its name by typing (digitalWrite)

Note : Stop typing when you see the required component is selected

s42.JPG

Fig. (42) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s43.JPG

Fig. (43) Interaction page - Set the properties and enter the required data as in the image above

s44.JPG

Fig. (44) Goal Desginer - Steps Tree

Select the step (Gust Yellow)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Time)

            3 - Select the component (Delay)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Delay)

            Note : Stop typing when you see the required component is selected

s45.JPG

Fig. (45) Component Browser � Select the component (Delay)

After selecting the component click Ok or press ENTER

s46.JPG

Fig. (46) Interaction page - Set the properties and enter the required data as in the image above

s47.JPG

Fig. (47) Goal Desginer - Steps Tree

Select the step (Just Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s48.JPG

Fig. (48) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s49.JPG

Fig. (49) Interaction page - Set the properties and enter the required data as in the image above

s50.JPG

Fig. (50) Goal Desginer - Steps Tree

Select the step (Just Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s51.JPG

Fig. (51) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s52.JPG

Fig. (52) Interaction page - Set the properties and enter the required data as in the image above

s53.JPG

Fig. (53) Goal Desginer - Steps Tree

Select the step (Just Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s54.JPG

Fig. (54) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s55.JPG

Fig. (55) Interaction page - Set the properties and enter the required data as in the image above

s56.JPG

Fig. (56) Goal Desginer - Steps Tree

Select the step (Just Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Time)

            3 - Select the component (Delay)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Delay)

            Note : Stop typing when you see the required component is selected

s57.JPG

Fig. (57) Component Browser � Select the component (Delay)

After selecting the component click Ok or press ENTER

s58.JPG

Fig. (58) Interaction page - Set the properties and enter the required data as in the image above

s59.JPG

Fig. (59) Goal Desginer - Steps Tree

Select the step (Green ,Yellow ,and Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s60.JPG

Fig. (60) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s61.JPG

Fig. (61) Interaction page - Set the properties and enter the required data as in the image above

s62.JPG

Fig. (62) Goal Desginer - Steps Tree

Select the step (Green ,Yellow ,and Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s63.JPG

Fig. (63) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s64.JPG

Fig. (64) Interaction page - Set the properties and enter the required data as in the image above

s65.JPG

Fig. (65) Goal Desginer - Steps Tree

Select the step (Green ,Yellow ,and Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Digital)

            3 - Select the component (digitalWrite)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (digitalWrite)

            Note : Stop typing when you see the required component is selected

s66.JPG

Fig. (66) Component Browser � Select the component (digitalWrite)

After selecting the component click Ok or press ENTER

s67.JPG

Fig. (67) Interaction page - Set the properties and enter the required data as in the image above

s68.JPG

Fig. (68) Goal Desginer - Steps Tree

Select the step (Green ,Yellow ,and Red)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Time)

            3 - Select the component (Delay)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Delay)

            Note : Stop typing when you see the required component is selected

s69.JPG

Fig. (69) Component Browser � Select the component (Delay)

After selecting the component click Ok or press ENTER

s70.JPG

Fig. (70) Interaction page - Set the properties and enter the required data as in the image above

s71.JPG

Fig. (71) Goal Desginer - Steps Tree

Select the step (Declare System PINs)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Comments)

            3 - Select the component (Comment Signal Line)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Comment Signal Line)

            Note : Stop typing when you see the required component is selected

s72.JPG

Fig. (72) Component Browser � Select the component (Comment Signal Line)

After selecting the component click Ok or press ENTER

s73.JPG

Fig. (73) Interaction page - Set the properties and enter the required data as in the image above

s74.JPG

Fig. (74) Goal Desginer - Steps Tree

Select the step (Start Here)

We will start now new interaction process to generate new steps to our steps tree.

The slow way (Using Mouse):

            1 - Click Interact to open the components browser

            2 - Select the domain (Comments)

            3 - Select the component (Comment Signal Line)

The fast way (Using Keyboard shortcuts):

            1 - Get the component using its name by typing (Comment Signal Line)

            Note : Stop typing when you see the required component is selected

s75.JPG

Fig. (75) Component Browser � Select the component (Comment Signal Line)

After selecting the component click Ok or press ENTER

s76.JPG

Fig. (76) Interaction page - Set the properties and enter the required data as in the image above

s77.JPG

Fig. (77) Goal Desginer - Final Steps Tree

3 - Final Steps Tree

Declare System PINs

         >> COMMENT : Declare System LEDs pins here

Integer : int ledGreen = 13

Integer : int ledYellow = 12

Integer : int ledRed = 11

The First Step - Start Here

VOID Setup

Start Here

>> COMMENT : Setup pins

ledGreen : pinMode = Output

ledYellow : pinMode = Output

 ledRed : pinMode = Output

 End Of Setup

VOID Loop

Start Here

 Gust Green

 ledGreen : digitalWrite (High)

ledYellow : digitalWrite (Low)

 ledRed : digitalWrite (Low)

 Delay (1000) MilliSec

Gust Yellow

 ledGreen : digitalWrite (Low)

 ledYellow : digitalWrite (High)

ledRed : digitalWrite (Low)

Delay (1000) MilliSec

Just Red

 ledGreen : digitalWrite (Low)

ledYellow : digitalWrite (Low)

 ledRed : digitalWrite (High)

 Delay (1000) MilliSec

Green ,Yellow ,and Red

 ledGreen : digitalWrite (High)

 ledYellow : digitalWrite (High)

ledRed : digitalWrite (High)

Delay (1500) MilliSec

 End Of Loop

4 - Application during the runtime

Waseem_04Oct2014_JustGreen

Waseem_04Oct2014_JustYellow

Waseem_04Oct2014_JustRed

Waseem_04Oct2014_All