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. Maybe this gives you a head start: void...

    Maybe this gives you a head start:

    void setup()
    {
    for (int i = 0; i < 3; i++)
    {
    pinMode(i, OUTPUT);
    }
    }
  2. Replies
    6
    Views
    105

    Have a look at tyCommander...

    Have a look at tyCommander, it nicely handles uploading when there is more than one Teensy on the bus. It remembers which firmware to load onto which board (uses the serial number for this). You can...
  3. Replies
    6
    Views
    105

    Funny, completely forgot that I wrote that WIKI...

    Funny, completely forgot that I wrote that WIKI article :-). Anyway, good that it finally was of any help.
  4. Replies
    6
    Views
    105

    Wild guess: Can it be that your custom Teensy...

    Wild guess: Can it be that your custom Teensy does not set a usb serial number or sets the same usb serial number (42949672951 / 9 FFFF FFF7?) on all devices? I know that then at least Windows gets...
  5. Yes, but the VIn pin goes to a on board voltage...

    Yes, but the VIn pin goes to a on board voltage regulator which generates the 3.3V. I use external voltage supply all the time, as suggested by defragster I always supply 5V at VIn and never got any...
  6. Regarding the encoder part of your project you...

    Regarding the encoder part of your project you might be interested in the EncoderTool (https://github.com/luni64/EncoderTool)


    It supports normally connected as well as multiplexed encoders...
  7. Replies
    5
    Views
    84

    Shouldn't this...

    Shouldn't this https://github.com/FrankBoesing/Teensy_Logger/blob/3d95ce0e79bad14998d2455787b452549d23d321/teensy_logger.h#L57 be LOGDEVICE not Serial?
  8. Replies
    5
    Views
    84

    Looks useful, maybe I'm just blind but where do I...

    Looks useful, maybe I'm just blind but where do I find it :-)

    Edit: OK, I'm blind....
  9. Replies
    1
    Views
    78

    Don't use the L293 to drive modern steppers. This...

    Don't use the L293 to drive modern steppers. This ancient chip is only good for very cheap voltage controlled motors like the 28BJ-48. These days practically all steppers are current controlled and...
  10. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    @MatA: Can you give the current version on GitHub...

    @MatA: Can you give the current version on GitHub a try (need to download from the master branch, there is no release yet)

    Tested on a LC with this code, which compiles and blinks now:

    ...
  11. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    That looks like a bug. Sorry, I don't use the LC...

    That looks like a bug. Sorry, I don't use the LC much. Probably something LC specific.
    I'll have a look later today
  12. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    Actually 'hours' is one of the functions from the...

    Actually 'hours' is one of the functions from the new (since c++11) std::chrono namespace which deals with handling time. Since v3.0 the TeensyTimerTool supports this namespace by default. If you...
  13. Replies
    28
    Views
    610

    Great, you can probably add the other options...

    Great, you can probably add the other options (e.g. optimization) to your FQBN (teensy:avr:teensy40:usb=serialmidiaudio) as well (see #15 for an example of a full FQBN). All in all the...
  14. Replies
    28
    Views
    610

    Isn't it a bit tedious and error prone to read...

    Isn't it a bit tedious and error prone to read out all those flags from boards.txt manually? Also some of those flags have dependencies which makes it even more complicated. The builder extracts...
  15. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    I'd love to help you but, as I wrote in my last...

    I'd love to help you but, as I wrote in my last post, I really need to see your sketch. Ideally some minimal version which I can compile and which shows the behaviour you describe. Without seeing...
  16. Replies
    28
    Views
    610

    These define where the builder stores the...

    These define where the builder stores the binaries and the cache file. You can choose any path you like for them. Did you read the documentation I linked in the last post?
  17. Replies
    28
    Views
    610

    Honestly, I don't understand the question. This ...

    Honestly, I don't understand the question. This


    $(BUILDER) $(FLAGS) -prefs=build.extra_flags=-DMY_DEFINE=42 -build-path=$(BUILD_PATH) -build-cache=$(BUILD_CACHE) -fqbn=$(FQBN) $(HARDWARE)...
  18. Replies
    17
    Views
    652

    I added a top level section "Timing, delays and...

    I added a top level section "Timing, delays and clocks" and filled in some information about delayXX, millis and the elapsedXX functions. It also contains links to a recent dive into the std::chrono...
  19. Replies
    28
    Views
    610

    I just saw that you want to pass additional...

    I just saw that you want to pass additional defines to the compiler. This can also be done easily but you need to tweak platform.txt a little bit. Scroll down to the ##compile c++ files section and...
  20. Replies
    6
    Views
    236

    Nope, never did anything with audio but I'm sure...

    Nope, never did anything with audio but I'm sure answers will pop in quickly...
  21. Replies
    28
    Views
    610

    Maybe I misunderstand something, but couldn't you...

    Maybe I misunderstand something, but couldn't you simply call the arduino builder? Here a makefile I generated for you with VisualTeensy in "Ino-mode". The makefile is for Win10. Depending on the...
  22. Replies
    6
    Views
    236

    You can set the priority of any interrupt by ...

    You can set the priority of any interrupt by


    NVIC_SET_PRIORITY(irqnum, priority)

    irqnum is the number of the interrupt. For T4.x you find the irq numbers in imxrt.h...
  23. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    I can have a look but I need your calling code...

    I can have a look but I need your calling code and some information how to identify your issue.

    Here already a few remarks to your code:


    Any reason why you define your timers in the sketch...
  24. I'm having a similar issue with the...

    I'm having a similar issue with the TeensyTimerTool. I solved it by using __has_include:

    config.h


    #pragma once

    #if __has_include("userConfig.h")
    #include "userConfig.h"
    #else
  25. Replies
    17
    Views
    652

    I already added a draft with notes about the...

    I already added a draft with notes about the content. If it gets big enough we might think of a own section indeed. https://github.com/TeensyUser/doc/wiki/Timers-and-delays

    He he, very smart...
  26. Replies
    17
    Views
    652

    Unfortunately, I have absolutely no knowledge...

    Unfortunately, I have absolutely no knowledge about it. But I just added a stub here: https://github.com/TeensyUser/doc/wiki/Snooze-Library Feel free to add some info.
  27. Interesting, do I understand correctly that it...

    Interesting, do I understand correctly that it actually calculates the sum of ITCM and DTCM and warns if this is > 99% of 512Mb?
  28. Replies
    17
    Views
    652

    I can add something tomorrow. Currently there is...

    I can add something tomorrow. Currently there is only information about the cycle counter and how to extend it to 64bit in it. https://github.com/TeensyUser/doc/wiki/Using-the-cycle-counter
  29. I might be completely wrong, but as I understand...

    I might be completely wrong, but as I understand it, ITCM and DTCM share a common 512kB RAM (RAM1). So, you need to make sure that the sum of ITCM and DTCM is not larger that 512kB. The linker...
  30. I use the following linker parameters in my...

    I use the following linker parameters in my makefiles:


    -Wl,--print-memory-usage,--gc-sections,--relax -T$(CORE_BASE)/imxrt1062.ld

    with the --print-memory-usage the linker will generate a much...
  31. Nor am I, but I can confirm that transferring...

    Nor am I, but I can confirm that transferring more than 10MB/s is not a problem, even with c# which definitely is not designed for speed. I assume that python won't be any slower but there certainly...
  32. Replies
    245
    Views
    19,899

    Nothing to apologise! PIO is well known around...

    Nothing to apologise! PIO is well known around here. If you like it just use it. It is a really great piece of software.

    If you are interested why VisualTeensy is around I recommend to read...
  33. Replies
    245
    Views
    19,899

    See here...

    See here https://github.com/luni64/VisualTeensy/releases for a version (v0.9.9.2) hopefully able to handle spaces in paths. I also activated the build cache which will accelerate Arduino-Builder...
  34. Replies
    245
    Views
    19,899

    Actually, the differences between a standard...

    Actually, the differences between a standard c/c++ program and an Arduino ino sketch are marginal. Mostly you need to take care that you declare your functions before you use them. Easiest is to...
  35. Replies
    245
    Views
    19,899

    Ok, looks like this time your path with spaces...

    Ok, looks like this time your path with spaces strikes. Can you try to add double quotes to line 23 of the makefile like shown here? This fixes it for me.


    BUILD_PATH := "$(abspath...
  36. Replies
    245
    Views
    19,899

    Funny, but I can reproduce it. I'll have a look....

    Funny, but I can reproduce it. I'll have a look.

    Any chance I can talk you into using the normal vsTeensy build system for new projects? It is so much better, works out of the box, has all your...
  37. Replies
    13
    Views
    354

    Glad it works. In case you are interested, here...

    Glad it works. In case you are interested, here some remarks:



    void activate()
    {
    pinMode(pin, OUTPUT);
    if (digitalRead(pin) == LOW)
    digitalToggle(pin);
    ...
  38. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    As discussed per PM the reason for this is a...

    As discussed per PM the reason for this is a glitch in vsTeensy. The generated makefile double compiles libraries when you install them in the shared folder and additionally locally in your project...
  39. Thread: TeensyTimerTool

    by luni
    Replies
    240
    Views
    12,740

    Yes, that's true. You can opt out of the use of...

    Yes, that's true. You can opt out of the use of the chrono extensions if you don't like it. (But since you are doing a chronometer the new chrono stuff might come in handy? See also:...
  40. Replies
    13
    Views
    354

    Sure, here a solution using the TeensyTimerTool...

    Sure, here a solution using the TeensyTimerTool. BlinkAsync takes the number of blinks and the blink period. It then starts the blinking in the background. You can see that the sketch already prints...
  41. Replies
    245
    Views
    19,899

    No, that is new to me. Thanks for the pointer....

    No, that is new to me. Thanks for the pointer.
    Just gave it a try by adding --delegate to the makefile manually and it works nicely. It can also be used to workaround the current TyTool confusion...
  42. Results are easy to interpret: it takes 1-2Ás if...

    Results are easy to interpret: it takes 1-2Ás if Accelstep doesn't need to do any steps. it takes about 40Ás if it needs to do some steps. So, you won't be able to do more then 25`000 steps/sec with...
  43. Your code includes the time for print which is...

    Your code includes the time for print which is probably much longer thant he ticking takes...
    Do this instead:


    uint32_t start = micros();
    tickSteppers();
    uint32_t end = micros();...
  44. I'm not very familiar with AccelStepper. As far...

    I'm not very familiar with AccelStepper. As far as I remember it actively limits the max speed, but this might have changed.

    If you want to run your steppers with 64000 stp/s you need to make...
  45. moveAsync moves the motor in the background so...

    moveAsync moves the motor in the background so that you can do other stuff while they move. Your code starts the async move and then waits until the move is finished. If you want to do other stuff...
  46. The cast to double might not be atomic thus it...

    The cast to double might not be atomic thus it might get interrupted by doCount which could lead to weird effects. For a quick test you could disable interrupts during the cap_F calculation.

    Edit:...
  47. Replies
    16
    Views
    444

    :) . Yes, the library system sucks but I get...

    :) . Yes, the library system sucks but I get slowly used to it. However, adding 3d to the parts is much easier than with Eagle. And the simple *.step export is fantastic if you need to design...
  48. Replies
    6
    Views
    318

    I briefly looked over your code. This int...

    I briefly looked over your code.

    This

    int WireWrite(uint8_t command[], uint8_t ADDR, int I2CBUS)
    {
    int command_length = sizeof(command) / sizeof(command[0]);
    if (I2CBUS == 0)
    {
    ...
  49. Replies
    16
    Views
    444

    I used Eagle since about 1985 and it always just...

    I used Eagle since about 1985 and it always just worked. However, since it was integrated in AutoDesk (con)Fusion it gets more and more complicated to use. A couple of month ago I switched to KiCad...
  50. Replies
    69
    Views
    1,766

    To avoid confusion with users of 3rd party...

    To avoid confusion with users of 3rd party uploaders I want to mention that (in Serial mode) this update changes the usb device from a CDC class on device level to a composite device with a CDC class...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4