Search results

  1. snowsh

    Next new Teensy , USB-C Please.

    Off the top of my head, how about where the tiny d+ and d- pads are? change them to holes. I know this is a bit of a quick suggestion, and would required removal of the socket to work properly, but if there was a film of insulation over the USB socket it would be isolated from these holes and...
  2. snowsh

    Next new Teensy , USB-C Please.

    on the subject of USB, please can we have proper pins to break out d+ and d-
  3. snowsh

    WS2812Serial declare numleds in runtime?

    Paul, thanks for your input. I have been further mulling this and can see that declaring the memory for the maximum is the way forward. This leads me to another question though: I'm potentially adding a further 196 pixels to 375 - new total of 571 pixels. the extra pixels do not need to be...
  4. snowsh

    WS2812Serial declare numleds in runtime?

    Yes, that is currently going to be my approach, but I am interested to see if there are other ways.
  5. snowsh

    WS2812Serial declare numleds in runtime?

    I want to be able to set the number of leds in my UX. I am adding neopixels to a MIDI controller keyboard. I have a 25 key mini keyboard, but I want to support up to 88 keys. At present, I set memory as suggested in the examples: const int numled PROGMEM = 425;//375...
  6. snowsh

    Interesting…

    I just read this article: https://www.tomshardware.com/pc-components/cpus/startup-claims-it-can-boost-any-processors-performance-by-100x-flow-computing-introduces-its-cpu-20-paradigm A 60ghz t4.1 anyone?
  7. snowsh

    weird weird weird

    This is kind of my approach so far. I have some upgrade methods if I ever need to retain the SD data. I can take care of the naming within the code, the SD files are already named based on their counterpart struct, albeit with a 3-letter code. I like the idea of adding a version number to the...
  8. snowsh

    weird weird weird

    Yes, I'm aware of the issues with changing the structures. I have gone with this because I need it to be as fast as possible. I had experimented with JSON but there was too much overhead and it became unworkable due to the real-time nature of this project (music sequencer). CSV would have...
  9. snowsh

    weird weird weird

    well, that seems to have found it! here is the intialised SD data: and having reworked the values:
  10. snowsh

    weird weird weird

    here is my struct definition: struct DrummerConfig { uint8_t channel; uint8_t screenMode; uint8_t midiOutChannel; uint8_t midiInChannel; uint8_t stepLength; uint8_t kitId; uint8_t currentPatternId; char kitName[CHANNEL_NAME_LENGTH]; int kitColors[4]; int selKitColorHit; int...
  11. snowsh

    weird weird weird

    hmmmm.... if i place this at the end of setup(): drummer.config.enableFills = false; saveHandlerToSD(SD_TYPE_CONFIG, 0); it works, even with the SD card present.
  12. snowsh

    weird weird weird

    at startup, yes. I am studying the data now.....
  13. snowsh

    weird weird weird

    I have this section of code, please don't ask for the full codebase, its enormous. if (checkButtonPress(BUTTON_DRUMMER_FILLS_ENABLE)) // this works fine { Serial.println(F("Button press detected: BUTTON_DRUMMER_FILLS_ENABLE")); // Debug before...
  14. snowsh

    USB Host Library MIDI hanging

    @PaulStoffregen upgraded to 1.59. the problem persists but I noticed it only happens when certain devices are attached via USB. I have a simple 4 port hub attached to the t4.1 usb host port. During my development over the past year or so I have had an alesis v25 keyboard attached and this has...
  15. snowsh

    USB Host Library MIDI hanging

    Hi @PaulStoffregen I will give the beta 1.59 a go. I should clarify that the hang usually happens after a few attempts to send midi over the USB host. My program is huge, and im not going to publish it anytime soon, however I suspect my problems might be low memory: Memory Usage on Teensy 4.1...
  16. snowsh

    USB Host Library MIDI hanging

    which library are you now using? I am having similar problems with usb midi over usb host. recieves fine, but as soon as any midi is sent it hangs. It doesnt reset so i am thinking its stuck in a loop.
  17. snowsh

    The strangest thing…

    yeah, i think that is probably right.
  18. snowsh

    The strangest thing…

    Close serial monitor and it starts writing to the sketch again, with the hello world text prefixing the counter.
  19. snowsh

    The strangest thing…

    Finally got a port in arduino and serial monitor to open. Now I see the numbers and it’s no longer writing to the sketch.
  20. snowsh

    The strangest thing…

    Ah well it gets even weirder. The teensy is outputting this hello world message with the counter. Must be the blink sketch? But it’s writing code directly into arduino sketch file at the cursor position.
  21. snowsh

    The strangest thing…

    Odd . Every time I plug this other teensy in I get this hello world text appears in the ide in my code at the cursor position. The integer increases each time. Still can’t see it as a port, but teensyduino responds to a button press on tge 4.1. I try to use putty to check serial and get a pop up...
  22. snowsh

    The strangest thing…

    So I’m compiling and uploaded to my t4.1. Everything goes weird. The teensy does not boot. I can no longer see it as a port in arduino. I check the pc, leads to a restart. Get a blue screen. Finally manage to get the pc back up. Open up arduino and again I cannot see the teensy as a port. I had...
  23. snowsh

    Create an image as an array of pixels, and save as BMP file

    yes! we got there. So I learnt something new today. #pragma..... Thank you everyone who answered. i will post up my fixed example for reference later.
  24. snowsh

    Create an image as an array of pixels, and save as BMP file

    i will admit i am a bit lost here. Can you give examples of how to use this. This is what i did before: struct __packed BMPFileHeader { uint16_t fileType; // "BM" for Bitmap uint32_t fileSize...
  25. snowsh

    Create an image as an array of pixels, and save as BMP file

    here is an update to my sketch. Lots more control via the serial monitor. press h enter for help. All seems to function right, but these BMPs just wont load on my pc.. /* a test script to generate an image, dump it to serial and save / open from SD. script will generate a random color...
  26. snowsh

    Create an image as an array of pixels, and save as BMP file

    zip file containing some generated BMP files.
  27. snowsh

    Create an image as an array of pixels, and save as BMP file

    I have updated the struct, is this right? // Create BMP File Header struct __packed BMPFileHeader { uint16_t fileType; // "BM" for Bitmap uint32_t fileSize...
  28. snowsh

    Create an image as an array of pixels, and save as BMP file

    Hi, im trying to save an array of pixel as a BMP. i have this sketch running, but whenever i try to open the generated BMP in paint it reports the file format is not correct. I have been over this for too long now and need some fresh eyes. anyone here with more knowledge of the BMP format? Here...
  29. snowsh

    flush incoming midi buffer at end of setup

    well I have been checking over everything and this is now working fine. Many thanks everyone especially @kd5rxt-mark @PaulS and of course @PaulStoffregen TL;DR: the fix is to use the timed loop before you attach interrupt handlers, and do this at the end of setup: setup() { // run setup code...
  30. snowsh

    midi sysex send and receive sketch. need some extra eyes

    updated to include multi chunk handling
  31. snowsh

    midi sysex send and receive sketch. need some extra eyes

    fixed it. here is the working sketch if it is of interest: /* MONK 14112023 test script to debug sysex data exchange for commands and data dumps testing working with midi 2.0 manufacturer ids issue with 8 bit values defined send sysex example user the serial monitor to...
  32. snowsh

    midi sysex send and receive sketch. need some extra eyes

    been on this for too long and i have gone cross-eyed! Late so off to bed. if anyone fancies taking a look please feel free. It will be a useful script for anyone wanting to send and receive raw data from structs over sysex. There is lots of checking and points to identify the data. the issue is...
  33. snowsh

    midi controlling capabililty while using a multiple small lcd module

    I would suggest you use 0.9 inch i2c OLED displays as these are perfect for your task. You want multiple displays, so best thing is to get that workig first. Take a look a this tutorial: https://dronebotworkshop.com/multiple-i2c-bus/ once you have that working, you now want to develop your...
  34. snowsh

    flush incoming midi buffer at end of setup

    phew i got it back... hate it when that happens 🤦‍♂️
  35. snowsh

    flush incoming midi buffer at end of setup

    I had an idea to test this: (!!DONT TRY THIS!!) in setup use setup() { // Disable USB interrupts temporarily noInterrupts(); /* rest of the setup code */ interrupts(); // Enable USB interrupts } This had the effect of making my teensy un recognisble! Im trying to get it back now using the...
  36. snowsh

    flush incoming midi buffer at end of setup

    Paul, Yes I have noticed this too. The clock is being generated by a PC with the obvious overheads of a huge OS. In the music world we know that a computer does not provide a rock solid clock, and products exist to address this. One of my pending projects is to offer a stable midi clock. In the...
  37. snowsh

    flush incoming midi buffer at end of setup

    OK. So In summary: It would seem the process of using midi with interrupts must hand off all received messages to the relevant interrupt handler. Whatever library is dealing with this takes all messages buffered in the midi library, and takes over. This is why without the midi.read() loop...
  38. snowsh

    flush incoming midi buffer at end of setup

    ok, i tried using while (usbMIDI.read()) {};, no good. The idea of using a timer to force the read seems to do the job. but as you can see I have placed it in setup before we attach interupts right at the end of setup() #include <MIDI.h> unsigned long currentRXtime; unsigned long...
  39. snowsh

    flush incoming midi buffer at end of setup

    Bingo! it works! updated test sketch coming...
  40. snowsh

    flush incoming midi buffer at end of setup

    yes, I have stripped out in an effort to simplify and retain the fix. This is what i have so far - excludes the serial and host midi stuff. includes my drum generator. //#include <USBHost_t36.h> #include <MIDI.h> //USBHost thisUSB; //USBHub hub1(thisUSB); //MIDIDevice_BigBuffer...
  41. snowsh

    flush incoming midi buffer at end of setup

    wow. (wasn't the exact phrase i used. :) ) OK, so I had to add a few bits just to help me track it.... and yes you are right, it seems to fix the issue. #include <USBHost_t36.h> #include <MIDI.h> USBHost thisUSB; USBHub hub1(thisUSB); MIDIDevice_BigBuffer usbhostMIDI(thisUSB)...
  42. snowsh

    flush incoming midi buffer at end of setup

    Mark, are you connecting using midi USB host or USB client? there may be a difference here that could give us the clue we need to track this down.
  43. snowsh

    flush incoming midi buffer at end of setup

    OK, so I think we can agree that usbMIDI.read() is not affecting the clock. I am taking a leap here and going with the notion it does not effect any realtime messages.
  44. snowsh

    flush incoming midi buffer at end of setup

    @kd5rxt-mark I have tried your suggestion, but its still doing the rush. here is the updated test sketch for anyone to try, @PaulS does this work for you? #include <MIDI.h> unsigned long currentRXtime; unsigned long previousRXtime...
  45. snowsh

    flush incoming midi buffer at end of setup

    Hi Mark, i will give this a go but i have already tried this in loop using a "firstloop" check. But did not wrap it in a timer. Will report back....
  46. snowsh

    flush incoming midi buffer at end of setup

    i just tried your suggestion, no good. Its still doing the rush. As we have found seems to have no effect on these clock messages. Can you think of why they would be buffered in either the midi or USB libraries?
  47. snowsh

    flush incoming midi buffer at end of setup

    yes I concur. @PaulStoffregen do you have any observations?
  48. snowsh

    flush incoming midi buffer at end of setup

    @PaulS I have updated your test example to illustrate better. You will need to install reaPack. For some reason this example is not 100% auto connecting, but it does sometimes and when it does, you experience the rush of notes sent back to the DAW. My main program connects 100% of the time. I...
  49. snowsh

    flush incoming midi buffer at end of setup

    Aha, well reaPack is the reason its reconnecting then. I had installed it recently too but hadn't made the connection that it was responsible for the auto reconnect. So your first F8 is dumped at 20300001 uS from power on - as the initial declaration of unsigned long previousRXtime must be...
Back
Top