Hi There, I am working with some IoT related stuffs. Recently, I bought an UDOO NEO(FULL) Board and I tried to use PMS1003(Dust Sensor). The code consists of a function " Serial.find(0x42)". During compilation it shows an error as unambiguous use of "find(int)". I tried the code without this function the program then compiles but it provides an incorrect output. Can anybody please help me to use the find function (or any other solution). Also when I am trying to use softwareserial function, it is showing error. Is there any alternative of softwareserial function exist for udoo neo.
Software Serial is not supported on the Neo (see my signature for the known issues topic). The best alternative is to connect your sensor to the existing Serial0 device (Arduino pin 0 and 1), no need to use Software Serial. https://www.udoo.org/docs-neo/Arduino_M4_Processor/Communication.html
Thanks!! Serial0 is working fine.. Well, I was having the problem in Serial0.find(0x42). I have cracked the solution by converting the hex argument to character as Serial0.find("B"). But, AGAIN I am facing a different problem. When I am uploading the arduino code sometimes it work fine but sometimes the program can not be uploaded (It shows "uploading..."). As a solution I burn the OS and again the same thing repeats (sometimes working then showing problem). I am using UDOObuntu 2.2.0 (Ubuntu 14.04 LTS). Please help me to solve the problem if there is a problem in UDOObuntu 2.2.0 please help me to select proper OS.
Are you write or print from Arduino side with Serial to the A9 (Linux) side? Be sure you are not doing that without listening on the A9 side. Only write data if you are sure a process is listening or it will overflowing the serial device and you cannot upload.
And you can delete the compiled Arduino file from the location where it is uploaded during every boot from the system. /var/opt/m4/m4last.fw.
Thanks for your suggestion.. OS problem is fixed. But, now we are facing problem to run the arduino code without uploading the code each time after reboot. I mean every time I am rebooting the udoo neo I have to upload the code again to get the output while as in normal arduino we don't have to upload the code each time after restarting. Please help me again to get rid of this problem. I am using UDOObuntu 2.2.0 (Ubuntu 14.04 LTS) .
It looks your arduino code is not good for the Neo. Try the same with for example the blink example (it will just blink the build in led). You will see it works. You can also check if the file /var/opt/m4/m4last.fw is updated. It is the compiled arduino sketch that is uploaded to the Arduino side after every update. In the past the Neo had a problem that if you rebooted by hitting the reset button or pulling the power plug (instead of a proper shutdown by linux) short after uploading the sketch the /var/opt/m4/m4last.fw was deleted or empty contents. Had something to do with caching in order to protect the SD card from excessive writes. Perhaps this issue is back with the latest Udoobuntu. It was solved in Udoobuntu 2.1.1. See also https://www.udoo.org/forum/threads/run-arduino-code-automatically-on-power-up.6131/