Looks like there is support in mainstream Marlin for Teensy 4.0 and 4.1 at https://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/HAL/TEENSY40_41
Type: Posts; User: Dave X
Looks like there is support in mainstream Marlin for Teensy 4.0 and 4.1 at https://github.com/MarlinFirmware/Marlin/tree/2.0.x/Marlin/src/HAL/TEENSY40_41
I haven't done it yet, but I really like the looks of the Pulse Injection metal detector circuit on https://www.lammertbies.nl/electronics/pi-metal-detector combined with the curve-fitting method on...
You can get a hint at where the Arduino/Teensyduino architecture-specific objdump program is by enabling "Show verbose output during:" "compilation" in Teensyduino preferences and inspecting the last...
The referral to the Bounce documentation on https://www.pjrc.com/teensy/td_libs_Bounce.html to the https://playground.arduino.cc/Code/Bounce/ is a bit confusing because the playground.arduino.cc is...
The http://www.team221.com/robotopen/product.php?id=155 sensor is not a digital quadrature device, it uses magnetic sensors to produce an analog encoded absolute output.
I saw that bit of code, but I think the difference is in the pinMode() code -- AVR's code twiddles 1-2 bits but ARM has more options and more bits to handle, and PJRC's code re-writes the register:
...
1/400Hz is 2.5ms, 2500us or 1500000 cycles on a 600MHz machine.
You could do some software debouncing by ignoring too-fast changes:
void REFRISE() {
RPMPulse1 = micros() - RPMPulse2;
...
I copied some tachometer code from https://www.homemade-circuits.com/tachometer-using-arduino/ which had an attachInterrupt() before setting the pinMode() and discovered that on the Teensy 3.2,...
Here's a table derived from .../Java/hardware/teensy/avr/cores/teensy3/core_pins.h with some cutting, pasting and sorting of the Teensy 3.1/3.2 defines (see "#if defined(__MK20DX128__) ||...
Maybe update the tutorial advice on https://www.pjrc.com/teensy/pins.html for the differences between different Teensy architectures? It currently focuses on PIND and the 21 pin Teensy.
Is there...
CLK and DATA are normal names for encoder signals. If you read DATA on the rising edge of CLK, it tells you whether you turned one detent left or right. CLK and DATA match up exactly with a...
Are you using an encoder with detents?
The detents are often set at a particular point in the quadrature cycle, so if you disable interrupts and happen to only poll read() when the encoder is at...
I own a 1000 Line-Per-Revolution/ 1000 Pulse Per Revolution / 4000 A/B edges Per Revolution optical encoder that looks like it tops out around (100Kint/sec)/(4000int/rev)*60sec/min = 1500RPM if I...
Hi All,
I made a simple barometer for my son's Cub Scout belt loop:
https://raw.githubusercontent.com/drf5n/BarometerLCD/master/Breadboard.png
The code is on github at...
I used a Teensy 3.0 to save replacing a Sun Ultra 40 M2 375-3476 motherboard ($500 refurbished) when the fan speed controllers seemed to be shorted out.
By cutting three the blue PWM control...
If you change the last rule of 49-teensy.rules to read:
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789]?", MODE:="0666" \
, SYMLINK+="cu.teensy.p$attr{idProduct}...
And for the Teensy 3.1 the compiler flag is
-D__MK20DX256__ so for teensy 3.0 and 3.1 specific code you could wrap it in:
#if defined(__MK20DX256__)|| defined(__MK20DX128__)
...
#endif
https://www.pjrc.com/teensy/loader_cli.html has the sources files.
This worked on mine:
$ OS=MACOSX SDK=/Developer/SDKs/MacOSX10.6.sdk make
cc -O2 -Wall -DUSE_APPLE_IOKIT -isysroot /Developer/SDKs/MacOSX10.6.sdk -o teensy_loader_cli teensy_loader_cli.c...
I took the PJRC SD adaptor and put a 7-pin right-angle header on it with the two extra pins extending beyond MISO, I then connected the +5V to the pin adjacent to MISO and the pad next to the 'V' in...
Some small details for the Teensy 3.0:
The internal reference is 1.2V, can be read with analogRead(39). The internal reference may be chosen with analogReference(INTERNAL),...
The library at http://playground.arduino.cc/main/DHT11Lib worked for me with a Teensy 3.0:
#include <dht11.h> // from http://playground.arduino.cc/main/DHT11Lib
dht11 dht;
// Plug DHT11...
On the older thread, Madox pointed to some hints that might help make the relatively unmaintained USBIP work without the BSOD.
I think Ian started the thread as http://forum.pjrc.com/threads/23741-remote-programming-with-openwrt but it looks like the issue might be that USB/IP cli connects a specific remote USB to a local...
There seems be one in (SIM_UIDH,SIM_UIDMH, SIM_UIDML, SIM_UIDL).
Note that this sketch sometimes seems to hang/or kill the USB serial on my teensy3 after powerup or reload after the '...'. I'm...
@taskman: I seem to crash my teensy at the FTFL_FSTAT = FTFL_FSTAT_CCIF; line in the setup()->read() code below. If I comment out the initiation of the flash command in read(), it produces the full...
http://www.pjrc.com/teensy/loader_cli.html version 2.0 doesn't look like it supports Teensy 3.0
http://www.pjrc.com/teensy/beta/load_linux_only.c looks like it does Teensy 3.0, but linux-only.
...
OT--SysTick documentation: I thought that since this SysTick stuff in doesn't seem to be in the MK20DX128 reference manual at http://www.pjrc.com/teensy/datasheets.html, folks might want to look at...
Blend the ReadASCIIString example and the Blink example.
I've been working on porting a c (non-c++) program to Teensy 3.0 and found this to work to get to a fairly plain hello world response:
mkdir JUNK
cd JUNK
cp -a...
The Makefile doesn't process .ino files into C or C++ files, so I think that all you are getting is a bare 0x4f4 byte file based solely on the mk20128dx.ld file.
You are missing a main() routine...
Paul,
Would it be good to add a -D__MK20DX128__ to in the CPPFLAGS in the Makefile to make it consistent with the Arduino compile?
Or maybe in mk20dx128.h add a #define __MK20DX128__ or an...
Thanks. That helps a lot. I'm sort of messing with porting some ISR()-using code, and I'm happy to not have to mess with it.
Maybe pasting your message on...
CORE_TEENSY seems to be defined during Makefile compilations, but not during default Arduino compilations. I modified the above sketch to check for CORE_TEENSY.
Edit: if I #include "WProgram.h"...
That works in Arduino, but it doesn't seem to get defined using the Makefile. With verbose Arduino compliation output, I see that it is set. And the command line option seems to be set on my Mac...
What's the best way to test for the chip/device being compiled & maybe provide for alternate code for programs on the the teensy 3.0?
I saw some tests in...
If I put that into main.cpp and try to compile it with a Makefile, I get warnings that the attributes are ignored:
main.cpp:44:1: warning: 'signal' attribute directive ignored [-Wattributes]...
I think the mk20dx128.c & mk20dx128.h files now have the appropriate lines to let you set up your own interrupts without modification . The only one that isn't predefined as a weak alias to...
If one needed non-periodic interrupts, like for coordinated-axis stepper motor control as in https://github.com/triffid/Teacup_Firmware/blob/Gen7/timer.c#L85, would trying to use FTM1 (and...
Here's another differential ADC code for the Teensy and Teensy++:
#define MUX_1V1 0b011110 // works for both
#define ADMUX_MASK 0b11111 // MUX4..0 in ADMUX works for both
#define...
640x480*10fps at 8 bits/pixel = 3Mbyte/sec. To get it down to 2Mbit/sec, you'd have to compress it more than 12:1, so you'd have to do all your input, processing, compression, and transmission in...
From the measurements above, it looks like my alligator-clip-breadboard circuit has about 8 counts of noise. At x200 gain and 2.56V AREF, 1 count is 2.56/512/200=25uV, so that's already...
I've been fiddling with the x1 X10 and X200 gain differential ADC on the Teensy++ and hooked it up to a Type K thermocouple. Here's my code so far:
/* SPICE-ish Connections:
USBcable...