Search results

  1. T

    Reading float values from EEPROM reboots Teensy 4.1

    So couldn't you just use EEPROM.get(LOW_ADDRESS_0, START_PRESSURE_LEVEL); EEPROM.put(LOW_ADDRESS_0, START_PRESSURE_LEVEL); instead of your template class?
  2. T

    Reading float values from EEPROM reboots Teensy 4.1

    Any particular reason you didn't use the EEPROM library included with teensy?
  3. T

    Teensy 4.0 / High Voltage Heater

    I cant give you a code snippet since you posted an image instead of text, but to fix the logic I think you need to include the braces but put the close brace between the powerheater = ... line and the first Serial.print
  4. T

    Overflowing RAM

    This problem was reported a while ago. It is marked as fixed but I guess the fix will only be rolled out with the next Teensy release (real soon now)
  5. T

    Writing Data to Teensy 4.1 microSD

    If you look at the source for SDClass::open(), you will see that the only supported value for mode are: FILE_READ - which sets flags to O_READ FILE_WRITE - which sets flags to O_RDWR | O_CREAT | O_AT_END and FILE_WRITE_BEGIN - which sets flags to O_RDWR | O_CREAT so try removing the O_APPEND...
  6. T

    Help Needed: Communication Issue between Teensy 4.1 and Teensy 3.2

    OK. You surely need to wait for some period between sending the "#f" command and receiving the data. At the moment this code Serial1.print("#f"); if (Serial1.available() > 0) {Serial1.readBytes((byte*)q_encoder_1, sizeof(q_encoder_1)); print_q_encoder1();} sends the command and immediately...
  7. T

    Help Needed: Communication Issue between Teensy 4.1 and Teensy 3.2

    Does is behave correctly if you call Serial1.flush(); immediately after Serial1.print(...) to ensure that the text has actually been sent?
  8. T

    Teensy 4 "EEPROM" blocking for flash sector erase

    Any user code can be marked with the FLASHMEM attribute so that it runs from FLASH. This is helpful in memory constrained systems where the total amount of runnable code does not fit into RAM1
  9. T

    Advice on program construction - DMX

    F() is essentially a noop on teensy. See WString.h for its definition
  10. T

    Very high code RAM usage

    What optimization are you using? I have found that GCC using _FASTEST or even just _FASTER can result in some huge code size bloat for sometime negligible speed benefits
  11. T

    SPI bus malfunctioning

    Does the trace look any different if you arrange your code like this SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE1)); digitalWrite(slaveSelectPin, LOW); // take the SS pin low to select the chip: stat = SPI.transfer(0x00); digitalWrite(slaveSelectPin, HIGH); // take the...
  12. T

    Teensyduino 1.59 Beta #4

    Using the instructions here (thanks @shawn) , I installed 1.59B4. All my projects compiled cleanly. Linux 6.6.3, pio 6.1.11.
  13. T

    What happens if a Teensy 4.1 is powered via Vin and USB ast the same time?

    I may be wrong, but I've always thought that the reason for cutting the trace was to protect the PC, not the teensy. I imagine some PCs might not be too happy with >5V being delivered at USB Out
  14. T

    Midi To Servo

    I think you should change: if (channel == MIDIchannel && control == servo1) { value = map(value, 0, 127, 0, 179); value = pos1; myservo.write(pos1); // sets the servo position according to the scaled value delay(15); } to : if (channel == MIDIchannel &&...
  15. T

    mpr121 + teensy 4.0 cap sensing

    Duplicate of this thread
  16. T

    Different-Range FFT Algorithm

    None of those are errors, just warnings. The build completed and you should be able to flash the teensy and test
  17. T

    Need Advice On BolderFlight Sbus Sketch

    Did you try this yet?[0] = ain_val * 2;
  18. T

    Teensy 4.1 powered from 3.3V pin not initializing USB communication

    this thread has some helpful posts, including some current measurements
  19. T

    RA8876 10.1 Inch Eastrising Display and Teensy 4.1 (SPI Issues)

    Yes. I needed to connect every GND pin on the 40 pin connector to Teensy GND to get reliable comms
  20. T

    RA8876 10.1 Inch Eastrising Display and Teensy 4.1 (SPI Issues)

    Try reducing the SPI speed, perhaps the 10" long wires are too long.
  21. T

    Can't import Audio Library (v.1.3) in a private library in a PlatformIO

    Does it work if you add lib_ldf_mode = chain+ to your platformio.ini?
  22. T

    Need help saving serial data to SD card

    It seems your rx_arr is too short and overflows. There are more than 90 characters in the last line printed in the serial monitor
  23. T

    Feature Suggestion: PCApp to display the Serial Monitor output without Teensyduino.

    Did you try just running teensy_serialmon from a cmd prompt?
  24. T

    SPI.transfer() not blocking / code executing out of order? (T 4.1)

    See this link for details on setting build optimizations in PlatformIO
  25. T

    U4 component is hot

    If you scroll a little further down that same page you will find this Teensy 4.1 manufactured after March 2022 has TLV75733P (U4) replaced by NCV8186AMN330TAG, and BAT54C (D1,D2) replaced by BAS40-05V. and Teensy 4.1 manufactured after March 2023 has U4 replaced by TLV75533P, D1-D2 replaced by...
  26. T

    Teensy 4.1 linker script is really wrong

    The ITCM is allocated in 32K pages. So 256K+32K=288K. This is what the "padding:xxxx" is referring to in teensy_size output
  27. T

    Teensy 4.1 linker script is really wrong

    I thought we went through this in your previous thread
  28. T

    Teensy 4.1 : cannot make use of "free" memory - resulting in FW crash

    Linux only. If you're feeling brave, add -fstack-usage and rebuild everything. Then execute this fugly oneliner $ find . -name "*.su" -print0 | sort -t$'\t' -n -r -k2,2 --files0-from - | less to find the low hanging fruit at the top of the list.
  29. T

    Teensy 4.1 : cannot make use of "free" memory - resulting in FW crash

    That "free" memory is where your stack is located. If your code needs more than 50K of free stack space to run, then it will crash
  30. T

    Using EXTMEM to Place Variables in External PSRAM

    All malloc (and new) calls allocate from the heap which is located in RAM2. To confirm just print the address.
  31. T

    map() producing out of range result

    You might try adding a constrain() to the value returned from perlin.noise() to ENSURE that the value is between -1 and 1
  32. T

    Yet Another File Player (and recorder)

    Your PC takes some amount of time after connecting for the serial link to be established. Try delay(1000) after Serial.begin() so your Serial.println's will actually be displayed
  33. T

    Teensy 4.1 and Lora RMF95W

    In general, all digital pins can detect changes. So any of those should work fine.
  34. T

    Anyone tried MTP library under Vscode-Platformio environment?

    1. FS.h is found in cores/teensy4/FS.h 2. Correct 3. Have you even looked inside SD.h yet? #include <Arduino.h> #include <SdFat.h> Teensy's implementation of SD is a very thin layer directly calling SDFat. You should look at the SdFat_Usage example to see how you can make direct SDFat calls...
  35. T

    Problem with memory usage in Teensy build

    And platformio also includes those options. If you look in, you will find CCFLAGS=[ "-Wall", # show warnings "-ffunction-sections", # place each function in its own section "-fdata-sections", "-mthumb", "-mcpu=%s" %...
  36. T

    USB Host to read/write data on USB-Stick?

    To set the RTC clock, call Teensy3Clock.set(unsigned long t);
  37. T

    How to get USB serial, USB audio and USB Midi on Teensy 3.6?

    The available settings are documented here. So try -D USB_MIDI_AUDIO_SERIAL
  38. T

    IDE 2.10 and Stack Space

    Actually on rereading your question you may be speaking about memory used by the IDE. If so, then just ignore my response
  39. T

    IDE 2.10 and Stack Space

    Have you considered that code / data from RAM1 are allocated in 32K blocks so it may only require a small increase in either code or variables to require a full 32K page to be allocated. After the build you should see some diagnostics: teensy_size: Memory Usage on Teensy 4.1: teensy_size...
  40. T

    New Madgwick Fusion Filter

    @mjs513 Thanks for the branch and the sample code. I think you are missing a call to FusionOffsetInitialise() in setup() which seems kind of important if the gyro real-time calibration is to work as designed. I need to do more testing but my motorcycle imu display seems to be working wonderfully...
  41. T

    platformio.ini for Teensy 4.1

    See also
  42. T

    Teensyduino 1.59 Beta #2

    @CollinK. Just #undef round and abs after wiring.h is included. See for a link to a PR to fix this that is ummmm pending
  43. T

    Teensy 3.2 compiler/sscanf question.

    Since the code to format floats is so large, when you select "smallest code" a stub is used so that all the floating point formatting code is discarded.
  44. T

    Teensyduino 1.59 Beta #2

    @mjs513. You might consider adding this #ifdef abs #undef abs #endif at the top of the sources (after the include of wiring.h) where the abs macro expansion is causing an error
  45. T

    Advice on graphical mouse/keyboard UI (T4.1 + TFT)

    At first glance everything looks OK. I only have experience with the RA8876, but I *think* the pinouts are the same. It's not really clear from your PCB image about the grounds. On my RA8876 PCB, I have grounded 1,2,13,31,39 and 40. Although it doesn't really explain why it works when you wire...
  46. T

    PJRC Server Change

    Ping times from Brisbane, Australia 64 bytes from ( icmp_seq=7 ttl=47 time=231 ms ^C --- ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6249ms rtt min/avg/max/mdev = 230.129/230.649/231.222/0.313 ms
  47. T

    FFT unavailable

    Then, if you look at the source bool available() { if (outputflag == true) { outputflag = false; return true; } return false; } This means that available() will only return true once as it is reset to false each time.
  48. T

    FFT unavailable

    If it actually compiles, then I assume the bolded line should read Serial.print(myFFT.available());
  49. T

    Killed a Teensy 4.0 through trying to use PlatformIO and debugging through GDB?

    For posterity, the configuration of the build with PIO is specified as described here: The specification of USB type is described here
  50. T

    Killed a Teensy 4.0 through trying to use PlatformIO and debugging through GDB?

    By default the blink restore program DOES NOT include USB serial, so what you are seeing is normal. You should be able to upload another program that does include USB serial now though and the teensy will enumerate a serial port.