Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: shawn

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. On Teensy 4, I thought const variables, while...

    On Teensy 4, I thought const variables, while they reside in flash by virtue of being stored in the program, are copied to RAM? It was also my understanding that they don’t get copied to RAM if...
  2. Replies
    2
    Views
    211

    Since youíre using NUL-terminated string-based...

    Since youíre using NUL-terminated string-based printing to print to the console, it will stop printing at the first NUL character. Iíd expect it to print ď$Ē, though, since a NUL is after that.
  3. Replies
    5
    Views
    302

    Any class that derives (directly or indirectly)...

    Any class that derives (directly or indirectly) from the Print class also has a printf function.

    See:...
  4. Replies
    5
    Views
    302

    There's always printLeadingZeros(myNumber)...

    There's always printLeadingZeros(myNumber) (pseudocode) and then Serial.print(myNumber, 2), but that's slow.

    I don't think you need `btnsBinary[0] = 0`. Did you mean `btnsBinary[16] = 0`?

    The...
  5. @vjmuzik is right. QNEthernet isnít thread safe....

    @vjmuzik is right. QNEthernet isnít thread safe. But Iíll add that you could access it from a single thread and it should work fine, even if that single thread shares time with other threads. (Iím...
  6. Sure. Could you add a link back to this post too?

    Sure. Could you add a link back to this post too?
  7. How to: stdio (printf, scanf, stdout, stderr, stdin, fgetc, etc.)

    I thought I'd share my experience with adding support for the stdio functions and standard streams.

    The Teensy uses a standard library called "Newlib" (or "Newlib-nano", depending on how your...
  8. Replies
    16
    Views
    590

    @luni could you describe the conditions where an...

    @luni could you describe the conditions where an edge interrupt can be triggered multiple times for the same edge?
  9. Replies
    86
    Views
    6,259

    @rya I've attached a different way to do the...

    @rya I've attached a different way to do the AdvancedChatServer; it just shows some other approaches. I've also made some changes to the library in the repo, so you might need to download the latest....
  10. Replies
    86
    Views
    6,259

    A few more comments :) Also, you've asked great...

    A few more comments :)
    Also, you've asked great questions.

    1. I was wrong about replacing `if (clients && !clients[i].connected())` with `if (!clients[i].connected())`. As your code is structured...
  11. Replies
    2
    Views
    213

    This is a really nice project.

    This is a really nice project.
  12. Replies
    86
    Views
    6,259

    I tried the program and it seems to work fine....

    I tried the program and it seems to work fine. Some notes and questions:

    1. Do you have the latest QNEthernet installed in your Arduino libraries folder? (The latest is v0.10.0, and not available...
  13. Replies
    86
    Views
    6,259

    Can you show the code you’re using? It’s easy to...

    Can you show the code you’re using? It’s easy to have resource leaks. Yes, you can use multiple clients.
  14. Replies
    86
    Views
    6,259

    I just released v0.10.0. The changes: ###...

    I just released v0.10.0. The changes:



    ### Added
    * Added a way to send raw Ethernet frames. The new function
    is `EthernetClass::sendRaw(frame, len)`.
    * Added new sections to the README:
    ...
  15. I've noticed that I've never seen hard crashes...

    I've noticed that I've never seen hard crashes when using the PlatformIO toolchain. I see at least several a day, and sometimes several per hour, if I use the Teensyduino IDE v1.55 regularly. We're...
  16. Replies
    6
    Views
    427

    Where is the file Debug/print.h from? Maybe I’m...

    Where is the file Debug/print.h from? Maybe I’m missing something, but I don’t see that file in either NativeEthernet or in the Teensy cores (there’s a debug/printf.h file in teensy4, however).
    ...
  17. Replies
    16
    Views
    10,893

    Ok. Sounds like pre-Teensy 4, don’t need F(), but...

    Ok. Sounds like pre-Teensy 4, don’t need F(), but for Teensy 4 I need F() again. Thanks again, @KurtE.
  18. Replies
    16
    Views
    10,893

    Thanks, @KurtE. I was afraid of that answer. In...

    Thanks, @KurtE. I was afraid of that answer. In theory, then, do I need to define a PROGMEM variable for every string literal if I want them to go into PROGMEM? Can I teach the linker to tag const...
  19. Replies
    16
    Views
    10,893

    Just so I'm absolutely clear, on Teensy 4, do...

    Just so I'm absolutely clear, on Teensy 4, do `const` things still go into flash automatically?
  20. Cool, thanks! I used the “send email” link and...

    Cool, thanks! I used the “send email” link and not the “private message” link. (My email can also be found in either library.json or library.properties of that repo, for future reference.) Thanks for...
  21. Regarding #2, PJRC already publishes the full...

    Regarding #2, PJRC already publishes the full Teensy 3.2 schematics: https://www.pjrc.com/teensy/schematic.html

    What would be the harm with leaving this up? It’s a learning opportunity for others,...
  22. Replies
    86
    Views
    6,259

    @jdredd: There’s code in the NativeEthernet...

    @jdredd: There’s code in the NativeEthernet library that blocks (a spinning `while` loop) unless a cable is plugged in. QNEthernet can tolerate having a cable unplugged, even when the cable is...
  23. I’m curious why websockets would be better than a...

    I’m curious why websockets would be better than a regular socket here. Seems like a little more overhead. According to http://eng.kifi.com/websockets-vs-regular-sockets/, websockets are for...
  24. Replies
    86
    Views
    6,259

    It’s been on my mind the last few days. When I...

    It’s been on my mind the last few days. When I have some time, I’ll maybe look into what’s required to implement it from an API perspective. What would a good API look like to you? I know what 1588...
  25. Replies
    0
    Views
    186

    Missing ".h" suffix for USBHost_t36 include

    See this issue: https://github.com/PaulStoffregen/USBHost_t36/issues/74

    If the include file does not have a ".h" suffix, programs won't compile.
  26. Replies
    34
    Views
    1,451

    Cool stuff, thanks. I’m trying to diagnose which...

    Cool stuff, thanks. I’m trying to diagnose which problems are due to the stack, and which might be user code.
  27. Is it possible the forum doesn’t support...

    Is it possible the forum doesn’t support different files having the same name?
  28. Replies
    34
    Views
    1,451

    It’s okay if it doesn’t happen all the time. As...

    It’s okay if it doesn’t happen all the time. As long as the program is short (or as short as you can make it), I’ll have a look at it.

    Some options that should speed things up:
    1. Pre-generate...
  29. Replies
    34
    Views
    1,451

    Thanks. Ideally, if you could reproduce it with a...

    Thanks. Ideally, if you could reproduce it with a much shorter program, that would be great. I’m going to request that you do the work of trimming it while still seeing errors, until the program is...
  30. Replies
    34
    Views
    1,451

    Please post your whole program, or at least a...

    Please post your whole program, or at least a minimal program that demonstrates the issue. If I cut and paste into the Arduino IDE and it doesn’t compile or run, I can’t look at it.
  31. Replies
    6
    Views
    334

    @UncleMa I just added an `Ethernet.sendRaw(frame,...

    @UncleMa I just added an `Ethernet.sendRaw(frame, len)` function to the library. Watch for that when next I push "v0.10.0-snapshot".
  32. Replies
    6
    Views
    334

    Yep, that’s the one, and also LWIP_HOOK_VLAN_SET....

    Yep, that’s the one, and also LWIP_HOOK_VLAN_SET. See ethernet.c:ethernet_output(). Define those in lwipopts.h. (You may already know this; just stating it for future readers.)
  33. Replies
    6
    Views
    334

    Alternatively, do you just need to enable VLAN...

    Alternatively, do you just need to enable VLAN tagging? lwIP, I believe, supports that, and I could look into how to add that to QNEthernet.
  34. Replies
    6
    Views
    334

    You could probably adapt the initialization code...

    You could probably adapt the initialization code from either the NativeEthernet or QNEthernet libraries and just utilize the send function, taking into account some of the state management as...
  35. Replies
    86
    Views
    6,259

    I just released v0.9.0. The changes: ###...

    I just released v0.9.0. The changes:



    ### Added
    * Added example that uses `client.writeFully()` to the "How to write data to
    connections" README section.
    * Added `EthernetClient::close()`...
  36. Replies
    34
    Views
    1,451

    I’d still love to know what’s going on with your...

    I’d still love to know what’s going on with your setup. I can’t get a local connection to connect in more than 8 milliseconds. All told, each connection, write, read, and stop() call takes...
  37. Replies
    34
    Views
    1,451

    This is an off-the-cuff attempt at pipelining...

    This is an off-the-cuff attempt at pipelining requests. Note that `relayNONE` changes its meaning slightly. You might need a variable with a different meaning. In fact, unless you actually read the...
  38. Replies
    8
    Views
    2,800

    @aom It's possible to use a Teensy to translate...

    @aom It's possible to use a Teensy to translate Art-Net to and from DMX, using just the Teensy.
  39. Replies
    33
    Views
    1,537

    It looks like you have an extra semicolon here: ...

    It looks like you have an extra semicolon here:



    if (dmxToggle == HIGH); {
    playDmx();
    }
  40. Replies
    34
    Views
    1,451

    Thanks for that. When I have a chance, I'll show...

    Thanks for that. When I have a chance, I'll show you how to pipeline everything properly (well, "mostly" properly, short of writing a complete HTTP client) into one request to avoid TCP...
  41. Replies
    34
    Views
    1,451

    What is the delay between the relays (this was my...

    What is the delay between the relays (this was my question, not the total time)? Sounds like about 250ms?

    Update: While I think about why this is (it may have something to do with the 250ms TCP...
  42. Replies
    34
    Views
    1,451

    @jimmie, in addition to commenting out that while...

    @jimmie, in addition to commenting out that while loop in EthernetClient::stop(), did you also have a call to client.flush() after writing all the data? stop() flushes too; I'm just wondering if it...
  43. Replies
    34
    Views
    1,451

    @vjmuzik you may be right. I have a while loop in...

    @vjmuzik you may be right. I have a while loop in stop() because the Arduino spec says the connection timeout is also for that function. I now see the wisdom of your close() function. Iíll look into...
  44. Replies
    34
    Views
    1,451

    Whenever you use print/println/write, you...

    Whenever you use print/println/write, you **MUST** check the return value. If you send many small packets to the network, it will get a little backlogged and then start not sending data. You can...
  45. Replies
    34
    Views
    1,451

    Here's an off-the cuff change: void...

    Here's an off-the cuff change:



    void allRelayOFF()
    {
    if (setRelayStatus(1, 0))
    {
    relayNONE = false;
    setRelayStatus(2, 0);
  46. Replies
    9
    Views
    1,279

    I have a PR that fixes the pixel/bits ordering on...

    I have a PR that fixes the pixel/bits ordering on a Teensy 4 (tested using a Teensy 4.1): https://github.com/FastLED/FastLED/pull/1309

    The current code doesn't display correctly.

    To alter the...
  47. Replies
    34
    Views
    1,451

    Barring any mistakes I've made, and I don't...

    Barring any mistakes I've made, and I don't guarantee there aren't any, I've attached a revamped version of that file you attached (webServer.ino). You might want to do a diff to verify my changes.
    ...
  48. Replies
    34
    Views
    1,451

    The problem is also that you're sending little...

    The problem is also that you're sending little chunks one at a time to the stack. I would, even instead of replacing all "print" or "println" with "writeFully", drastically reduce the number of...
  49. Replies
    34
    Views
    1,451

    Replace print with writeFully and println with...

    Replace print with writeFully and println with writeFully, but adding “\r\n”. Note that in HTML, you don’t really need to append those CRLF characters. I’d suggest just using writeFully without the...
  50. Note that I forgot to add to that README section...

    Note that I forgot to add to that README section that the client class now provides a writeFully implementation, so you donít need to provide your own.
Results 1 to 50 of 354
Page 1 of 8 1 2 3 4