by bengchet » Wed Nov 30, 2016 3:16 am
Hi,
1. To use 12 bit ADC, simply insert analogReadResolution(12) at void setup() before you do any conversion. By default, the library uses 10 bit conversion. Argument in analogReadResolution(int res) refers to resolution, you can set any resolution you want within 1 to 12.
2. 5+1 UART means 5 hardwareSerial (can be used directly) and 1 hardwareSerial which can be used as well if some hardware modification is made(refers to Serial1).
HardwareUART
Serial - D0(RX) and D1(TX)
Serial1 - not used, initially it is intended for advanced users
Serial2 - D8(RX), D9(TX)
Serial3 - A4(RX), A5(TX)
Serial4 - SCL(RX), SDA(TX) Share the same pins as I2C
Serial5 - D10(RX), D11(TX)
FYI, the purpose of Serial1 is to allow serial debugging and connection of UART devices at the same time. Normally for most Arduino boards, if Serial is used for debugging, it cannot be used for hardware connection or vice versa. If proper modification is made, you can use Serial for debugging purpose only and Serial1 for hardware conneciton. If modified, Serial1 will use the same pins as Serial, D0 for RX and D1 for TX, and Serial will have nothing to do with these pins already.