Skip to content

Instantly share code, notes, and snippets.

@dj1711572002
Created May 27, 2021 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dj1711572002/2055ecfb90618a692a133c2ece1cb799 to your computer and use it in GitHub Desktop.
Save dj1711572002/2055ecfb90618a692a133c2ece1cb799 to your computer and use it in GitHub Desktop.
M5Atom lite UART PIN TEST koki
//M5StickC_Serial1-2_JIkken1-EXT_-Seria1_COM5.ino
//#include <M5StickC.h>
#include <M5Atom.h>
int i;
uint8_t outbyte,inbyte;
void setup() {
M5.begin();
Serial1.begin(115200, SERIAL_8N1, 32, 33); // RX0 TX26 EXT_IO
//Serial2.begin(115200, SERIAL_8N1, 26, 25);// RX33 TX32 Grove
}
void loop() {
//親機から受信する
if (Serial1.available())
{
inbyte = Serial1.read();
Serial.print("RCV&SEND:inbyte=");
Serial.println(inbyte);
delay(1);
Serial1.write(inbyte);//親機へLOOPBACK
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment