11 years, 11 months ago.

digitalout

above program is a binary counter

  1. include "mbed.h"

DigitalOut myled1(p5); DigitalOut myled2(p6); DigitalOut myled3(p7);

int main() { while(1) { int i,a,b,c; for (i=0;i<8;i++) a=i %2; b=i/2 %2; c=i/4 %2;

now in this variable a value is to be passed to p7.how to pass?how to use read and write function?

Be the first to answer this question.