M5stack V uart communication
-
Hello everyone, does anyone know how I can connect my M5Stick V to my M5Stack Fire using serial communication? These are a part of the codes I use.
Stick-V
import time
from machine import UART
from fpioa_manager import fmfm.register(35, fm.fpioa.UART2_TX, force=True)
fm.register(34, fm.fpioa.UART2_RX, force=True)
uart = UART(UART.UART2, 9600)while(True):
uart.write("Hello World!\r")
time.sleep(1000)Stack-Fire
#include <M5Stack.h> // needed for my board M5Stack
HardwareSerial m5stack_uart(2);
void setup()
{
M5.begin();Serial.begin(9600); ;
m5stack_uart.begin(9600, SERIAL_8N1, 16, 17);
//Serial2_.flush();
Serial.println("Hola");
m5stack_uart.println("Hola");}
void loop()
{
m5stack_uart.println("@");
if (m5stack_uart.available()) {
String s = m5stack_uart.readString();
Serial.println(s);
}if (Serial.available()) {
String s = Serial.readString();
m5stack_uart.println(s);
}}
Regards
Jaime
-
https://m5stack.hackster.io/anoken2017/cheering-watch-of-m5stickc-v-34f0cc
Near the end , tell us if it helps
-
-
Problem solved, thanks to both of you for the suggestions.
Thank you
Jaime
-
Hello, I also bought the same m5stack and m5stick v products, I have the same problem. can you help me to be able to communicate my camera with the m5stack, knowing that I program my camera with maixpy and the m5stack with arduino thank you in advance.