GUI-O Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • S

      Need help parsing..

      Comments & Feedback
      • • • Sato
      11
      0
      Votes
      11
      Posts
      785
      Views

      S

      Hi @gammda,

      Thank you. For this project, this time i not use Bascom, i use ESP32 and Arduino.
      The code form Kl3m3n works fine.

      Best regards

    • M

      Issue on sending Widget on init

      General Discussion
      • • • mathieu
      11
      0
      Votes
      11
      Posts
      1.0k
      Views

      K

      @mathieu Hi!

      I have sent the initialization code to your e-mail (I have included your full commands there, but not here on the forum).

      Basically, the commands are sent in a non-blocking fashion one-by one:

      #include <BLEDevice.h> #include <BLEServer.h> #include <BLEUtils.h> #include <BLE2902.h> #include <pgmspace.h> const char* const commands[] PROGMEM = { "|LB UID:lb0 X:20 Y:10\r\n", ... ... ... }; const size_t numCommands = sizeof(commands) / sizeof(commands[0]); namespace uuid { static const char *SERVICE_UUID = "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"; static const char *RX_CHARACTERISTIC_UUID = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"; static const char *TX_CHARACTERISTIC_UUID = "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"; } // namespace uuid // forward declare parser for incoming messages void parseGuioMsg(const String &msg); // setup done flag bool setupDone = false; // init active flag bool initActive = false; // send command period in msec static const unsigned long sendCommandPeriod = 50; // custom handling of server callbacks class CustomBLEServerCallbacks: public BLEServerCallbacks { void onConnect(BLEServer* pServer) { Serial.println("Connected!"); }; void onDisconnect(BLEServer* pServer) { Serial.println("Disconnected!"); // fix provided by BM // restart advertising after disconnect, otherwise GUI-O cannot re-connect if(setupDone) { // restart advertising on disconnect delay(500); pServer->startAdvertising(); } } }; // custom handling of characteristic callbacks class CustomBLECharacteristicCallbacks: public BLECharacteristicCallbacks { void onWrite(BLECharacteristic *pCharacteristic) { std::string msg = pCharacteristic->getValue(); // parse message string parseGuioMsg(String(msg.c_str())); } }; // global ptr BLECharacteristic *pTxCharacteristic; void setup() { // debug output Serial.begin(115200); // create device BLEDevice::init("BasicBLE_NUS"); // create server and register callback BLEServer *pServer = BLEDevice::createServer(); pServer->setCallbacks(new CustomBLEServerCallbacks()); // create service BLEService *pService = pServer->createService(uuid::SERVICE_UUID); // crate Tx characteristic and add descriptor pTxCharacteristic = pService->createCharacteristic(uuid::TX_CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_NOTIFY); pTxCharacteristic->addDescriptor(new BLE2902()); // crate Rx characteristic and register callback BLECharacteristic *pRxCharacteristic = pService->createCharacteristic(uuid::RX_CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_WRITE | BLECharacteristic::PROPERTY_WRITE_NR); pRxCharacteristic->setCallbacks(new CustomBLECharacteristicCallbacks()); // start the service and start advertising pService->start(); pServer->getAdvertising()->start(); // setup done flag setupDone = true; } void loop() { static size_t currentCommandIndex = 0; static unsigned long lastCommandTime = 0; if (initActive) { if (currentCommandIndex < numCommands) { if (millis() - lastCommandTime > sendCommandPeriod) { lastCommandTime = millis(); // retrieve and send the command char commandBuffer[256]; strcpy_P(commandBuffer, (char*)pgm_read_ptr(&commands[currentCommandIndex])); sendMsg(commandBuffer); Serial.print("Sending: "); Serial.println(commandBuffer); currentCommandIndex++; } } else { initActive = false; // hide loading screen sendMsg("@hls\r\n"); } } } /***************************/ /* IMPLEMENT YOUR GUI HERE */ /***************************/ void sendMsg(const String &msg) { pTxCharacteristic->setValue(std::string(msg.c_str())); pTxCharacteristic->notify(); delay(50); } void parseGuioMsg(const String &msg) { if(msg.startsWith("@init")) { Serial.println("GUI-O app is requesting INITIALIZATION!"); // clear screen and set background sendMsg("@cls\r\n"); sendMsg("@guis BGC:#FFFFFF\r\n"); sendMsg("|SORI UID:sori2 HID:sori ORI:2 SEN:0\r\n"); // wait for orientation change (alternatively catch GUI-O screen orientation change event...) delay(500); // show loading screen sendMsg("@sls\r\n"); initActive = true; } }

      Can you please test it and see if it works for you?

      You can try extending sendCommandPeriod if you have any issues... Also you can comment out the @sls and @hls commands to see exactly what is going on...

      Best regards,
      Kl3m3n

    • S

      Add the IoT name to @init

      Comments & Feedback
      • • • Sato
      10
      0
      Votes
      10
      Posts
      772
      Views

      S

      @kl3m3n ,

      Thank You

      Regards

    • D

      Calendar date select

      Comments & Feedback
      • • • DenesL
      10
      0
      Votes
      10
      Posts
      652
      Views

      K

      @DenesL Thanks for the feedback.

      I am not experiencing this problem on any of my devices, which is strange... I get some strange behavior (nothing serious, some taps on the screen don't always work on the outer-most days...) when setting the calendar width to approx. 90% or more...

      I will try some more devices...

      Lastly, I will see if I can re-implement the calendar widget a bit differently... This will take some time though. In any case, I will get back to you.

      Best regards,
      kl3m3n

    • B

      "PGF:1" parameter

      General Discussion
      • • • Bernard
      10
      0
      Votes
      10
      Posts
      722
      Views

      G

      @Bernard
      In your Sub, the Return statement is used twice. Maybe that's the problem.
      After first return statement must be:
      Guio_ini_2:

      @hls 250 should be at the end of the Init procedure.
      I checked the Init process without the Bascom code and it works OK.

      Maybe put |CH

      |CH UID:ch0 X:50 Y:75 W:50 H:50 XLO:0 BSZ:120 VLP:2 BGC:#E53A4456 FGC:#EF33EAF5 SHE:1 FSZ:2.5 RAD:1 CHT:2 CHN:'MESURE HUM / TEMP / PRESSION' XTC:12 YTC:6 YMA:4 XMA:2 XHI:75 PZO:0 @hls 250

      just before @hls 250

      Otherwise, your GUI-O screen is very nice ๐Ÿ‘

    • S

      Join image to Push notification

      Comments & Feedback
      • • • Sato
      10
      0
      Votes
      10
      Posts
      616
      Views

      K

      @Hub Thanks ๐Ÿ™‚

    • S

      Compactibility

      Report Bugs
      • • • Sato
      9
      0
      Votes
      9
      Posts
      586
      Views

      S

      Thank You

      Best regards

    • G

      Grid of buttons?

      Comments & Feedback
      • • • GrantA
      9
      0
      Votes
      9
      Posts
      815
      Views

      G

      @kl3m3n drop down box looks to be easier to use than the spinnable list.
      grid of buttons also seems to work much faster than drawing each button individually. Just need to fine tune the size of each button and the colours, but I can set each button in the pattern initially, and also set individual buttons interactively.

      I'll also have to see if I can load my settings from a CSV file, so that I think might be the last thing to test out, but looking very feasible at the moment to complete what I wanted to do.

    • S

      Navigating between pageยดs

      Comments & Feedback
      • • • Sato
      9
      0
      Votes
      9
      Posts
      539
      Views

      S

      Hello @kl3m3n,

      Tested, works well

      Thanks
      Best regards

    • B

      Joint PDF file

      General Discussion
      • • • Bernard
      9
      0
      Votes
      9
      Posts
      504
      Views

      B

      @kl3m3n
      So,
      I exited the forum and the GUI-O site and logged back in and there it is "upload file" Thank you!!

    • E

      Can widget configuration commands be sent directly to App from a file.txt?

      Wishlist
      • • • enniom
      9
      0
      Votes
      9
      Posts
      788
      Views

      K

      @enniom Thank you. ๐Ÿ˜

    • S

      failure in v1.0.53.1

      Report Bugs
      • • • Sato
      9
      0
      Votes
      9
      Posts
      608
      Views

      H

      @kl3m3n

      Android 13

      Best regards,
      Hub

    • P

      Number of widgets limited to 28

      Report Bugs
      • • • pcu
      9
      0
      Votes
      9
      Posts
      657
      Views

      K

      @pcu Hi!

      I have made two examples using Nucleo board (USB and BLE).

      You can find them here, if you are interested:
      https://www.gui-o.com/examples/gui-o-and-boards/stm32-nucleo-wb55

      Best wishes.
      Klemen

    • B

      Quick pair

      General Discussion
      • • • Bernard
      9
      0
      Votes
      9
      Posts
      689
      Views

      B

      @kl3m3n
      yes, I stupidly took the Arduino sketch that I used in February, without checking all the parameters! I hope that my thoughtlessness will be useful to others......
      Kind regards and thank you Bernard

    • S

      On close with > clear some flags

      Comments & Feedback
      • • • Sato
      9
      0
      Votes
      9
      Posts
      264
      Views

      K

      @Sato I am glad to hear that! ๐Ÿ™‚

      Best regards,
      Kl3m3n

    • S

      Uninstall automatically Gui-o App0

      Comments & Feedback
      • • • Sato
      8
      0
      Votes
      8
      Posts
      508
      Views

      S

      Hello @kl3m3n,

      I understand, thank you

      Best regards

    • T

      Text Input On BLE, problems with more than 14 characters

      Report Bugs
      • • • tgpa123
      8
      0
      Votes
      8
      Posts
      704
      Views

      K

      @tgpa123 Hi.

      I tested this on my device with ESP32 and can send longer data than 20 bytes. It seems that the server and client negotiate a larger MTU value in my case.

      Nevertheless, I can chunk the data so that there is never more than 20 bytes by default. So, for messages greater than 20 bytes, multiple packets will be sent. Of course, the last packet will still be terminated with CRLF.

      Regards,
      Klemen

    • S

      Unable to compile BasicMQTT - code error

      Report Bugs
      • • • SteveV
      8
      0
      Votes
      8
      Posts
      1.2k
      Views

      K

      @Sato I will update the example, so it is compatible with the new esp32 version.

    • F

      How to display a float number via bluetooth

      General Discussion
      • • • Fehr
      8
      0
      Votes
      8
      Posts
      754
      Views

      K

      @Fehr No problem!

      I plan to write a FAQ page on GUI-O website, which will also include this explanation.

      Best regards,
      Kl3m3n

    • D

      Button released events

      General Discussion
      • • • devmonkey
      8
      0
      Votes
      8
      Posts
      911
      Views

      K

      @jjl said in Button released events:

      @kl3m3n Hi

      Have not seen the new release until now.
      The Live designer did not mention anything about a new release !!

      New release works fine. Great work,๐Ÿ‘

      Thanks.

      /Jens

      Yes, there was a bug in the previous release regarding the version check...

      Thanks ๐Ÿ™‚

      Best regards,
      Kl3m3n