Search:

Type: Posts; User: unknown_072

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    14,430

    I have updated my pastebin, not big changes yet...

    I have updated my pastebin, not big changes yet but I did some cleaning.
    I'll change also some of my booleans and replace them with enums.
    I did already add them, since I'm also working for a...
  2. Replies
    20
    Views
    14,430

    Thanks laserlight! Will dive into this tomorrow,...

    Thanks laserlight! Will dive into this tomorrow, to enhance my code.
  3. Replies
    20
    Views
    14,430

    Well, that helped.. With that line you've just...

    Well, that helped.. With that line you've just sent I've realised something quite logical... Oops.

    This line from post #7:

    unsigned intresult = 100 * (packetBuffer[0] - '0') + 10 *...
  4. Replies
    20
    Views
    14,430

    Correct, It won't do anything. It was an attempt...

    Correct, It won't do anything. It was an attempt to capture the digits in the string, before this I've tried with "%03d"
  5. Replies
    20
    Views
    14,430

    terraslamp - Pastebin.com...

    terraslamp - Pastebin.com
  6. Replies
    20
    Views
    14,430

    Okay I'll try to explain, it's a bit hard. The...

    Okay I'll try to explain, it's a bit hard.
    The device(lamp) has a unique ID(the 3 digits we are talking about).
    This ID can be set through a custom WinForm which I've built for it.
    The device...
  7. Replies
    20
    Views
    14,430

    Ah yes, well that worked! Thanks. But still,...

    Ah yes, well that worked! Thanks.
    But still, there is a difference in the numbers, and I would say that has to do with the unsigned char vs. char?

    For instance, I've set my table ID to 135 (by...
  8. Replies
    20
    Views
    14,430

    Thanks for the suggestion! first I used 'char' as...

    Thanks for the suggestion! first I used 'char' as type for numBytes, since, the packetBuffer is also char. This gave an error.

    So then I tried 'int' since, that is wat I originally use as you can...
  9. Replies
    20
    Views
    14,430

    Hi laserlight, this specific UDP packet is always...

    Hi laserlight, this specific UDP packet is always a 3-digit number.
    I'm still experiencing with the max range of that number, but for testing that number is always a value between 100 and 200.
    ...
  10. Replies
    20
    Views
    14,430

    Hi christop, yes, correct, in the end it is for...

    Hi christop, yes, correct, in the end it is for Arduino/NodeMCU.
    I've tried many things like also;

    tableID = packetBuffer; (which gives an compile error since packetBuffer is char and tableID...
  11. Replies
    20
    Views
    14,430

    Putting char in unsigned char

    Hi all,

    I'm about to finalize my project, at last!
    Still I'm facing one issue.

    I have a UDP multicolor lamp, which works on a unique address (ID) so you can have 100 lamps working...
  12. This actually works now! I do have to clean up a...

    This actually works now! I do have to clean up a bit but this my result from the serial monitor.


    11:12:19.369 -> Received packet of size 13
    11:12:19.369 -> From 10.168.1.100, port 9101...
  13. Okay so I've tested this, and yes it works. ...

    Okay so I've tested this, and yes it works.

    09:28:03.457 -> Received packet of size 13
    09:28:03.457 -> From 10.168.1.100, port 9101
    09:28:03.457 -> Command: 101_available
    09:28:03.457 ->...
  14. Hi laserlight, Thank you! So I've changed my...

    Hi laserlight,

    Thank you!
    So I've changed my code:

    I've declared expected


    snprintf(expected, sizeof(expected), "%u_available", (unsigned int)tableID);
  15. So monday I'll work on this again, first thing,...

    So monday I'll work on this again, first thing, since I really want to finish this piece of code.
    It's clear to me that the "+" does not work like this in C. Hopefully I can work this out with...
  16. I checked how to use strcat, but here also, I'm...

    I checked how to use strcat, but here also, I'm not sure how to read the PacketBuffer, I just want to verify if the 3 digits of the string that is received on the UDP packet are the same as tableID;...
  17. Nope, I still receive errors. Now it can't...

    Nope, I still receive errors. Now it can't connect to Serial device.
    I've unplugged it and such, but no luck.

    Here is my more complete code, maybe it will clear things up.

    Once again,...
  18. Hmm okay, sorry first of all, sorry for not...

    Hmm okay, sorry first of all, sorry for not completely understanding.
    I've tried this, but no results (can't compile it either), must be wrong on my side.

    This is what I first of all declare,...
  19. Sorry, I'm not sure how to implement this

    Sorry, I'm not sure how to implement this
  20. How to verify my incoming UDP packet correctly?

    I believe I'm trying to fix something quite easy. Still I'm having issues unfortunately.


    With my windows forms I'm sending a UDP packet which contains a 3 digits number (for example: `101` )...
Results 1 to 20 of 20