iyawat / Line-RoverC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It works - but how?

Sarah-C opened this issue · comments

Hi!

https://m5stack.hackster.io/iyawat-kongmalai/roverc-with-m5atom-396c24
On this page you write that communication happens on pin 32 on the Atom to receive a value, and pin 33 on the Stick to transmit it - both using their Grove sockets on Serial2.

If I remove the line: Serial1.begin(115200, SERIAL_8N1, 0, 26); // EXT_IO, RX TX
from the Atom code, communication stops working!
Why does Serial1 need to exist for communication to happen between the Atom and Stick on Serial2?

I'd like to understand in order to make some devices talk directly yo each other, and this bit baffles me!

M5 Atom:

  Serial1.begin(115200, SERIAL_8N1, 0, 26); // EXT_IO, RX TX
  Serial2.begin(115200, SERIAL_8N1, 32, 33);// Grove, RX TX

M5 Stick:

  Serial1.begin(115200, SERIAL_8N1, 0, 26); // EXT_IO, RX TX
  Serial2.begin(115200, SERIAL_8N1, 32, 33); // Grove, RX TX