8 Replies Latest reply on Apr 18, 2017 2:10 PM by Intel Corporation

    MRAA C++ UART RFID MODULE EM_18

    Goutham_Gandi

      Hi, I'm new with intel Edison and I'm trying to develop a c++ application to read data received in edison's uart gpio's and write it to console (in the future the data must be filtered and sent via wifi ).

      I'm working with intel Edison + Arduino breakout board and I've done all tutorials in order to flash it with last firmware, install drivers and developers kit in pc, connect to pc with tera term  (microUSB serial port) and I've configured eclipse in order to deploy applications in the Edison (Hello world succesfully run).

      I'm trying to run the following code :

      #include <unistd.h>

      #include <iostream>

      #include <exception>

      #include "mraa.hpp"

      int main()

      {

         mraa::Uart* dev;

         dev = new mraa::Uart(0);

         std::cout<<"UART SUCCESS"<<"\n";

         char array[12];

         std::cout<<"Test 3";

         for(;;)

         {

          std::cout<<"Test 1";

          dev->read(array,12);

          std::cout<<"Test 2";

          for(int i=0;i<12;i++)

          std::cout<<array[i];

         }

         delete dev;

         return mraa::SUCCESS;

      }

      And none of the tests are executing ... the program prints UART success and thats it ! ... Cannot figure out what is wrong with it ! Please do help

       

      Output :

      root@edison:~# echo $PWD'>'

      /home/root>

      root@edison:~#

      root@edison:~# chmod 755 /tmp/autopark;/tmp/autopark ;exit

      UART SUCCESS