I code a software in phython using Ui Flow Ide for Core 2, in this case I have some functions on the m5stack screen, which trigger connected motors..
I would like to do the same, but instead of pressing the core2 screen, I want to do it via Bluetooth on my cell phone. I don't know much in depth, neither programming nor bluetooth, the only tutorial I found uses MIT APP Inventor (it has the problem of not being professional at all, anyone can knows I did it on MIT APP Inventor, I wanted to do it in a way that the person using the cell phone doesn't know how I did...)
But I'm not even able to use App Inventor, I can't send cell phone data to core 2
Does anyone know how to do this? Can I simply mirror the m5stack screen to my phone? If not, and if my only alternative is to create an app for smartphone, where do you recommend it?
Posts made by Hedio90
-
How use Bluetooth?Help please!
-
PROBLEMS WITH BLUETOOTH AND CORE 2
I have code in Python, written using Ui Flow, to control some motors through the core 2 screen. However, I would like to control my motors through the cell phone, thus using the cell phone in the same way I use the core2 screen.
At first I just want to send information from my cell phone to the M5Stack via Bluetooth, I saw on the Internet that I could use MIT APP Inventor for this, so I followed this tutorial on YouTube: "https://www.youtube.com/watch?v= E495XIsM1PI&t=5s"
I just added a button that sends the text "A" via bluettoh to the connected device.
However, I can't quite make the connection! Does the M5stack appear in my cell phone's Bluetooth settings, but does not appear in the inventor app?
If anyone can help, I appreciate it! I'm desperate because it's urgent and I don't know what else to do, I don't have much knowledge about bluetooth connectionsOh, and this is the code I ran in Ui FloW:
"from m5stack import *
from m5stack_ui import *
from uiflow import *
from ble import ble_uartscreen = M5Screen()
screen.clean_screen()
screen.set_screen_bg_color(0xFFFFFF)label0 = M5Label('TEXT', x=142, y=69, color=0x000, font=FONT_MONT_14, parent=None)
uart_ble = ble_uart.init('M5Stackfire')
whileTrue:
label0.set_text(str(uart_ble.read()))
received_data = uart_ble.read()
if received_data:
if received_data == b'A':
label0.set_text('A')
else:
label0.set_text('No A received')
wait_ms(2)"