Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 17891

Re: How to test if i2c hardware is there without segmentation fault

$
0
0

Here is a simple program:

int main(){

    mraa_init();

}


Result:

root@username~# /home/root/program

Failed to write to export

Intel Edison failed to initialize Arduino board Tristate

Railed to write to export

Intel Edison failed to initialize Arduino board Tristate

Platform not initialized

Segmentation Fault

 

Actually, I can't run this as my breadboard is apart and when it goes back together it will have the i2c chip installed so it will not crash.  But I have run this enough to know that this is what would happen.

 

Also, I know that mraa_init() always returns 12 even the first time.  I think it should return 0.

 

Allen


Viewing all articles
Browse latest Browse all 17891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>