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
    23
    Views
    7,177

    No no, this is how it would work: void...

    No no, this is how it would work:



    void myCallback(int position, int delta)
    {
    Serial.printf("pos:%d delta:%d\n", position, delta);
    }

    //....
  2. Replies
    498
    Views
    298,239

    Did you try ResponsiveAnalogRead?...

    Did you try ResponsiveAnalogRead? (https://github.com/dxinteractive/ResponsiveAnalogRead) This library is fantastic in getting stable reads from pots and similar slow devices.
  3. Replies
    23
    Views
    7,177

    Perfect. ValueChanged and ButtonChanged are...

    Perfect.
    ValueChanged and ButtonChanged are useful indeed. But, attaching a change callback to the encoder or button can be even more useful :-).


    The library can do both, polled mode with...
  4. Replies
    23
    Views
    7,177

    Looks like you are using an old version of Bounce...

    Looks like you are using an old version of Bounce which doesn't have readCurrentState(). Removing the override does make the compiler happy but the push button feature won't work. However, as long as...
  5. Replies
    19
    Views
    12,322

    You might also give VisualTeensy a try: ...

    You might also give VisualTeensy a try: https://github.com/luni64/VisualTeensy/wiki/Quick-Start-Guide. I usually get 'from scratch' compile times of about 6s and recompile times of 1-2 sec on my...
  6. Replies
    23
    Views
    7,177

    I can't help you with adopting Theremingenieurs...

    I can't help you with adopting Theremingenieurs library but I can point you to my EnocderTool which works with T3.x and T4.x. It should also be bounce free and has a couple of other nice features...
  7. Perfect, Hope you do not expect too much...

    Perfect,
    Hope you do not expect too much performance wise. If you need really good loadcell readouts you should go for an external ADC like the HX711.
  8. Sorry crosspost. Unfortunately the library is not...

    Sorry crosspost. Unfortunately the library is not blessed with a lot of tags / releases. -> See post #16
  9. So, I assume you are not too familiar with git. ...

    So, I assume you are not too familiar with git. I therefore rolled back the changes in ADC to the last commit (52a0d77) with the old enableInterrupt() and did a git archive of it: 21876. If you...
  10. It looks like the ADC library had some breaking...

    It looks like the ADC library had some breaking changes recently. Maybe the simplest and quickest would be to checkout an older version of the ADC library.
  11. Replies
    16
    Views
    379

    Maybe this ...

    Maybe this https://github.com/TeensyUser/doc/wiki can make you happy. It has a chapter about alternative toolchains and uploaders.
  12. Replies
    208
    Views
    16,741

    Should be empty now...

    Should be empty now...
  13. Replies
    6
    Views
    438

    attachYieldFunc

    Here yet another additon to my TeensyHelpers repository:

    Sometimes your have code that needs to be called by the user as often as possible. Prominent examples are AccelStepper where you are...
  14. Replies
    208
    Views
    16,741

    Sure, you will be able to choose share/copy for...

    Sure, you will be able to choose share/copy for each library. Similar to the 'copy the core files' to the project setting.

    BTW: I'm also thinking of doing a library development mode which makes...
  15. Replies
    208
    Views
    16,741

    The c_cpp_properties.json should be autogenerated...

    The c_cpp_properties.json should be autogenerated if, after you adjust vsTeensy.json, you reopen the project in VisualTeensy and save it again.

    The "dummy" project is there to be able (in a later...
  16. Replies
    208
    Views
    16,741

    This is still on my todo list. :-( However,...

    This is still on my todo list. :-( However, VisualTeensy only shares libraries from the 'shared library repository'. Libraries from the other repositories are copied to the project by default. So,...
  17. Replies
    3
    Views
    203

    Any chance I can talk you into testing my encoder...

    Any chance I can talk you into testing my encoder library https://github.com/luni64/EncoderTool/wiki?


    It uses dedicated state machines for encoders with mechanical detents (at 2 or 4...
  18. Replies
    6
    Views
    438

    I added an option to the IntervalTimerEx.h header...

    I added an option to the IntervalTimerEx.h header for those who prefer good old void(*)(void* state) callbacks to pass state to callbacks.

    Instead of the std::function<> way :


    class...
  19. Replies
    21
    Views
    6,602

    What's wrong with delayNanoseconds() ? ...

    What's wrong with delayNanoseconds() ? https://github.com/PaulStoffregen/cores/blob/b1ba3875803219a13df7ebfd641b3ddfd9689240/teensy4/core_pins.h#L1804
    If you need it for T3.x it should be...
  20. Replies
    21
    Views
    6,602

    The toolchain generates *.lst files per default....

    The toolchain generates *.lst files per default. They are copied to the build folder. Here https://github.com/TeensyUser/doc/wiki/GCC#analyzing-compiler-output a link to the user WIKI with some...
  21. Thread: TeensyTimerTool

    by luni
    Replies
    217
    Views
    9,827

    Very good :-)

    Very good :-)
  22. Thread: TeensyTimerTool

    by luni
    Replies
    217
    Views
    9,827

    Nothing I'm aware of. If you can post some...

    Nothing I'm aware of. If you can post some minimal example showing the effect I can have a look.
  23. You can also use a ready to go, multi channel...

    You can also use a ready to go, multi channel servo driver like this one https://www.adafruit.com/product/815. Besides not having to care about pin protection, voltage translation etc you can...
  24. I never used the TFT library and can be...

    I never used the TFT library and can be completely wrong but doesn't the API suggests to call waitUpdateAsyncComplete(void) before you do a new update? ...
  25. Replies
    12
    Views
    292

    Perfect, sounds like a simple solution ...

    Perfect, sounds like a simple solution ...
  26. Replies
    12
    Views
    292

    Right Wrong :-) while in Halfkay mode...

    Right



    Wrong :-)

    while in Halfkay mode the board accepts a reset command which does not load new firmware but just resets the board. Technically, in halfKay mode the board acts as HID...
  27. Replies
    12
    Views
    292

    Couldn't you simply use tyCommander...

    Couldn't you simply use tyCommander? It has a reset button. If your board hangs so badly that it doesn't respond to the reset button you can always press the reboot button on the board prior to...
  28. Does this work? You might need to finetune it to...

    Does this work? You might need to finetune it to your needs...



    void setup()
    {
    while(!Serial);

    for (int value = -1200; value <= 1200; value++)
    {
  29. Doesn't answer your question about the Quad...

    Doesn't answer your question about the Quad timers but if you just need to generate quadrature signals you can have a look here https://github.com/luni64/EncSim for a corresponding library. It works...
  30. Replies
    6
    Views
    438

    Oh, that sounds complicated :-) Yes,...

    Oh, that sounds complicated :-)



    Yes, definitely. The second example in #1 shows how to attach a non static member function to the IntervalTimerEx.

    (BTW, all hard- and software timers of...
  31. Replies
    6
    Views
    438

    attachInterruptEx

    I also added an attachInterruptEx function to the repo. Same as with IntervalTimerEx from above it does exactly the same as the standard function but accepts anything callable (functions, lambdas,...
  32. Replies
    6
    Views
    438

    IntervalTimerEx - Callbacks with state

    I often need to pass state to callbacks attached to an IntervalTimer. Since the IntervalTimer only accepts void(*)() callbacks, it is a bit tedious to work around. I therefore did a shallow wrapper...
  33. Would a RS232 Half duplex driver work?...

    Would a RS232 Half duplex driver work? https://www.analog.com/media/en/technical-documentation/data-sheets/2801234fe.pdf? On page 12, fig15 you find an application which should do what you want. You...
  34. Actually, to expand the 4067 based solution to 32...

    Actually, to expand the 4067 based solution to 32 encoders you only need an additional inverter (or transistor) to get a 5th address line (S4). you can directly connect the outputs of the 4067...
  35. Added support for encoder buttons in v2.1.0. They...

    Added support for encoder buttons in v2.1.0. They are debounced by the Bounce2 library. Unfortunately the Bounce2 library included in Teensyduino is a bit outdated. You need to install the latest...
  36. Replies
    2
    Views
    178

    Without any additional header you can also do: ...

    Without any additional header you can also do:



    for(int pin : {1,2,17})
    {
    pinMode(pin, OUTPUT);
    // or of course any other function requiring the pins...
    }
  37. Replies
    2
    Views
    178

    pinMode & initializer lists

    Here a (IMHO) nice supplement for the pinMode function utilizing 'modern' c++ features

    file: pinModeEx.h (attached)


    #include <initializer_list>
    #include "core_pins.h"

    inline void...
  38. Congratulations, looks cool indeed. Here a few...

    Congratulations, looks cool indeed. Here a few remarks:



    The T3.2 is 5V tolerant by design. So, the voltage divider to get the 5V input down to 2.6V is not really needed. (But won't hurt of...
  39. I once did it for a T3.5 which worked good: Here...

    I once did it for a T3.5 which worked good: Here some info, a video of a debugging session and links to the required hardware changes https://github.com/luni64/VisualTeensy/releases/tag/v0.9.7.0....
  40. While it is of course possible to change the...

    While it is of course possible to change the period of an Intervaltimer on the fly it might be more direct to use one shot timers instead. In case you are interested, here a version using 4 of the 16...
  41. Replies
    30
    Views
    1,681

    I had a look at the grblHAL repositiory. It...

    I had a look at the grblHAL repositiory. It indeed has much improved lathe support. Looks like I have a nice winter project :-)
  42. Replies
    30
    Views
    1,681

    Your board looks good by the way. I used GRBL...

    Your board looks good by the way. I used GRBL (the AVR version) some years ago to automate my lathe but it didn't support lathes very well then. E.g. no possibility to cut threads. Did this change by...
  43. Replies
    30
    Views
    1,681

    Cool, now the chinese are even cloning chinese...

    Cool, now the chinese are even cloning chinese (Leadshine) products :-) Anyway, I use an original Leadshine DM556 and can confirm that this is a really good driver.
  44. Replies
    208
    Views
    16,741

    Regarding the comma + space, this seems to be...

    Regarding the comma + space, this seems to be just a comma separated list of folder and filename. If you start the loader from Arduino you see the same.
  45. Replies
    208
    Views
    16,741

    That is absolutely strange, I was able to...

    That is absolutely strange, I was able to reproduce your issue, then I switched back to an Arduino installation without spaces in the path and it worked. Switching back to the installation with the...
  46. Replies
    208
    Views
    16,741

    Thanks, I can reproduce this with your settings....

    Thanks, I can reproduce this with your settings. Strange thing, I'll have a look now.



    Unfortunately 'make' gets absolutely confused if it works on a path with spaces. On the other hand the...
  47. Replies
    208
    Views
    16,741

    I just gave it a quick try. Works without issue...

    I just gave it a quick try. Works without issue here.

    Can you please also remove the @ from the upload command in the makefile to see what it actually spits out:

    21587


    I get a perfectly...
  48. Replies
    208
    Views
    16,741

    That's interesting. I don't use the loader much...

    That's interesting. I don't use the loader much (I prefer TyCommander). So, it might well be that a bug sneaked into the last release. If you post the generated makefile I can have a look.


    ...
  49. Good, don't forget to set the count mode to...

    Good, don't forget to set the count mode to 'CountMode::full ' if you have encoders with no detents. Default is 'quarter'. Will be interesting to see it working with 16 encoders and the 74165. ...
  50. OMG, never thought that library.properties is...

    OMG, never thought that library.properties is actually parsed during build... why? Anyway, looks like some line breaks sneaked into it which broke it. I'll fix that tomorrow.
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4