background image

Hardware manual

www.banana-pi.com

BerryClip Module Datesheet

pinMode

(

0

,

OUTPUT

);

pinMode

(

3

,

OUTPUT

);

pinMode

(

12

,

OUTPUT

);

pinMode

(

13

,

OUTPUT

);

pinMode

(

14

},

OUTPUT

);

}

int

LED

()

{

for

(

i

=

0

;

i

<=

6

;

i

++)

{

digitalWrite

(

LED1

[

i

],

1

);

delay

(

500

);

digitalWrite

(

LED1

[

i

],

0

);

delay

(

500

);

}

}

int

main

()

{

int

val

;

wiringPiSetup

();

pcf8574Setup

(

200

,

0x27

);

initIO

();

pinMode

(

10

,

INPUT

);

digitalWrite

(

11

,

1

);

while

(

1

)

{

blink

();

val

=

digitalRead

(

10

);

if

(

val

==

0

)

{

LED

();

digitalWrite

(

11

,

1

);

i

=

0

;

}

else

blink

();

}

}

Отзывы: