Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
874 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,

 


Accepted Solutions
Highlighted
New Contributor I

Re: Gpio pins on intel edison

Jump to solution

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
Highlighted
New Contributor I
1 View

Re: Gpio pins on intel edison

Jump to solution

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

d_pin->dir(mraa::DIR_OUT);

View solution in original post