Ears have been burning again, been re-writing project codebase. Noted a thread about encoders and Midi.
Here is the essence of what my project does with EncPlex. Variations tested on T3.2 - T4.1, Usb Type = MIDI....
To use other SPI ports, see lines 54-57 in the SdFat_Usage example:
https://github.com/PaulStoffregen/SD/blob/97ca5355b19095d9956fea902eb8f85eca312a4b/examples/SdFat_Usage/SdFat_Usage.ino#L54
Board arrived today!
The timing looks much better. Pleased so far.
< 500 ns count is 999999
< 750 ns count is 1
< 1000 ns count is 0
< 1500 ns count is 0
....
Sum of counts is 1000000
With the SD library with SPI1 and SPI2...
Look at the Examples->SD->SdFat_Usage example
It shows some example on how to do things like that, including:
//ok = SD.sdfs.begin(SdSpiConfig(chipSelect, SHARED_SPI,...
I am completely re-breadboarding the whole project, and drawing the circuit diagram as I go to post here.
I decided maybe the better option was to utilise the SPI1 and SPI2 ports on the Teensy 4, but now not so sure...
Make sure you have the latest VLI firmware installed (for the VIA USB chipset), by installing rpi-eeprom,
sudo apt install rpi-eeprom
then rebooting the 'Pi, and finally running rpi-eeprom-update,
sudo...
With DC motor power -> no motion
Power Slave Teensy -> no motion
Remove power from Slave teensy -> still no motion
Yes, it appears that only after the master-slave connection do the motors (controlled by the slave)...
Your code above did not work for me. I had to add delay(10) to the loop.
But your code can be simpler. Just divide the myEnc.read() by 4. And then check for the difference being positive or negative.
#include...
Seems details on the hardware controllers, motors and connections may be needed for related answers.
Wondering: If Master, Slave, DC unpowered::
> Plug in DC motor power: results?
> Then power Slave Teensy:...
I want to use a teensy 4.1 to be able to monitor the audio signal from the PC obtaining it's approximate FFT.
Since I recently installed liquid cooling for the processor and video card of the PC, I would also like to...
Hi,
Working on making a robot that uses multiple Teensy 4.0's to actuate many pairs of motors (5 motors controlled by each Teensy). Each of these Teensy's is controlled by a master Teensy 4.0 that communicates over...
Hi Paul,
my apologizes for my misstake in midi I accidentaly activate the midi output on teensy port after disable output to teensy midi port all work OK.
For info I write this code to send midi only when +4 or -4...
Here is a version of the previous that has been simplified to reduce it to 2881 KB. I took out the silkscreen features and also some internal features of the microsd card and usb port
Hi all,
i am trying to embed Lua 5.3.6 as an arduino library for different boards. Until now i have tested it on an esp32 dev module, and a pi pico, it works nice.
I would like it to support Teensy boards, especially...
Good luck. I know at least with some RPI like TFT displays I have played with. They roll their own and maybe don't use any standard chipset like the SSD...
Thanks, I'll take a look at that.
This one was sold by RPIGear. I'm trying to find out what chipset it uses (on the underside of the backpack) and is a 20 pin chip. A 2004A display with possibly a PIC16LF1829-I/SS...
Obviously it will depend on which display you are trying to use...
But for example SSD1306 - I would try Adafruit_SSD1306
They have a constructor:
Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi = &Wire,
...
What libraries work with a T4.1 with a I2C Wire2 output for the common 20x4 LCD panels?
So far I'm batting zero with the ones I've tried. Some are supposed to let you override the default, but either that isn't...
Good morning all (at least my time zone)...
So far I have not seen the SD Pull Request (https://github.com/PaulStoffregen/SD/pull/43) has not been merged.
I am debugging this now. Note sometimes it works.......
Think the contrast is excellent for such a small display and the off-axis performance good as well - titled it about 80 deg (just a guess) and was still able to see the display clearly.
@defragster - sorry just saw the post. Yes @KurtE incorporated those changes into his fork of the SD library. Not sure if its been incorporated into Paul's master SD yet?
Actually I'm using the much older MSF-XINPUT which seems to be the basis for the ones you link. I should probably start with changing the library altogether :). I don't remember editing core files last time but I...
I have not much experience with MIDI. Just wondering if it is OK to send those messages every 10ms? The encoder library will generate a lot of fast up/down counts if the encoder bounces (which is very likely). So, your...
If the serial monitor shows correct counting of the encoder, than the encoder is fine. I see 4 counts per detent of the rotary encoder.
Is it possible for you to make a photo that shows your wiring of Teensy and...
I have an RPI 4 running Ubuntu 2204, I programmed a T4 with the sketch installed evtest...
It has been running maybe 30 minutes and every time I jumper from T2 or T3 to GND
I receive the events for 9002 or 9903...
Been looking at RTOS; but those are a waste of resource for my user case since I just want a simple CLI based OS I can run on the Teensy. Something similar to what used to run on old computers like the Amstrad CPC or...
This is going to sound crazy to anyone who knows enough to answer, but has anyone attempted to essentially bit-bang an NV-DDR3 interface or similar on a modern NAND device at the lowest speed modes?
For background I...
Yes, the decimal part is discarded when converting the float result to an integer, but 0.5 is added. The modulo value will be <= 64434 as long as 150M/Freq < 65534.5
Maybe I am missing something. Using Serial.printf("%.2f°C\n", tempmonGetTemp()) to monitor the T4.1 I get Tjunction = 74degrees C. It is a pretty full application using two TDM interfaces, a TFT display and a few...
It looks like it rounds down before reaching a modulo. 150Mhz / 2288.88 hz = 65534.235 which is greater than 65534 but equal to when the decimal point is thrown away. I haven't tried 2288.85 yet to see what the LED...
Great idea! I considered that was a likely issue as well, as I could tell if just hard locks if it fails. And yeah, I'll do all the physical diagnostics as well.
Edit: it did not help so far, other than I can now see...
The boilerplate SD startup code in most of the demos (and which you've essentially copied) is poorly conceived, in that it gives the card just one chance to start, then whinges about it forever. I have an SD card which...
It was literally working when connected to my laptop before, I changed nothing other than taking it with me somewhere else and back home, and now it's no longer working, and it has never worked on any other USB power...
I don't use Platformio myself, so no real idea, but your suggestion of installing the Arduino beta then copying the required change across sounds viable. The only changed file you'd need to fix your stated issue this is...
I've been looking into this yesterday too. In the examples menu there are options that show all the wake up modes. I'm just going to try the code and see what happens.
Hard to know...
For example how is your Audio Shield hooked up? Is it the proper Audio Shield for the Teensy 4.x?
What is: SDCARD_CS_PIN set to?
I am assuming pin 10?
Are there other things on your SPI buss?
Thanks, my guess then is:
If you updated your Teensyduino version, it overwrote your changes to the core files.
Look at the Readme file of: https://github.com/dmadison/ArduinoXInput_Teensy
file and it talks...
thank you for the test.
It is very strange, I have same configuration, only teensy model change.
When I comment "usbMIDI.sendControlChange(1, 64, 1);" serial display the position of encoder and it work properly...
I'm having a new issue with my sampler pedal project. Previously, it would work fine (though with some noise, which is a whole other issue) when connected by USB to my laptop, but wouldn't launch when connected to a...
Agree completely with everything you mention. It is very application dependent and you need to pick the sensors and the time update / measurement update scheme to match dynamics. I'll try to remember to post some data...
Same here. I used a 15 state EKF in sounding rockets for state estimation and attitude control with great success. But I think for a pedestal control problem for a small system as RouthUAV was mentioning, using hobby...
Sorry, I don't find that symbol in anything when I do a search in my case <arduino.1.8.19/hardware/teensy/avr>
So I have no idea what it might be.
It might help someone to help you if you included some additional...
If you're connecting the audio shield to a mixer, be sure to use the Line Out signals, NOT the headphone jack. The headphone jack ground is not at the same voltage level as the line out ground.
That is a possibility, I recall that there is a cutoff where older GPS receivers don't work with the newer library (the biggest offender IIRC is that uBlox changed the size of the UBX-NAV-PVT packet), but I don't recall...
I'm using Platformio with the framework-arduinoteensy v1.56 package. Any idea how I can get it to use the 1.57 beta 3? Can I install the beta 3 version into the Arduino IDE and then copy the changed files from the...
Youhoo! I have solved the compiler problem, using a combination of Arduino, VS Code, PlatformIO + reconfiguring some compiling flags. Also one should add the ElapsedMillis.h to a few libs.
If You guys have any interest...
Detail dithering catches me at times too - I did take a minute to find the 'quote from code' ...
millis() and micros() are used for each of the respective 'elapsed' types.
Indeed T_4.x uses a slower timer for...
lol. Yup, there is good support on this forum.
I was getting microsecond accuracy when i was using elapsedMicros before. I'm not sure if i've used it for timing testing since i moved to the Teensy 4.0 from the 3.2....
millis() provides 1 ms accuracy. If you want to test the accuracy of IntervalTimer, read the ARM cycle counter in your callback function, compute the difference between cycle count values, and then convert the...
thank you for your reply. yes that is how i understood it but i just had to be sure. in the final stage of the design i got doubts because this 5V is named VHST in the circuit. but all clear now :-)
So, how does millis() and micros() get their timestamps? do they use timers?
I ask because i am using elapsedMicros to test the timing of intervalTimer and it's jumping about between 124,000 125,000 and 126,000...
elapsedMillis uses millis(), and millis() simply returns systick_count, which is updated in the ISR for the ARM SysTick timer. The Teensy4 systick_isr() from EventResponder.cpp and millis() from core_pins.h are shown...
I've had plenty of luck estimating attitude, inertial velocity, and inertial position of manned and unmanned aircraft with MEMS sensors and GNSS aiding. To be clear, the EKF is only using the GNSS data as the...
Made a quick setup using a Teensy 3.2 and ran your code.
Here is the setup:
Set USB type to "Serial+MIDI". Could not get it to fail...both serial monitor and MIDI-OX keep outputting data:
Using Windows...
The simplest thing is if you look at the T4.1... For example card:
Is don't use the +5V pin marked on the 5 pin USB Host connector. Instead use your +5v power, possibly with a fuse
Today I revisited an old project of mine running on a Teensy LC. Some changes in updated libraries made for a bit of a puzzle but I got it all sorted out. The one thing I can't seem to fix is enabling the USB_XINPUT...
About 6 months ago I invested in an entry-level M1 Mac Mini (8GB RAM 256GB SSD). Overall, I'm very pleased with the system. With the latest version of Teensyduino/Arduino, I am able to compile my programs from...
Mike, are these (other) p#1299 edits in place for SD code: pjrc.com/threads/68139-Teensyduino-File-System-Integration-including-MTP-and-MSC?p=308206&viewfull=1#post308206
... I got Win_github to sync - but not...
thank you for taking the time to help.
just to be sure : on the circuit diagram the usb host pin is named VHST right? And this is the same pin as shown on the features page where an image is shown with details for USB...
OK. I thought I was explaining my issue well enough, but I will endeavour to draw out the circuit later tonight and put that up.
To be fair, this thread is the whole project and not just this issue!
I will return
Simplest way would be to disconnect the host port VUSB pin and connect it directly (through a 2A fuse) to your 5V power supply.
The circuitry on Teensy 4.1 is built around a 0.5 amp maximum current, which is the USB...
Hi,
first of all I'm completely new to Teensy and Arduino and programming in general. I hope the post (length and detail) are OK...
I have adapted the TeensyWI project of Johan Berglund...
brtaylor is right. If your platform has any significant motion, you can't rely on the accelerometer to give you a second attitude reference (the first I assume is your magnetometer). Even with GPS aiding, and if you...
Ok finally got a chance and downloaded your latest changes seems to be working as long as the cards are in the Builtin slot on Teensy start up. If its not and you insert a card it does recognize that you inserted the...
Thanks Paul,
The test work great with my low cost encoder ec11.
I have a problem, when I want to send midi message.
After "oldPosition = newPosition;" I had usbMIDI.sendControlChange(35, 64, 1); to send...
Hi
I use the teensy 4.1. I use external 5V power. So the external 5V goes to VIN. And the track from the device usb 5v is cut.
So far so good.
But i want to use the USB host mode. And I see there is a...
A lot of your errors are build-system related. The error below is indicating that you don't have C++14 or newer available with the compiler.
C:\...\libraries\units-main\src/constants.h:44:20: warning: variable...
Dear Brian, Thank you for your kind response.
"Are you using Arduino with Teensyduino for compilation?"
I am afraid not, I planned to port it to other hardware platform, like ESP32 or STM32.
"EKF was rolled into...