🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    PROBLEMS WITH BLUETOOTH AND CORE 2

    Core 2
    1
    1
    548
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Hedio90
      last edited by

      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 connections

      Oh, and this is the code I ran in Ui FloW:
      "from m5stack import *
      from m5stack_ui import *
      from uiflow import *
      from ble import ble_uart

      screen = 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)"

      1 Reply Last reply Reply Quote 0
      • First post
        Last post