Send AT Command va UIFlow
-
@qlion Explore it
-
@watson Thanks for the reply
so I don't have to Street about the setup
Serial2.begin(9600, SERIAL_8N1, 16, 17);Just use Uart and send command, Thanks with play around with it.
-
Thats not work. The code hang on the line set UART...
Whats wrong ??
-
@TheAlphaGhost which device are you using? At least one of those pins 23 and 19 that you are using is connected to an internal for most of the devices.
-
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...
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...
-
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...
-
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! -
Uhh, sorry. Here the english version...