How to master/slave Arduino UNO->Teensy 3.6

Status
Not open for further replies.

dark4eg

Member
The best option to connect 3 devices
PC-> Arduino UNO-> Teensy 3.6.
Serial or SPI? Or are there other other things?
Should I worry about the tension when connecting now Arduino UNO (5v)-> Teensy 3.6 (3.3 V)?
 
Teensy 3.6 is not 5V tolerant. You will need to use resistors or level translators to reduce its 5V signals to the 3.3V levels.

Uno can read the 3.3V signals, so there's usually no need to increase them to 5V.
 
Thx.
Serial by SoftwareSerial on Arduino UNO or SPI for connect uno and teensy
with which option fewer problems?)
 
SoftwareSerial on Uno to Serial1 on Teensy is probably the simplest. You will need a pair of resistors to decrease Uno's output to 3.3V. Best to test with a voltmeter before you connect it to Teensy 3.6.

The other viable option would be Wire, where one side runs master mode and the other side slave mode. The Wire lib comes with examples. Uno has very weak pullups to 5V. If you connect 2.2k resistor pullups to 3.3V, the SDA and SCL signals will be very close to 3.3V when high. That should also work. The Wire lib is nice for passing messages. It's more complicated than if you only send single bytes with serial, but if you send lots of complex messages it can be simpler than having to parse where each message begins as serial receives the bytes.
 
Yes, same as when connecting 2 regular Arduino boards, you need 3 wires: GND, SDA (A4 pin), SCL (A5 pin).

Unlike regular Arduino, you must also connect a 2.2K resistor from SDA to 3.3V, and another 2.2K resistor from SCL to 3.3V.

Run master_writer on one side and slave_receiver on the other side. Also, when you program each board, pay attention to the address numbers. They need to match. Look for these:

Code:
  Wire.beginTransmission(9);  // transmit to device #9

Code:
  Wire.begin(9);                // join i2c bus with address #9

You can use any number from 1 to 127, though there's a convention that 1 to 7 are best to save for special uses. Just make sure it's the same on both sides.
 
If that doesn't solve the problem, please post a photo of how you're actually connecting everything.

Sometimes the problem can be as simple as a misunderstanding about how to connect the wires. Also, check out this quick video about how to solder Teensy. It has been a misunderstanding in some cases....

 
Status
Not open for further replies.
Back
Top