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

Search:

Type: Posts; User: luni

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    42
    Views
    907

    I don't know much about Python, so an honest...

    I don't know much about Python, so an honest question: are you sure that this is not a python thing? E.g. in #1 I see this:



    data += packet


    I don't know how python handles such things...
  2. This will then also pull the resistors on the B...

    This will then also pull the resistors on the B side low not high right?
  3. Maybe I'm missing something but on your schematic...

    Maybe I'm missing something but on your schematic DIR doesn't seem to be connected. The /OE on pin 19 is only connected to the resistors and some other ICs. You write that the resistors are pull ups...
  4. Replies
    3
    Views
    225

    Thanks for the info. I think I'll add an option...

    Thanks for the info. I think I'll add an option for an easy switch between new-lib and nano-lib in VisualTeensy and see if I observe some disadvantages in the next months.
    Besides the impressive...
  5. Replies
    42
    Views
    907

    Here a measurement of the transferrate vs...

    Here a measurement of the transferrate vs Blocksize from 1000 Bytes up to 1E6 Bytes per transfer block for a total transfer size of some 10MB (10x10^6 Bytes). No transmit error detected.

    26125
  6. Replies
    42
    Views
    907

    I think I've got success working around (at...

    I think I've got success working around (at least) parts of the issue in Win10. It turned out that the data dropping only occurs if the teensy is sending freely into the Win10 host. As documented in...
  7. Replies
    42
    Views
    907

    I saw your reports about the printed stuff. It...

    I saw your reports about the printed stuff. It looks like some buffer overrun or something similar on the PC side. So this is certainly a bug. I'm just wondering if this (call it buffer overrun) is...
  8. Replies
    42
    Views
    907

    Hm, both Python and all the other shown tests use...

    Hm, both Python and all the other shown tests use the underlying Windows CDC driver (usbser.sys). So, it might definitely be something related to this driver. I ordered a STM32F746 evaluation board...
  9. Replies
    42
    Views
    907

    Interestingly, I did very similar tests in summer...

    Interestingly, I did very similar tests in summer (sending from Teensy to Win10 PC) and ended up with exactly the same result as described by ardvark. I was using the standard C# serial classes. I...
  10. Replies
    3
    Views
    225

    Using nano-lib instead of new-lib

    From time to time weird issues and workarounds pop up when using the STL with Teensies. Latest examples:


    68342-std-deque-Won-t-Compile-for-Teensy-3-x
    68366-std-string-causes-link-error
    ...
  11. Replies
    14
    Views
    501

    There is a weird linker issue which sometimes...

    There is a weird linker issue which sometimes doesn't link in _write (which is defined in print.cpp). You can work around this by placing a dummy Serial.println("") into startup. There are some posts...
  12. Replies
    27
    Views
    1,549

    E.g. foreach (var board in...

    E.g.


    foreach (var board in watcher.ConnectedTeensies.Where(t => t.Ports.Any())) //loop through all connected boards which expose at least one COM port
    { ...
  13. As Paul already mentioned, the price for...

    As Paul already mentioned, the price for abstracting an interface is that you need to stick to the smallest common denominator. RTTI would kind of help but is way too expensive for Microcontrollers....
  14. Edit: ups crosspost Here an example how to...

    Edit: ups crosspost



    Here an example how to do this:



    #include "Arduino.h"
    #include "FS.h"
  15. Replies
    258
    Views
    36,520

    Ok, I'll update the beta with the fix later...

    Ok, I'll update the beta with the fix later today. Have fun with VisualTeensy
  16. Replies
    258
    Views
    36,520

    Did you add the QNEthernet library to your lib...

    Did you add the QNEthernet library to your lib folder or to the shared library folder?

    Edit:
    You probably did, I can reproduce that when including the lib from the shared libraries repository
    ...
  17. Replies
    70
    Views
    3,595

    See here...

    See here https://forum.pjrc.com/threads/53604-Compiling-Teensy-Sketches-with-VisualCode-(Win10)?p=289285&viewfull=1#post289285
  18. Replies
    258
    Views
    36,520

    Problems compiling QNEthernet were reported here:...

    Problems compiling QNEthernet were reported here: https://forum.pjrc.com/threads/68066-New-lwIP-based-Ethernet-library-for-Teensy-4-1?p=289276&viewfull=1#post289276

    The reason for the issue is...
  19. Replies
    70
    Views
    3,595

    This library contains its own copy of the system...

    This library contains its own copy of the system file errno.h. For some reason the the core includes the library file instead of the correct system one. Probably some lookup order issue in the...
  20. Replies
    804
    Views
    86,705

    You find the info and link to the sources here:...

    You find the info and link to the sources here: https://github.com/luni64/TeensyTimerTool/wiki/Avoid-PWM-timer-clashes
  21. Just as a side note: Does changing line 242 in...

    Just as a side note:
    Does changing line 242 in time.cpp to


    getExternalTime getTimePtr = []{return (time_t) Teensy3Clock.get();}; // pointer to external sync function, default syncs to the...
  22. Replies
    27
    Views
    1,549

    Sorry, thought I mentioned it :-) Its in the...

    Sorry, thought I mentioned it :-)
    Its in the development branch of the Github repo. I.e. go to https://github.com/luni64/TeensySharp switch the branch from master to development and download it.
  23. Replies
    119
    Views
    28,337

    You might want to try this...

    You might want to try this https://github.com/luni64/TeensyStep4 (very experimental at the moment but should work somehow)

    The API changed significantly. Main difference is, that I disposed the...
  24. Replies
    27
    Views
    1,549

    Meanwhile I had a look at the library. Since it...

    Meanwhile I had a look at the library. Since it is not used very often I have to admit that it is not very well maintained. The main problem is, that it can not detect Serial Teensies with the new...
  25. Replies
    27
    Views
    1,549

    1.3Mb is quite large, but lets see... I'll be...

    1.3Mb is quite large, but lets see...
    I'll be traveling tomorrow but I can have a look on Thursday
  26. Replies
    27
    Views
    1,549

    Thanks for the input Kurt, but the 0x6000000...

    Thanks for the input Kurt, but the 0x6000000 issue was the first I stumbled over when I extended the code for the T4 :-) So that should work. Anyway, should be easy to fix as soon as the hex file is...
  27. Replies
    27
    Views
    1,549

    Can you post the hex file which shows the problem?

    Can you post the hex file which shows the problem?
  28. Replies
    16
    Views
    874

    Reserve returns false if it can't reserve. So...

    Reserve returns false if it can't reserve. So just check the return value...



    No, reserve uses malloc which can not throw....
  29. He, he, that's cool indeed. Thanks for checking. ...

    He, he, that's cool indeed. Thanks for checking.
    So, still the same conclusion right? If you want to check for out of memory condition use new(std::nothrow).
  30. I wouldn't call it a bug. Actually, I expected...

    I wouldn't call it a bug. Actually, I expected the crash since new is supposed to throw a bad_alloc exception which clashes with the fact that the sketch is compiled with -fno-exceptions (which is...
  31. Allocating memory with 'new', new(std::nothrow), testing -fcheck-new

    Triggered by this https://forum.pjrc.com/threads/68201-Is-using-a-quot-String-quot-still-a-bad-idea?p=288694&viewfull=1#post288694 I was doing a few experiments with detecting out of memory...
  32. Replies
    16
    Views
    874

    Yes this can be confusing. Maybe it is possible...

    Yes this can be confusing. Maybe it is possible to change the default behavior somehow? Need to goolgle this on a rainy Sunday afternoon...
  33. Replies
    16
    Views
    874

    I'm confused ?!? What do you expect that this...

    I'm confused ?!? What do you expect that this code should do? You are allocating memory in loop without ever releasing it and not checking if the allocation was successful. Since the Teensy doesn't...
  34. Replies
    11
    Views
    1,420

    . No deep deep thought behind that. I'm just used...

    . No deep deep thought behind that. I'm just used to pass structs by address into functions. Passing by reference would work the same of course. (and, probably the real reason: on a german keypboard...
  35. Replies
    11
    Views
    1,420

    As you also suspect, this sounds like an error...

    As you also suspect, this sounds like an error somewhere else. Just to exclude some unknowns, here a version which doesn't use the chrono clocks at all. It simply reads out the RTC, calculates...
  36. Replies
    11
    Views
    1,420

    There is a lot of template magic but AFAIK no...

    There is a lot of template magic but AFAIK no pointer magic. TimePoint::now simply returns a 'duration value' which consists of the value of the RTC counter (number of crystal periods) multiplied...
  37. That's definitely correct, thanks for spotting...

    That's definitely correct, thanks for spotting it. Without volatile, the compiler can assume that nothing was ever written to 'count' and could optimize the reading in 'println(count)' away. In this...
  38. You need to google for "lambda expression". They...

    You need to google for "lambda expression". They come in handy for such short functions and usually give the compiler more optimizing options (if you call a function through a function pointer the...
  39. I was interested if the T4 is able to count 10ns...

    I was interested if the T4 is able to count 10ns pulses. According to the measurements shown here: https://forum.pjrc.com/threads/57185-Teensy-4-0-Bitbang-FAST?p=212248&viewfull=1#post212248 a simple...
  40. Looks like you are interested in this stuff :-)...

    Looks like you are interested in this stuff :-) Here some code which utilizes the seldom used RTC interrupt to update it every second....
  41. That's true of course. The snippet defragster...

    That's true of course. The snippet defragster copied is from a software timer where this is called from yield() so this shouldn't be a problem (if the timer isn't ticked much faster the whole...
  42. Maybe I'm over cautious but one never knows what...

    Maybe I'm over cautious but one never knows what spikes are on such signals. I'd rather destroy a cheap buffer than the expensive controller.


    I'd simply count the pulses for a start. I don't...
  43. No, I'd stick with the step controllers, that...

    No, I'd stick with the step controllers, that ensures that you end up with the right position. Just precalc the speed of each motor that they reach their target at the same time.


    Yes, as soon...
  44. Sounds interesting indeed. Your detector...

    Sounds interesting indeed. Your detector generates 50ns pulses which should be long enough to trigger a pin interrupt. Voltage ranges also look OK. I'd consider to not directly connect the teensy to...
  45. Hm, that was not what I meant. I was interested...

    Hm, that was not what I meant. I was interested in a minimal example. Anyway, I extracted the info I needed from your huge sketch and did this:



    #include <TeensyStep.h> // library for...
  46. Can you please post a full sketch including the...

    Can you please post a full sketch including the setup of the controller and the steppers?
  47. Replies
    8
    Views
    412

    Here the float version. Just realized that you...

    Here the float version. Just realized that you only need the lower 32bit of the counter which simplifies it even more:




    void setup()
    {
    while (!Serial) {}
    pinMode(0, HIGH);
    }
  48. Replies
    8
    Views
    412

    AFAIK the built in RTC can only generate...

    AFAIK the built in RTC can only generate interrupts at 1s, 1/2s, 1/4s.... so that wont help. But you can easily read out the RTC clock period counter and use this for your timing:

    Here an...
  49. Replies
    69
    Views
    2,720

    Disclaimer: If I'm not a sleepwalker somebody...

    Disclaimer: If I'm not a sleepwalker somebody else must have said that :-)
  50. Makes a lot of sense. Tested your additions,...

    Makes a lot of sense.

    Tested your additions, works fine for me.
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4