Search results

  1. el_supremo

    Realtime MIDI Sequencer

    else if (syncState == 255); { That semicolon shouldn't be there Pete
  2. el_supremo

    Accurate timing with RTC and timers

    Another possibility might be to use the time signal from radio stations - WWVB in North America, MSF in the UK, DCF77 in Europe, etc. Pete
  3. el_supremo

    Char array behavior w/T3.2

    twoBuf does not immediately follow oneBuf in memory. 1FFF8750-1FFF8744 = 0xC = decimal 12 (not 10) which means there is a two-byte gap between the end of oneBuf and the beginning of twoBuf. Those two bytes could be, for example, a 16-bit integer which the strcat has overwritten with the letters...
  4. el_supremo

    how to test if one or more specific pins are not working??

    Pin 13 is the LED pin. It might be causing problems. Try using a different pin. Pete
  5. el_supremo

    teensy 2++....Why dont my leds work ???

    Try this code. It's a modified version of the Blink example. Once a second it turns the built-in led and the four leds on pins 23, 24, 25, and 26 on and off. If they don't all flash on and off together, you have a wiring problem or dead output pins. /* LED Blink, Teensyduino Tutorial #1...
  6. el_supremo

    Serial Hardware and Serial Software do not work

    Your code works on my GPS+T4 when I change the baud rate to 9600 for my GPS. Are you sure that your GPS is set to 4800? Maybe try: SerialGPS.begin(9600); Pete
  7. el_supremo

    Serial Hardware and Serial Software do not work

    Try this code. #define GPS_SERIAL Serial1 // Very basic sketch to monitor GPS data from GPS_SERIAL void setup() { GPS_SERIAL.begin(9600); Serial.begin(9600); } void loop() { // while there's data from the GPS, send it to the computer while(GPS_SERIAL.available() > 0) {...
  8. el_supremo

    Snooze library doesn't compile any longer

    and I had no problem when compiling a sleep example for T4.0 using Teensyduino 1.59b6 Pete
  9. el_supremo

    USB Host Cable not reading MIDI

    When I've used midi over the usbhost, I have used code from the working examples which use MIDIDevice midi1(usb); for the device. Try midi1, see if it helps. Pete
  10. el_supremo

    CW generator

    I haven't got anywhere with it. I thought I had found all the places where you have to differentiate between the 12kHz sampling rate and the final output sampling rate but all I get is buzzing. I hope you have better luck than I did :) Pete
  11. el_supremo

    sgtl5000 sample rate capabilities

    I don't understand the grimy details of that code either. I just took what @FrankB provided and used it. Glad that it worked for you. Pete
  12. el_supremo

    sgtl5000 sample rate capabilities

    I have used that code to sample at 8000Hz and it worked. I've just tried it on a T3.6 to pass the audio from line-in through to the headphones. Pete P.S. I think that should work on a T3.2?
  13. el_supremo

    sgtl5000 sample rate capabilities

    Sorry, posted the wrong one. int setI2SFreq(int freq) { typedef struct { uint8_t mult; uint16_t div; } tmclk; const int numfreqs = 14; const int samplefreqs[numfreqs] = { 8000, 11025, 16000, 22050, 32000, 44100, (int)44117.64706 , 48000, 88200, (int)44117.64706 * 2, 96000...
  14. el_supremo

    sgtl5000 sample rate capabilities

    This code will allow you to set the sample rate: void setI2SFreq(int freq1) // merci Franck B. { // PLL between 27*24 = 648MHz und 54*24=1296MHz int n1 = 4; //SAI prescaler 4 => (n1*n2) = multiple of 4 int n2 = 1 + (24000000 * 27) / (freq1 * 256 * n1); double C = ((double)freq1 * 256...
  15. el_supremo

    CW generator

    Maybe I'll tackle it from the other direction - try to make it sample at 12kHz. Pete
  16. el_supremo

    CW generator

    I have found a fix for it. Since it generates the CW at whatever sample rate is requested, the interpolation isn't needed. As a simple workaround remove the code related to interpolation including the interpolation filter. I've tried this and it works at all frequencies from 11025 up to 100000...
  17. el_supremo

    CW generator

    Can someone try setting setI2SFreq and setSampleRate_Hz to 44100? It didn't work for me. Nor did 96000 I've been meddling with the library and trying to figure out how it works. One of the things I don't understand is that a comment in radioCWmodulator_F32.cpp says: // We always generate CW at...
  18. el_supremo

    Midi and system stability problem

    void Fader_setup() { pinMode(fad_PIN[n_fad], INPUT); } and pinMode(A0, INPUT); You do not need to set the mode of analog pins. pinMode is only used to set the state of digital pins. Fader_setup() wouldn't work anyway because it will try to set pin fad_PIN[5] which isn't defined. Pete
  19. el_supremo

    RPM Sensor for Car

    I agree with Mark that threading seems to be overkill for your application, especially since once you enter the thread, the while loop prevents you ever leaving it and so the thread scheduler never gets a chance to do anything. The delay(10) also doesn't seem to have any useful purpose. Turning...
  20. el_supremo

    Having problems with digitalRead()

    How can you tell that it is doing this? Just to be sure, you add, for example, Serial.print("p2 "); in front of Serial.println(digitalRead(2)); and similarly for the other pins. What is "complex" about it? If it involves more delays and/or turning interrupts on and off, it could make a mess of...
  21. el_supremo

    UART Communication Issue Between Two Devices (Teensy 4.0 and MSPM0)

    Have you tried slower speeds? e.g. 9600? Perhaps there's a mismatch of polarity or voltage between the two devices? Do you have a link to a reference manual for the MSPM0? Pete
  22. el_supremo

    Teensy 4.1 as USBHost for radio CAT control help needed

    Which radio are you using? Is there any setup required in the radio to make it activate the USB port? Pete
  23. el_supremo

    what array are used in audio objects and variable ???

    You didn't increase the size of the sizes[] array from 4 to 16. Pete
  24. el_supremo

    what array are used in audio objects and variable ???

    For the first part of your question, I think this will work. BTW - Should the fourth entry be playArrayWav5 (or playArrayWav4)? AudioPlayArrayResmp playArrayWav1; //xy=1061.4284744262695,905.7142791748047 AudioPlayArrayResmp playArrayWav2; //xy=1062.8570823669434,945.7143230438232...
  25. el_supremo

    Adapt this other FlySky IBUS library to Teensy family

    I may have figured it out. I've attached a zip of the src directory from IBusBM library. It contains IBusBM.cpp and IBusBM.h although only IBusBM.cpp has changed. It turned out to be much easier than I had imagined. I wrote my own sketch to test the library and it seems to work with a T4.0 and...
  26. el_supremo

    Adapt this other FlySky IBUS library to Teensy family

    I use 1k, but I've just determined that the ibus_sensor sketch isn't sending anything. More digging required. Pete
  27. el_supremo

    Adapt this other FlySky IBUS library to Teensy family

    Not yet. The examples compile but ibus_sensor indicates it is sending info but ibus_singlemonitor only prints zeros. Need to ponder it more. It may be something to do with the half-duplex protocol and I haven't wired the two processors together properly. Pete
  28. el_supremo

    Adapt this other FlySky IBUS library to Teensy family

    I was just in the process of modifying two of the examples to disable the timer. Now to add pins to a T4.0 so that I can try a T4.0 and T4.1 chatting to each other with the ibus_sensor and ibus_singlemonitor examples. Pete
  29. el_supremo

    Adapt this other FlySky IBUS library to Teensy family

    At first glance this doesn't look like it would be anywhere near as easy to convert because it uses timer interrupts. I'll have a deeper look but don't get your hopes up :unsure: Pete
  30. el_supremo

    Adapt a library to a Teensy 4.0

    I had another, closer, look at the link you provided in #8 and the two versions of that library both seem to support T4.0 and T4.1. Can't you use either of those? Pete
  31. el_supremo

    Adapt a library to a Teensy 4.0

    No rush :D You're welcome and I hope it works. Pete
  32. el_supremo

    Adapt a library to a Teensy 4.0

    @pierrotm777 I had a look at the library you posted in #1 and have modified it so that it appears to work on a Teensy 4.0 or Teensy 4.1 I tested it on a T4.1 by using Serial2 (instead of Serial3 because it's easier to reach) and looping it back on itself and reading/printing the received data...
  33. el_supremo

    Migrate projet teensy 3.5 to teensy 4.0

    Yes, the problem isn't with the Smartmatrix library. The problem is that the original code written by Eli Curtz (i.e. all the code in your RGB_DMD_Branco directory) is written specifically for the Teensy 3.2 and uses code which directly accesses the hardware registers of the T3.2. It will not be...
  34. el_supremo

    Migrate projet teensy 3.5 to teensy 4.0

    You may be using the correct SmartMatrix library for a T4, but your own code is still expecting a T3. For example in Boardinfo.ino you have: /* Read the MAC address http://forum.pjrc.com/threads/91-teensy-3-MAC-address To understand what's going on here, see "Kinetis Peripheral Module...
  35. el_supremo

    ISR not being called

    This: IntervalTimer myTimer; Should be at the top of your file. It is a declaration, not an executable statement. Declaring myTimer within the setup() function means that the myTimer instance will disappear when the setup function ends. Pete
  36. el_supremo

    Migrate projet teensy 3.5 to teensy 4.0

    It would be more useful to post the code you tried to use on the T4. Have you read the file MIGRATION.md in the SmartMatrix-master directory? It describes some changes that are required to get that library working on a T4. It would also help if you posted some, or all, of the error messages. Pete
  37. el_supremo

    3.2 Serial question

    The fact it can decode some of the text suggests that both ends are at the same baud rate. But the receiving end doesn't seem to be able to keep up with the transmission. What is receiving the text? Pete
  38. el_supremo

    Why do I only get white screens on my TFTs?

    It appears that tft.init() will call spi.begin() which might conflict with what your call to SPI.begin() does. Try commenting out your call to SPI.begin() and see if it makes any difference. Pete
  39. el_supremo

    SD card - deleting the oldest file

    It might be wise to increase the size of the array unless you are sure you'll only ever have 8.3 formatted filenames. Pete
  40. el_supremo

    SD card - deleting the oldest file

    if (file_unix_time < last_file_unix_time) { last_file_unix_time = file_unix_time; file_to_delete = entry.name(); Serial.printf("\r\nFile name %s %s\r\n", entry.name(), file_to_delete); } I think that file_to_delete is saving a pointer to a string...
  41. el_supremo

    MIDI dropouts when I use readMidi with FrameBuffer ILI9341_t3n

    if (screenTimer = 27) { should be if (screenTimer == 27) { Pete
  42. el_supremo

    Rotary dialer

    Great!
  43. el_supremo

    Rotary dialer

    In the IDE you have to set the USB type as keyboard. In the menu choose Tools. Then from the dropdown choose USB Type. From the next dropdown choose Keyboard. Recompile. Should work now. Pete
  44. el_supremo

    Simple computation requires presence of Serial.print statement in for loop

    Presumably, somewhere in the Serial.println code, it turns interrupts back on which allows the code to proceed. If it isn't called, interrupts stay off and the print buffer fills up and then println hangs. [edit] I suspect that if instead there was just one println immediately before the for...
  45. el_supremo

    New to Coding. I just want to make 4 midi push buttons work. I have loaded what was recommended and I am at a loss. Not sure what else to do.

    I doubt that sending midi notes will affect the sequence. It is more likely to need a Program Change or Control Change message. Which midi software are you using and does it have any documentation? Pete
  46. el_supremo

    New to Coding. I just want to make 4 midi push buttons work. I have loaded what was recommended and I am at a loss. Not sure what else to do.

    The code you posted sends a MIDI NoteOn when you press a button and a MIDI NoteOff when you release the button. The message is sent to whatever you have connected the Teensy USB port to. What is the Teensy USB connected to? What is playing "a sequence"? Pete
  47. el_supremo

    New to Coding. I just want to make 4 midi push buttons work. I have loaded what was recommended and I am at a loss. Not sure what else to do.

    FYI I tried your code on a Teensy 2 connected to Windows 10 and with a piece of wire as a button on Pin 0. MIDI-Ox on Windows sees the midi messages. So the code works as advertised. There must be something wrong with how you are detecting the MIDI message. Pete
  48. el_supremo

    New to Coding. I just want to make 4 midi push buttons work. I have loaded what was recommended and I am at a loss. Not sure what else to do.

    What have you connected the Teensy USB to in order to receive/detect the midi messages? The code is sending note C4 on MIDI Channel 2 (internal channel 1). If you're sending to a synthesizer/DAW/whatever, it must be set receive the correct channel. Pete
  49. el_supremo

    can I combine notefreq with various bandpass filters to detect more notes

    Try changing patchCord2 so that it outputs to the headphones. You'll then be able to hear whether there's anything coming out of bandPassFilter1. Pete
  50. el_supremo

    Multiple definitions of 'loop'

    Post the code which produced the errors in your message #17. You've got some misplaced braces somewhere. Pete
Back
Top