The UDOO Neo architecture is quite different from a standard Arduino microcontroller.
In order to make it closer to the Arduino UNO usage we decided to implement some modifications to the libraries. These are the main difference.
Arduino UNO logic works on 5V.
UDOO Neo instead works at 3.3V. As consequence, the analog reference voltage is GROUND and AREF is set to 3.3V.
In Arduino UNO the
Serial object implements an UART serial port available both on the pins
1 and on the USB port (via an internal USB-to-serial converter). In this way, the same signals are available in two places.
In UDOO Neo there are two different serial ports:
Serial0can read and write data on pins
1of the external pinout.
Serialis the internal serial port "connected" to the A9 core, accessible via
Heads up! When you have a sketch that sends data to the internal serial device (Serial) it has to be read by the A9 part otherwise it will slow down the execution: it will time out every Serial.println().
MCC (Multi-Core Communication) is a protocol that emulate a serial port between the two cores. The driver uses a shared memory in DDR that it's used for mutual communication. It's implementation has some limitation:
- When launching a sketch that uses "
Serial.print()" it's important to keep open the
/dev/ttyMCCdevice, otherwise the M4 side will timeout at each call, slowing the sketch.
- Don't use "
There is a little difference for PWM pins declaration. If you use a PWM pins you don't need to declare with
ADC (analog inputs)
Arduino UNO analogic inputs have a resolution of 10 bit, so
analogRead() returns values between 0-1023.
UDOO Neo has 12-bit ADC capabilities.
analogRead() will return values between 0 and 4095.
Arduino sketch storage
On Arduino boards, the sketch is saved in a flash memory.
On UDOO Neo, the sketch is persisted on the SD card. When the board is powered on, the sketch is loaded from the
/var/opt/m4/m4last.fw file and executed on the M4 core.
UDOO NEO has interrupt capability on all digital pins, like Arduino Due.
For now, UDOO NEO does NOT manage:
- Interrupts() / NoInterrupts(): functions for disabling/reenabling interrupts at the same time. Alternatively you can use attachInterrupt()/detachInterrupt() on all the pins one by one.
Refer the page Arduino String Issue for further information about Strings issues.
UDOO Neo M4 Processor has 2 I2C buses wired to the pinout headers and consequentially have 2 Wire objects:
- Wire: on Brick Connector
- Wire1: on SCL SDA pins
Be careful and double check when calling
sketches or libraries. Also check out to have I2C-2 disabled on A9 if you use Wire.