Spark (3.3v) to Arduino (5v) Serial Communication

You’re right, I was using print instead of write, thank you.

2 Likes

Hi, I’m now trying send an array (exemple: array[3] = {23, 24, 25}:wink: and I want to receive the array in the arduino and have a new array (array1[3] = {23, 24, 25}:wink:

Thanks for your help

I have an Arduino R3 (purchased from Sainsmart) which has a switch that can change the power from 5v to 3.3v. Do you think I still need a logic level converter or pull up resistors. I will attach a picture so its easier to understand.

Looking at: http://www.sainsmart.com/arduino/control-boards/sainsmart-uno-r3-atmega328-au-development-board-compatible-with-arduino-uno-r3.html

1.) You don’t need level converters

2.) Pull-up resistors are required depending on what you are doing. Just take it as the voltage level shifting is the only feature provided by the switch and everything else is as per normal :wink:

Thank you @kennethlimcp! If I want serial communication between the Arduino Uno R3 and Spark Core, would I need any setup or could I just flip the switch to 3.3V. Thanks Again!

@Ricky

You can simply flip the switch and connect the TX–> RX and RX–> TX accordingly :wink:

Thanks @kennethlimcp! So it will work with me connecting the Tx on Arduino to the Rx on the Spark Core, without adding resistors! I am sorry for being repetitive, but I don’t want to blow my board! Thanks Again,

@Ricky!

yup, no resistors required. I think the TX and RX on the core is 5v tolerant but i can’t be certain until i check the datasheet.

Anyhow, you can safely connect them together :wink:

Thanks Again @kennethlimcp

@kennethlimcp, NO the RX/TX pins on the Core are NOT 5V tolerant - be careful!
If you want 5V tolerance, you need to use Serial2 on D0/D1.

And @Ricky, be extra careful not to switch the switch by accident - maybe tape the slider to prevent accidental knocks or others playing tricks on you.

Thanks @ScruffR

I will see what I can do with the switch. Thanks for the tip about Serial2 on D0/D1.

Thanks again,
@Ricky