IIRC the GPIO registers are using the same bus as the quad timers.
I was interested if the compiler generates unnecessary complicated code for this
void setup()
{
constexpr IMXRT_TMR_t* TMR3 =...
There is some activity going on in the current Teensyduino beta where the IntervalTimer already has a std::function like interface. Don't know if Paul plans to add this to attachInterrupt as well.
Anyway, you can...
Oh, I did my PhD in stimulated raman scattering some 30 years ago which was a lot of fun :-)
Will be a challenge to squeeze out enough sensitivity for Raman spectroscopy from a line sensor. Did you think of using your...
Your sensor has a typical readout rate of 500kHz. You will probably transmitt 16bit data which gives a required transfer speed of 1Mbyte per second. This is WAY slower than a T4 can tranmitt to a windows PC without any...
I'm afraid this only affects the counter but not the actual motors. One needs to set the dir pins as well. But doing this right before the step is too late. Drivers need a couple of us lead time on the dir signal...
Added that to the current version on gitHub. Let me know if it works for you.
Example:
#include "Arduino.h"
#include "teensystep4.h"
using namespace TS4;
Stepper s1(0, 1);
Sorry, a dependency on c++17 sneaked into the RTC code. For a quick fix you can either downgrade the TimerTool to v1.3.1 or upgrade TeensyDuino to the current beta version.
Doing this signal generation interrupt based will generate a lot of overhead. So I'd at least not use 2 timers but only one which runs at 2MHz. In its callback you could then decide if you need to set the SH pin or not....
This is a known issue. See e.g. here: https://forum.pjrc.com/threads/71420-Undefined-reference-to-_write?p=318867&viewfull=1#post318867
Easiest workaround is to add an empty Serial.println("") statement in setup.
@KrisKasprzak: Sorry for the late reply. Your beep() probably clashes with the timers used by TeensyStep. It defaults to the 4 timers of the TMR3 module. It can be changed to the other TMRs if needed:
//...
void...
Great!
When testing, I had the impression it still had an issue with doing successive overrideSpeed calls. Did you test this as well? If it works now I'll remove the debug prints and merge it into the main branch.
Thanks that will help.
I already started debugging and fixed a few things in the overrideSpeed code. But, there is still something wrong. Hope I'll find some time to work on it the next days...
If a hex file uploaded with the 1.57 uploader works, but the same hex file uploaded with the 1.58 uploader doesn't work, I'd suspect something in the uploader? Does it work uploading with tyTools...
Your global declaration of
PL_Light light;
PL_Radio radio;
calls the the constructors of light and radio very early in the startup process, when not all of the hardware is initialized yet. Accessing hardware in...
Yes, this replaces the controller moves. You can either do it on the fly as you did or you can predefine the groups you need. The groups are cheap, you can have as many as you like.
GetPosition works, GetVelocity...