Send AT Command va UIFlow



  • Hello @TheAlphaGhost

    from your post it is not clear which device you are using? M5Stack (Fire, Gray, Basic), M5Core2, M5StickC (Plus), M5Atom, M5CoreInk, M5Paper? They all already use some GPIOs internally so there is a chance your choice (TX 23 / RX 19) creates some overlaps.

    For instance on M5Stack and M5Core2 GPIO23 is used for SPI MOSI already or M5StickC Plus has GPIO23 already in use for LCD_DC. So the reason 'BB' stays on your screen most likely is due to GPIO23 being repurposed for UART and by doing so cutting off the LCD.

    Thanks
    Felix



  • Hello,

    i have a M5Core device.

    Yes, i switch from TX23 -> to TX17, and RX19 -> to 16. Thanks for this tip.

    But, now i have a last question, see screenshot below.
    I Arduino i write with Serial2.write(...) the Hex. How can i do this in the UIFLOW ?!

    Please see screenshots...

    0_1612299397255_Bildschirmfoto 2021-02-02 um 21.56.29.png

    0_1612299311469_Bildschirmfoto 2021-02-02 um 21.49.45.png

    0_1612299324520_Bildschirmfoto 2021-02-02 um 21.53.36.png

    Hope you can help me, with my last question...



  • Hello @TheAlphaGhost

    the block you are using actually writes a string "0xFA" but you want the raw hex value.

    I see two options:

    • convert the hex values into decimal values, then use a UART - write raw data block or
    • try an Advanced - Execute code block with: uart1.write(b'\xFA')

    Note: untested as I don't have the required hardware.

    Good luck!
    Felix



  • Hi Felix,

    Vielen dank für Deine Unterstützung ! Sprichst du deutsch ?

    Thanks for your help. I will try both options, and will send a feedback here.



  • Mhh, still not work. Don't know what's wrong...

    0_1612337721890_Bildschirmfoto 2021-02-03 um 08.33.36.png

    0_1612337746651_Bildschirmfoto 2021-02-03 um 08.33.46.png



  • Hello @TheAlphaGhost

    I think the problem is now with uart1.write(ServoID). Eg. sending values from a variable. When I try this, the receiving end gets a string instead of the hex value.

    Unfortunately I am not a Python expert - I tried a few things but nothing seems to work. Sorry about that.

    Thanks
    Felix



  • Hi Felix,

    no problem. Will try to find the error...

    Thanks for your help!!



  • Hallo Felix,

    now it's work, with byte array...

    0_1612354729899_Bildschirmfoto 2021-02-03 um 13.17.36.png



  • Hello @TheAlphaGhost

    nice, congratulations and thanks for sharing. Thanks to you I've learned something new today.

    Happy Stacking!
    Felix



  • I wish the blocks were in English so I don’t have to Google Translate it all 🤣🤣🤣.
    Kidding though. I can tell by the block colors what’s going on. Nice job fixing it!



  • @world101

    Uhh, sorry. Here the english version...

    0_1612533576762_Bildschirmfoto 2021-02-05 um 14.59.10.png