Not a C fan either... I grew up on a mainframe using PL/I, Fortran and COBOL...
The main working components of your program need to be either within the braces of setup, or within the braces of loop. In this case...
@Micki What kind of encoder do you have? Is it an incremental or absolute? When you show a data and clock line, that implies an absolute position encoder. If it is a mechanical switch type, then it is likely an...
Hi Frank, Yep, it looks like the times are preset as I look at your library code. The trick is that by using a null callback, you can cheat and get an immediate shutdown (can't remember where I found that tidbit). For...
Well, I found something very interesting. If I put these statements in setup, I get the elusive reset button! A push of the on/off button turns the T4 off and then right back on. If I set press_on_time to 50 ms or...
It looks like there are 4 possible button hold down times for powering off the T4 - 5 sec, 10 sec, 15 sec or turn off the ability to power off using the on/off button. I am able to set these and they work as...
The problem with my method is that rapidly changing values can induce flicker. Another approach is to save the current value of each character or characters to be updated. At update time, rewrite the old value in...
I think the problem you are having is that new characters just overlay what is already on the screen. Here is a typical thing that I do to clear the portion of the screen in preparation for new characters:
...
Thanks Frank, I appreciate it! It is the aluminum panel that came with the box. I drilled it and cut the display window with an old-school nibbling tool. The graphics are just printed on plain paper with .015 inch...
Very cool, thanks Paul. I'm not sure how much attention my project will ultimately get, but the simple, straightforward operation of the Teensy.exe loader is priceless in terms of support time required.
Thanks everyone, I appreciate the help. Now that I understand the symptoms, I will be better prepared to help others with this project going forward. I will add this to the troubleshooting section of the user manual....
I recently completed a project using a Teensy 4.1. Works great. A friend of mine duplicated it. Also works great. Another person is duplicating it but can't get the hex file to load. Hovering the mouse over the...
Thanks @defragster! I finally have a way to software reset the Teensy! I have been looking for this for a while so that people don't have to keep unplugging to reset the Teensy if they power cycle the connected SDR...
Hi Neal,
This thread should have the info you need.
https://forum.pjrc.com/threads/65716-Teensy-4-x-where-to-find-documentation-about-the-throughhole-contacts-in-the-middle
Len
Hi Scott, not being familiar with the encoder you are using, it looks like QuadEncoder myEnc1(1, 1, 0, 0, 4); does not have enough parameters. You are on channel 1, Phase A pin 1, Phase B pin 0 (unused??), pin pus 0,...
My T 4.1 has been running non-stop for a little over 10 hours in a 70-ish degree F room. At 528 MHz, it ran about 58 deg C. At 150 MHz it looked to stabilize around 54 deg C (not too scientific - I did not wait long...
Thanks for the information. My Teensy is indeed in its permanent location in an enclosure. I will add some code to look at temps over the course of a day. Even when in heavy use, the MCU is mostly just looking for...
Very interesting discussion... I just moved my clock speed down to 528 MHz, and for my application (provides buttons and knobs for a Flex SDR radio), I see no difference in performance. Since my gizmo is not likely to...
Have you tried increasing the SPI clock speed? I did that with an HX8357 display by passing the SPI clock speed in the begin. tft_Track.begin(30000000) to set it to 30MHz for example. You will need to look at the...
Hi Michael, I think the pin you have as Reset is actually the programming button. It does not reset (the on/off does that sort of...) but puts the 4.1 into programming mode. If held for 15 seconds, it clears flash and...
Hi Jimmie, in my app, I set up the serial port, then the SD Card, then the ethernet (using NativeEthernet.h), so I don't think that is it. I do it in this order to allow me to get ethernet config info (IP address) from...
I am trying to understand the proper SPI frequency to use with an Adafruit HX8357 and a Teensy 4.1. I am using the Teensy libraries and currently have SPIClock set to 40 MHz. This works great on my project. I have a...
Nevermind, I solved it. After adding the tft reset that I thought fixed the problem, it started happening again. I began to suspect the SPI clock speed, and changed my tft.begin(); to tft.begin(30000000);. Instant...
Hi Kurt E, I have a Teensy 4.1/Adafruit HX8357 project that uses your excellent HX8357_t3n.h library. My project is nearly done and working well (I'm at the code clean-up and documentation phase...). A couple of days...
Hi grinch,
Here is how I deal with it:
/***************************** GetConfigFile ***************************/
void GetConfigFile()
{
if(MenuActive)
{
tft.fillScreen(HX8357_NAVY);
...
@borogove, I have had that same problem, and in every case it has been a poor connection. You might want to be sure that your wiring is solid on the encoders causing issues.
I edit and compile from the Arduino (Teensyduino) IDE. It gives me quick access to everything, including the serial console. My technique is to code a little, test a little, so I like staying in the IDE.
Thanks for the response BriComp. I am not trying to compile one program for multiple boards. Each of my boards has its own code. I was hoping that there was a compiler directive that would allow me to set the board...
Lately, I have been playing with several Teensy boards (3.6, LC, 4.0, 4.1), often hooked together. Tweaking code back and forth means having to remember to set the board correctly every time. Is there a compiler...