S
Reaction score
25

Latest activity Postings About

    • S
      I’m curious, does initialization order matter? For example, if you initialize CAN first instead of Ethernet. Also, you need to account for millis() wraparound. Either compare with subtraction to a timeout value or use elapsedMillis instead...
    • S
      shawn replied to the thread Onboard LED.
      Also note that this pin is the same as the default SPI clock pin, so if one runs SPI, the LED will flicker, indicating clock activity.
    • S
      shawn replied to the thread Onboard LED.
      Also the LED_BUILTIN constant.
    • S
      You’re welcome. I cannot claim much PlatformIO work, however, other than some how-to posts about it and an EHEX PR in their repo. :) I did write the QNEthernet library, however.
    • S
      Here's how that server library is using the QNEthenet library: It uses the initialization code and the Ethernet ISR, but nothing else. It uses the lwIP API, otherwise, for its entire function (a slightly-modified copy is included with...
    • S
      I just added an option to flush after all write calls. Other than the issue of write() not actually sending all the bytes (eg. because of internal buffers and such), just setting this new option in qnethernet_opts.h should duct tape the original...
    • S
      shawn replied to the thread Receiving Multiple DMX Universes?.
      I’ve got one more thing for you to try: void loop() { bool doShow = false; read = dmxRx1.readPacket(packetBuf1, 0, 513); if (read >= 13) { for (i = 0; i < ledsPerStrip; i++) {leds.setPixel(i, packetBuf1[1], packetBuf1[2]...
    • S
      shawn replied to the thread Receiving Multiple DMX Universes?.
      I’m stumped as to why the Teensy 4.1 is behaving differently than the Teensy 4.0. Are you using the exact same code on both of them?
    • S
      shawn replied to the thread Receiving Multiple DMX Universes?.
      You must use at least "13" because you can't read index 12 (packetBuf[12]) without there being at least 13 valid bytes in the array. read >= 13 is correct, but read != -1 is not, and neither is comparing to "1" or "12" or anything less than "13"...
    • S
      You’ve given me the idea to add multiple interfaces to the QNEthernet library. Right now, it supports either the native Ethernet or the W5500 (this driver is not yet committed, but it’s in a discussion comment in the repo on GitHub). No promises...
    • S
      shawn replied to the thread Receiving Multiple DMX Universes?.
      What happens if you replace both occurrences of if (read != -1) with if (read >= 13)?
    • S
      shawn replied to the thread Receiving Multiple DMX Universes?.
      I’d love to help, but there isn’t any information other than the project “occasionally glitches.” The cause could be anything, and not necessarily the DMX library.
    • S
      Yeah, I expect it to be about the same speed. It’s just the proper way because write() may not send all the bytes requested of it. Since you’re using something like Modbus, I’m guessing that reliability is important to you. Yes, it looks similar...
    • S
      shawn replied to the thread Receiving Multiple DMX Universes?.
      I’m not sure what “glitch” means here. Also, there’s no code, so I don’t know what’s happening. It could be your code and not the library. There’s a gazillion factors.
    • S
      You’re right about writeFully(). I didn’t look at that Modbus library closely. They’re using “Client” and not “EthernetClient”. Ignore the writeFully() note for now. (But write() calls should still technically be called repeatedly until they’re...
    • S
      I just realized that all the bytes still may not get out. Any write() calls (with any library, really) should have their return values checked and then any unsent bytes should be re-sent. write() doesn't always send all the bytes it's given. A...
    • S
      I’ll add: it’s not correct to always assume some write() call (on, say, the Arduino Print interface, which many types of objects implement) completes without buffering. Unfortunately, many programs and libraries assume this. See...
    • S
      A couple of things I noticed at first glance: 1. There's no need to specify a MAC address on the Teensy 4.1 because there's a built-in one. May I suggest using the begin(ip, netmask, gateway) function instead? As well, the one you're actually...
    • S
      If you can share a complete, minimal, example that shows the issue, maybe I could have a look. Also describe how to test it.
    • S
      In my experience, I haven’t needed a threading library to do cooperative threading. It’s possible to design a simple API where each “Task” returns from its own main loop when it’s done or needing to yield. Doing a yield() via a threading library...
    • S
      shawn reacted to PaulStoffregen's post in the thread Teensyduino 1.59 Beta #6 with Like Like.
      I'm packaging up a final 1.59 release now. Going to run several tests and if everything looks good it'll be released this evening.
    • S
      For convenience, here's the contents of that file: Import("env") print("Current CLI targets", COMMAND_LINE_TARGETS) print("Current Build targets", BUILD_TARGETS) def post_program_action(source, target, env): print("Program has been built!")...
    • S
      shawn reacted to Nominal Animal's post in the thread #define placement with Like Like.
      Oh, I just meant that it is nontrivial to do in any case, especially when you only have 320×240 display modules at hand; and not specific to Teensy at all. Making a library too general is feature creep, and since features you cannot test are...
    • S
      shawn replied to the thread Teensyduino 1.59 Beta #6.
      @Paul Yes, it seems to work. What was the fix?
    • S
      shawn replied to the thread Teensyduino 1.59 Beta #6.
      @Paul I’ll try this soon, when I’m next at my laptop; just want to acknowledge I see the link.
    • S
      shawn replied to the thread Teensyduino 1.59 Beta #6.
      Intel. MacBook Pro bought in 2020.
    • S
      See this thread instead: https://forum.pjrc.com/index.php?threads/teensyduino-1-59-beta-6.74402/post-338551
    • S
      shawn replied to the thread Teensyduino 1.59 Beta #6.
      Summary point, repeated at the bottom: Something changed between 1.57 and 1.58 that prevents me from running the built-in Teensy Loader app from the 1.8.19 Teensyduino IDE install in all versions from 1.58 and onwards. I can no longer seem to...
    • S
      shawn replied to the thread Teensy 4.0 DMX Lighting Control.
      It was the board transition to Teensy 4 that probably tripped you up here. Teensy 3’s have their pins 7 & 8(TX) connected to Serial3. Ref: https://www.pjrc.com/teensy/pinout.html
    • S
      shawn replied to the thread Teensy 4.0 DMX Lighting Control.
      Pins 7 & 8(TX) are Serial2. Pins 15 & 14(TX) are Serial3. Ref: https://www.pjrc.com/store/teensy40.html You could either change pins or change Serial3 to Serial2 in the example source.
    • S
      shawn replied to the thread Teensy 4.0 DMX Lighting Control.
      Ah, yes. I have a feeling there’s a few copies of the library files in various places. Perhaps even one inside the example folder or something. I’d have to look more closely at where all your files are to be sure. I’m glad you got it working...
    • S
      shawn replied to the thread Teensy 4.0 DMX Lighting Control.
      It doesn’t look like you have the library installed or installed correctly. First, install TeensyDMX via the Arduino Library Manager. (It looks like you’ve done this.) Next, download the ZIP file and overwrite the contents of wherever TeensyDMX...
    • S
      shawn replied to the thread Teensy 4.0 DMX Lighting Control.
      I see what happened. It’s because I haven’t created a latest release, and that’s where the changes are. Check out the latest on GitHub. If you don’t usually use git, it’s easy to click on “Download ZIP” from the main project page (it might be...
    • S
      shawn replied to the thread Teensy 4.0 DMX Lighting Control.
      Fun fact: The USB Serial port on Teensy actually isn’t affected by the baud rate settings. The speed is whatever speed the USB connection can do. A little while back, I wrote a library called TeensyDMX, and in that library, there’s a fairly...
    • S
      I'm on a Mac (Sonoma) and I've been using the latest Arduino IDE 2.2.1 lately, but had a need to use the lockable Teensy features of the 1.8.19 version. (Both latest version from https://www.pjrc.com/teensy/td_download.html (1.58) and from...
    • S
      shawn replied to the thread Teensyduino 1.59 Beta #5.
      I think the warning is intended for code that may be used to interact with other code or libraries in the future, or if it is intended to itself become a precompiled library. Since most Arduino (or Teensy) projects are standalone, and since all...
    • S
      Are you interested more in the library creator side or using libraries in a more advanced way?
    • S
      Connect a powered USB hub to your USBhost interface to provide enough power for your power-hungry devices. Make sure the define at least one USBHub device in your sketch. Mark J Culross KD5RXT
    • S
      shawn replied to the thread QNEthernet connect() grief.
      It would be amazing (and appreciated) if you could do a little sleuthing for why NativeEthernet seems to behave differently with netcat than QNEthernet does. (Eg. with Wireshark, as you suggest.) That closeOutput() call does a TCP “half close”...
    • S
      shawn replied to the thread QNEthernet connect() grief.
      Hi, quiver. Thanks for using QNEthernet. Source is here: https://github.com/ssilverman/QNEthernet/blob/master/src/QNEthernetClient.cpp Side note: connect() returns an int, not an int8_t. -1 is timeout and 0 means "some other failure", such as a...
    • S
      Until C++20, left-shifting a negative signed value is undefined, alas. That’s one of the reasons first casting to an unsigned is important (as @Nominal Animal points out). (Right-shifting a negative value is implementation-defined.) Ref...
    • S
      Here's some updates: I made a driver for the W5500 that plugs into QNEthernet. You can enable it in the new qnethernet_opts.h file (after overwriting using the ZIP file about to be mentioned). I haven't put it in the latest `master`, but you can...
    • S
      Do you have a small code example that could be tried so the problem can be observed?
    • S
      I’m glad you got it working! Here’s a post I made with a bit of history: Post in thread 'compiler error' https://forum.pjrc.com/index.php?threads/compiler-error.73841/post-333932 The “Ethernet” library is designed to be used with the WIZnet...
    • S
      shawn reacted to Wamor's post in the thread Teensy boot sequence explanation with Like Like.
      Hello, I am new to this forum. I am a software/hardware developer and start using the Teensy 4.1 module as a hardware platform. I am interested in the boot-sequence of the Teensy module and ARM processor and maybe someone can explain this to me...
    • S
      shawn replied to the thread GCC 11.
      Is that variable being modified, say, from an interrupt or something? I’m throwing darts here because we don’t know what the code looks like, but what happens if you also make the variable volatile?
    • S
      I have some time today if anyone wants to join again. I can help with the things I know and can possibly answer any vexing coding questions. Send me a direct message on this forum if you’d like to join. Why am I doing this? Because it’s...
    • S
      See the fill() function. From the source: // Fills all channels in the specified range to the given value. // The behaviour is atomic. // // This returns `false` if any part of the channel range is not in the range // 0-512, or if the...
    • S
      shawn replied to the thread Teensy 4.1 sACN E1.31.
      I’ll add: with the QNEthernet library (instead of NativeEthernet), you can also simply add an Ethernet.joinGroup(multicast-ip) call to wherever you’re initializing Ethernet, and that allows you to keep the regular UDP begin(port) call. Joining a...
    • S
      shawn replied to the thread Teensy 4.1 sACN E1.31.
      You need to join the multicast group instead. Change wherever the UDP socket calls begin(port) to beginMulticast(multicast-ip, port). (This is for the NativeEthernet library, which the example uses.)
  • Loading…
  • Loading…
Back
Top