Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AJouv
Beginner
945 Views

Does mraa library work on intel edison anyway ?

Jump to solution

Hi,

I try the mraa library on the Arduino Edison board.

mraa 0.6.1 version on yocto.

The program never opens the A0 input.

compilation with the command : g++ -Wall analogique.cpp -o analogique -lmraa

execution with : ./analogique

# include

# include

int

main()

{

mraa_aio_context adc_a0;

uint16_t adc_value = 0;

float adc_value_float = 0.0;

adc_a0 = mraa_aio_init(0);

if (adc_a0 == NULL) {

std::cout << "execute false";

return 1;

}

for (;;) {

adc_value = mraa_aio_read(adc_a0);

adc_value_float = mraa_aio_read_float(adc_a0);

fprintf(stdout, "ADC A0 read %X - %d\n", adc_value, adc_value);

fprintf(stdout, "ADC A0 read float - %.5f\n", adc_value_float);

}

mraa_aio_close(adc_a0);

return MRAA_SUCCESS;

I get always the "execute false" message.

Thanks for yours responses.

Albijou

0 Kudos
1 Solution
AJouv
Beginner
46 Views

Hi,

All is OK now.

I rebooted the Edison, and the mraa library is running perfectly.

Best regards

AJ

View solution in original post

2 Replies
Allan_J_Intel1
Employee
46 Views

I have moved this post to the appropriate support group:

Allan.

AJouv
Beginner
47 Views

Hi,

All is OK now.

I rebooted the Edison, and the mraa library is running perfectly.

Best regards

AJ

View solution in original post

Reply