Created
May 27, 2021 16:03
-
-
Save dj1711572002/2055ecfb90618a692a133c2ece1cb799 to your computer and use it in GitHub Desktop.
M5Atom lite UART PIN TEST koki
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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