Community
cancel
Showing results for 
Search instead for 
Did you mean: 
RHett
New Contributor I
960 Views

Gpio pins on intel edison

Jump to solution

I'm using the following code to light the LED connected to Digital Pin ~5 on my Edison. & it works (I'm using Arduino Expansion Board)

int main(){

mraa::Gpio* d_pin;

d_pin =new mraa::Gpio(5, true, false);

d_pin->write(1);

}

 

so in order to light the LED connected to Digital pin ~6 the modified code should be

int main(){

mraa::Gpio* d_pin;

d_pin =new mraa::Gpio(6, true, false);

d_pin->write(1);

}

right? but it doesn't work

can someone map out the digital pins with Gpio

 

Thanks,

 

1 Solution
RHett
New Contributor I
86 Views

I figured out the answer I need to put this piece of code

d_pin->dir(mraa::DIR_OUT);

View solution in original post

1 Reply
RHett
New Contributor I
87 Views

I figured out the answer I need to put this piece of code

d_pin->dir(mraa::DIR_OUT);

View solution in original post

Reply