This topic is a summary of the known issues with the Arduino part of the Neo on a Udoo released OS. The Neo Arduino processor is different than the Arduino Uno were it should be compatible with. In practice when you want to use some higher level usage of the Arduino features you run into issues. This topic is to summerise these to help each other with testing and solving these. Please do not ask questions here about problems! React in the linked topic or start a new topic and I will add it to this list that will be shortened as they are being solved! If I missed an issue or an issue is solved please react here. For already known and acknowledged issues see also the documentation pages Differences , String Issue and Porting Libraries 1. [SOLVED] Serial Connection /dev/ttyMCC unreliable (and other threads) 2. Interrupts unreliable. 3. Analog pins cannot be used as digital pins 4. ADC readings from A9 and M4 giving "wrong" values 5. Serial.write((int)0) not working 6. SPI arduino not working 7. [DOCUMENTED]Neo not reading Serial /dev/ttyMCC slows down Arduino M4 8. SOLVED - Servo.h has an error (temporary fix in topic) Libraries Next to issues is the unknown list of compatible libraries (see also doc Porting Libraries and topic Library Compatibility) Working Libraries are (if I forgot one please react here): Servo (with a problem, see #8) LiquidCrystal Wire Stepper (compile test only) Important libraries known not to work, as a reference the list of official Arduino libraries: SoftwareSerial Firmata Neopixels SPI (Current one based in V1.0, see #6) Onewire Other Related Issues CAN on A9 not working when a Arduino sketch is running on M4 Updated 12-01-2017: added Onewire as unsupported library.
Add a possible one - the decode on the barometer brick looks suspect (that, or mine is faulty!) The pressure reads consistently below the actual published (about 5-8hpa) and if that weren't bad enough (it's correctable) the temperature sensor is (right now) reading 24C compared to 19C from the LM75 - my calibration instrument is showing 18.1 which is nearer the mark, but 19C is quite within parameters! If anyone can point me at the driver I'd like to have a poke around.
I don't want to be rude but is this an issue with the Arduino compatibility or a brick issue in general? Do you have an running thread about this issue? ( I believe so but I am mobile right now)
Brick I think. I'm going to chuck the towel in with temp sensing for now. I can't get a reliable reading (such is the nature of these beasts).
Hi guys, first of all many thanks to @waltervl for this thread. It's soooooo useful! Concerning interrupts we've added a new section in the docs about it, here: http://www.udoo.org/docs-neo/Debugging_&_Troubleshooting/Arduino_Interrupt_Issue.html Hope it helps overcoming the problem, and if not, please tell us and we'll figure it out. Regarding the first point we're going to publish (hopefully next week) a new version of UDOObuntu that should solve most of these problems, like uploading sketches, serial stability (speaking of the unreliability of MCC) and the hang of the sketches. Regarding the third point we want to solve this problem but actually we haven't got the hang of it yet. If you got any clue it would be extremely helpful. We still have to look into problem #4 #5 and #6.
Improvements announced and released! Please report your findings in the topics. http://www.udoo.org/forum/index.php?posts/20415
What changes were required to make MCC more stable? Kernel changes? MQX? What changes were required to make Uploading sketches more reliable? fixes to Upload tool? (URL to tool source?) Kernel clock issues?
Hi @tcmichals, both kernel changes and changes to the MQX patch were required. You can find more details on GitHub, specifically at the following links: https://github.com/UDOOboard/udooneo_mqx41_patch https://github.com/UDOOboard/linux_kernel/commit/abdce68f40037226fc0ae3300ca75252ccb5ac02 https://github.com/UDOOboard/linux_kernel/commits/3.14-1.0.x-udoo https://github.com/UDOOboard/arduino-board-package https://github.com/UDOOboard/udoofota https://github.com/ektor5/udooneo-m4uploader
My solution for MCC is shared memory between cores. I recompile each time new kernel without MCC (it would be nice to have it built as a module). I use the unused memory space for my data structures. It requires some attention during software writing but in my case it is still more stable than MCC. Code for Arduino side: Code: #define MCC_BASE_ADDRESS (0xBFF00000) //End of System RAM 0xbfefffff typedef struct telemetry { float roll; //from Arduino to Linux float pitch; //from Linux to Arduino }; struct telemetry *tele_str = (struct telemetry*)MCC_BASE_ADDRESS; loop(){ tele_str->roll = 12; float temp = str->pitch; } Code for Linux side requires some libraries Code: #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <sys/mman.h> #define MCC_BASE_ADDRESS (0xBFF00000) //End of System RAM 0xbfefffff typedef struct telemetry { float roll; //from Arduino to Linux float pitch; //from Linux to Arduino }; // this structure must be identical with the one on Arduino side. struct telemetry *tstr; int main(){ tstr=(struct telemetry*)malloc(sizeof(struct telemetry)); off_t offset = MCC_BASE_ADDRESS; size_t len = 0xfff; // Truncate offset to a multiple of the page size, or mmap will fail. size_t pagesize = sysconf(_SC_PAGE_SIZE); off_t page_base = (offset / pagesize) * pagesize; off_t page_offset = offset - page_base; int fd = open("/dev/mem", O_RDWR|O_SYNC); mem = (unsigned char *)mmap(NULL, page_offset + len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, page_base); if (mem == MAP_FAILED) { perror("Can't map memory"); return -1; } memcpy(tstr, mem,sizeof(struct telemetry)); float temp = str->roll; tstr->pitch = 13; memcpy(mem, tstr,sizeof(struct telemetry)); free(tstr); close(fd); return 0; } Treat this code as a curiosity. It is difficult to maintain and develop. I hope we will find a better solution.
Issue with Udoo Neo Text LCD still not fix. I've just checked it. And the solution still the same: https://github.com/UDOOboard/LiquidCrystal/commit/15e15aca3db47129e1d6cd605d12402d133482ec Fix it by yourself. Hope that Udoo team update this one in final version of Neo.
I don't understand what do you mean. @ektor5 is a colleague of mine at the UDOO Team. That is a commit of ours in our repository. The fix is inside and shipped with the latest release of the board manager.
@Andrea Rovai Actually I tested with the latest image I got from the website. But when I checked the LiquidCrystal_Neo library, it stayed the same, so that I had to go back to @ektor5 post to make the change. And it worked.
You are definitely using an old version of the UDOObuntu. In the latest version there is no more LiquidCrystal_Neo but the name has been standardized in LiquidCrystal so download the latest version (http://www.udoo.org/downloads/) and check this file Code: /usr/share/arduino/hardware/UDOO/solox/libraries/LiquidCrystal/LiquidCrystal.cpp With this command Code: dpkg -l | grep arduino you can check which version you're using This Code: arduino-core-udooneo_1.6.6+00013+gd8afd41 is the latest version. In this version the changes you are proposing are already integrated.
Well the first update did not solve the /dev/ttyMCC reliability but last week some changes were made by the Udoo team that seems to improve things a lot. See and react in that topic please: Serial Connection /dev/ttyMCC unreliable