I copied your code into Arduino IDE. But it does not compile for Teensy 3.6 or Teensy 4.1. Error is regarding use of Keypad library.
Maybe you're using an old copy of Arduino IDE or Teensyduino? Or perhaps some other software?
Since a Teensy 4.x is so fast, I would add a delayMicroseconds(1); after the clockpin going low as well, like so:
uint32_t SPIencoder::readRegister(void){
// Initiate variables
uint8_t inputstream = 0;
int outputVal = 0;
uint8_t...
To troubleshoot, try adding delay at startup to give enough time for the USB enumeration to complete. Usually 1.5 seconds is enough for Linux. You might need 2.5 seconds or more for Windows.
If the problem is happening inside a C++...
Programs which crash too early do this.
Please try loading a simple "Hello World" program, without FreeRTOS and CAN libraries, just to confirm the upload process and serial monitor are still working. If not, please try testing with Arduino IDE.
10 inches is probably fine if you use shielded cable or twisted pair or even just 2 conductors held close together.
What actually happens will really depend on whether your environment has something noisy which tends to couple to the wires...
As usual for blog articles, shout-out on 4 social networks
https://bsky.app/profile/paulstoffregen.bsky.social/post/3kqe6a5mq432f
https://mastodon.social/@PaulStoffregen/112288541665182235
https://www.facebook.com/groups/1470129233297275
Let's continue any conversation about BitByte on your other thread.
https://forum.pjrc.com/index.php?threads/bitbyte-learn-create-play.74870/
I'm going to close this prior thread.
Article posted on the website today.
https://www.pjrc.com/bitbyte-handheld-console/
Hopefully it helps your Kickstarter campaign! :)
I see you have another older thread...
Any chance you might share the project or at least photos? Would probably be useful for others. And even if you're not looking to share the code and circuit details, just photos (or a cell phone video uploaded to youtube) and basic info could...
Which Teensy model are you using?
I see you're doing float math as 64 bit double, even though you store the results into 32 bit float. Especially if using Teensy 3.2 which lacks FPU, use sinf() rather than sin().
Please check which version of Teensyduino you have installed. If using Arduino IDE 2.x.x, click Boards Manager and type "teensy" in search. If using Arduino IDE 1.8.x, click Help > About.
Indeed this was needed with older versions.
Before...
You could find the _reboot_Teensyduino_() function and delete its code.
Finding the correct file on your hard drive can be a challenge. Pay attention to the folder name, as separate code is used for Teensy 3.x vs Teensy 4.x, and you might have...
You might consider this line when millis() grows to more than 23 bits (the size of float mantissa), which takes a little over 2 hours.
float tempo = (float)millis()*0.003f;
You'll gradually lose millis precision. Maybe that matters, or...
My guess is the sin() function. Its input is in radian units, so ideally you should be giving it numbers between 0 to 6.28 (or whatever Pi * 2 is).
But after your program has run for only 4 seconds, even for the first LED (i == 0) the numbers...
The U2 chip that comes soldered to Teensy 4.0 or 4.1 is never meant to be used on a DIY circuit board. The T4 bootloader chip (IC_MKL02Z32_T4_QFN16) is meant for that DIY purpose.
If you desolder U2 from Teensy 4.1 and attempt to use it on a...
Captured the USB communication today.
It's definitely something going wrong on the Teensy side. What exactly is still a mystery. I'm going to dig deeper soon...
Just to confirm, I'm running the code from msg #9 on a Teensy 4.1 and the PC side code on Ubuntu 22.04. It runs for about 20 seconds and the orange LED blinks, then it freezes. Is that what you're seeing?
Might be good to explain about the problem you're trying to protect.
You said "external voltage regulator spikes", which seems strange as usually voltage regulators aim to give consistent voltage output, without spikes.
But in general for...
Teensy 3.2 is not coming back.
Angelo's comment about the financial risk is spot-on, exact for the "small" part. A word like "certain" or "inevitable" would be better.
Just to explain clearly, Teensy 3.2 was already a mature product when the...
I ran several tests just now. The display is not reliable without CS (shorting it to GND). I did get it to work a few times if another program has previously used the same display by driving CS. But I couldn't get the display to ever work from...
Another concern to consider with hot plugging is the inrush current during connect and high frequency effects (mainly due to self inductance of the wire) at connect and disconnect.
The USB 2.0 spec has an excellent summary of the issues in...
RS232 might mitigate most of the concerns. Look for RS232 chips which can handle accidental connection to 12V.
You might also consider a PTC fuse on the 12V supply side. They won't protect Teensy from damage, but if something goes wrong in the...
I would still worry about 12 volts on the same connector if this will ever be hot plugged. For example, imagine what might happen if the 12V pin and one or more of the data pins mate before GND.
Modern connectors meant for hot plugging usually...
Sorry if I missed this detail earlier, can you say how long the wire is and any other details about the physical construction we can't see from the diagram?
Any chance the 4 pin connector could be plugged in backwards by mistake? Or even if it has a shape that can't fully mate backwards, is it possible for the 12V to touch the other pins even briefly if someone tries to plug it in the wrong way?
If using Linux or Windows or MacOS using Arduino 2.x.x, simplest way is to find those files on your hard drive and simply replace them with copies downloaded from github. The new IDE installs stuff into hidden folder, AppData on Windows...
Source control systems like git and supporting online service like github bring a lot of valuable features. But like most tech with valuable features, if you're not feeling the need for those features it usually just becomes a burden to learn...
Please do not ask the same question on multiple threads. You may believe this increases your changes for help, but the reality is it only make a bad first impression for people who would like to help. Most of us look at the latest activity page...
This is the download page.
https://www.pjrc.com/teensy/td_download.html
Scroll down to "Arduino 1.8.x Software Development" for the links to the files that work with Arduino IDE 1.8.19.
No, there isn't any easy way to do this. There are very difficult ways, unless it's Lockable Teensy running in secure mode. But even with Lockable Teensy, you could program your key into the fuses and then desolder the flash chip and use...
0.12V is indeed unusual.
Metal shorts conduct very well, so you normally wouldn't see so much voltage unless the metal short is a really extreme situation, like one of the really cheap and extremely thin breadboard wires with longer length, or...
I see yesterday you showed a PCB that mounts Teensy 4.1 to this Aliexpress CS42448 board.
https://forum.pjrc.com/index.php?threads/cs42448-board-6-audio-inputs-8-outputs.72479/#post-341711
Is that the hardware you're using?
Do you have more...
I don't understand your schematic. It shows many connectors, but no idea of what's really connected to them.
I see 17 LEDs (D1 to F16 and also D41) and 16 more mysterious 6 pin parts (Y1 to Y16) inside a box labeled "DIODES". But as nearly as...
There is a way. Whether it's "easier", well, you can be the judge of that...
Each board (or "package" that serves all boards of the same type) has its own "libraries" folder. All you need to do is copy the library you want to that folder and...
I'm glad you're making progress.
But please consider nobody here can see what you're really doing with enough detail to retrace your steps closely to reproduce the problems you're encountering. In fact, I'm not even really sure which code...