6 years, 5 months ago.

UART Connection

How to Establish serial communication between two Freescale Freedom development platforms using UART.

Using the touch slider from one of the Freedom boards you would change the colors of the LEDs on the other board, and make it bi-directional, in a way you can use the touch in any of the freedom board and have the same effect on the other side.

1 Answer

6 years, 5 months ago.

Please see the serial documentation - https://os.mbed.com/docs/v5.6/reference/serial.html

You'll want to wire the boards like this:

MBED1 RX => MBED2 TX

MBED1 TX => MBED2 RX

MBED1 GND => MBED2 GND

Then, you'll want to have code running on both that uses Serial objects to handle send/receive.

something like this

  1. include "mbed.h"
  2. include "TSISensor.h"

Serial Port1(MBED1RX, MBED2,TX); Serial Port2(MBED1TX, MBED2RX); Serial Port3(MBED1GND, MBED2GND);

int main(void) { PwmOut led(LED_GREEN); TSISensor tsi;

while (true) { led = 1.0 - tsi.readPercentage(); wait(0.1); } }

posted by donnie howard 20 Nov 2017

You don't need to declare anything for GND.

Also, you'll need two separate programs running on each board...

posted by Sarah Marsh 20 Nov 2017