Search results

  1. N

    Trouble shooting fluctuating readings from Analog sensors.

    Hi @MarkT Thanks for your input. I think you are correct in suggesting the cap near the Teensy is between signal and to ground. Definitely something else is the problem that I can't discover. I have a feeling there is a bad connection somewhere. I am trying to find it, and am resoldering any...
  2. N

    Trouble shooting fluctuating readings from Analog sensors.

    Hi thanks for your reply. The sensors are Spectra Symbol Thinpot, 500mm https://www.spectrasymbol.com/linear-position-sensors/thin-form-linear-pots-thinpot Ok I will try your suggestion. Do you think it might be helpful to put an additional 100nF cap near where the power and ground are...
  3. N

    Trouble shooting fluctuating readings from Analog sensors.

    Hi, I have a Teensy project that has been working really well since I finished it in 2018. Recently I am having some issues with it and I am having a really hard time diagnosing the issue. This project uses 2 Teensy 3.6 microcontrollers. One of them is connected to around 13 analog sensors...
  4. N

    Midi To Servo

    Hey @thebigg. Your solution worked!!! I had a feeling it was something super simple like that. I would have never guessed that, but it totally makes sense to map the value to the position. Thank you so much for spotting that.
  5. N

    Midi To Servo

    Hi everyone, Thank you for looking at the code and offering suggestions. I removed the semicolon after the "if" statement, and I added usbMIDI.read(); into the loop. I also changed the mapping of value to: map(value, 0, 127, 0, 179); , since MIDI is from 0 to 127 I am still not getting...
  6. N

    Midi To Servo

    Hi joepasquariello. I think I intended it, but it looks like I don't need it. I'll try the code without the semicolon and see if that works. If that's all that was wrong I will be super amazed. Thank you for pointing that out.
  7. N

    Midi To Servo

    Hi I am just giving this post a bump. It seemed like I couldn't connect to the forum right after I posted this. If so maybe this post was overlooked. Any advice is appreciated. thanks, Nick
  8. N

    Midi To Servo

    Hi, I am trying to control a servo using MIDI output from a computer. Before I got to this part of my project, I tested out the Sweep example in the PWM library, and my servo worked with that. Then I tried the Knob example in the PWM library, where a potentiomenter controls a servo, and...
  9. N

    Installing Teensyduino in Arduino IDE 2.1.1

    Hey @Heavy_Metal . Thanks for your reply. Ok I was able to install Teensyduino. I went to settings. I put the link in the "Additional Boards Manager." Then in the Boards manager of the Arduino sketch page I put Teensy and there was an option to install Teensyduino and it seems to have worked...
  10. N

    Installing Teensyduino in Arduino IDE 2.1.1

    Hi, I am on a M2 Mac running OSX 13.2.1. I just installed Arduino IDE 2.1.1. I am trying to follow the instructions to install Teensyduino on this page: https://www.pjrc.com/teensy/td_download.html I clicked on the Boards Manager in Arduino software, selected "All" types of boards, and...
  11. N

    Best way to expand the number of Digital Outputs on Teensy 3.6

    I would connect Vin from the Teensy to the 5V and ground from Teensy to ground on the LED. I think you connect SCA and SDA from the Teensy to to two other pins. You can chain all of those LEDs together. I hope that helps, but that's the general gist of it.
  12. N

    I am having problem loading i2c_t3 library

    KurtE, Thanks for helping me diagnose this issue. I did find this library, that apparently works with Teensy 4.0 https://github.com/Richard-Gemmell/teensy4_i2c I am trying to see if it will work with a 4.1. If not I will try Wire.
  13. N

    I am having problem loading i2c_t3 library

    Hey KurtE, Yes you might be right. When I changed board type to Teensy 3.6 the code verified. Is there a way that I can update the library for use on a 4.1? It might be hard for me to switch at this point in my project.
  14. N

    I am having problem loading i2c_t3 library

    Hi everyone. I have some code using the i2c_t3 library. I tried running the code and got some error messages including "I2C_MASTER was not declared in this scope". Then, in Arduino software, I went to examples and tried a few of the i2c_t3 examples and none of them worked. I am on a Mac, OS...
  15. N

    turning keypad example into midi controller button matrix

    OK got it. Thanks for the guidance. take care. Nick
  16. N

    turning keypad example into midi controller button matrix

    Hey el_supremo, I had to put this project down for a week as I had a lot of work, but just got back on it. So I copied your if statement and put it into my code and it totally works! Thank you for your help. I do have a question however, as I want to understand what's happening here...
  17. N

    turning keypad example into midi controller button matrix

    Thank you el_supremo / Pete, I think I understand. At least the logic you explained makes sense. I'll try and express that in some code. My weaknesses in coding are arrays. And I just learned about switches, but that seems straight forward at least. I'll try and figure this out and post...
  18. N

    turning keypad example into midi controller button matrix

    Hi, OK I'm trying to modify the Multikey Keypad example. With the code I came up with, If I press the 1st button I get a result. But If I press the 2nd button I only get a result if the 1st button is also pressed. So it's not working as desired. I thought using if else statements in the...
  19. N

    turning keypad example into midi controller button matrix

    OK now I'm taking a look at the multi key example in Keypad. I think that will do what I need. I'll try and figure this out.
  20. N

    turning keypad example into midi controller button matrix

    OK now I know why you are named el_supremo. Your suggestions have totally worked. I added a function "void keypadEvent" from the EventKeypad example. It has a switch in it. I basically added my midi control change stuff in there. Now this code will let you know if someone presses, holds, or...
  21. N

    turning keypad example into midi controller button matrix

    I also tried this out. I thought this might work to get a 0 value when you are not pressing a key, but didn't work void loop() { char key = keypad.getKey(); if (key != NO_KEY) { if (key == '1') { usbMIDI.sendControlChange(controllerD20, 127, channel); } if (key !=...
  22. N

    turning keypad example into midi controller button matrix

    Hi @el_supremo Thank you for taking a look. Damn, I knew it was ==, just didn't check that. I corrected some of the things you pointed out and I am getting way better results. Now when I press a button I get a 127, but when I release it the value stays at 127. When I press another button...
  23. N

    turning keypad example into midi controller button matrix

    Hi everyone. So I have been at it making a serious midi controller for a few months. There will be a lot of button switches on this controller and for my prototyping I am using some simple button switches to figure this out. I am using a Teensy 3.6. I recently was informed about the keypad...
  24. N

    ignoring incoming value if it's same as previous incoming value. Or LED freaks out!

    Hey everyone, I sat down with a expert coding friend of mine for a few hours yesterday. He streamlined the code I have and we trouble shooted this situation for several hours yesterday. We couldn't figure it out. At this point I am on the verge of just giving up on this, I've spent weeks...
  25. N

    ignoring incoming value if it's same as previous incoming value. Or LED freaks out!

    Ok thanks @tonton81 I'll try and incorporate this into the code and post what I come up with.
  26. N

    ignoring incoming value if it's same as previous incoming value. Or LED freaks out!

    Hi @tonton81, Thank you for going over that code for me. I think all the SPI stuff is fine. I think my issue has to do with the way I am coding it. For example, in myControlChange() if I send a value of 50 the LED turns red. If I send a value of 70 it turns yellow. If I alternate between the...
  27. N

    ignoring incoming value if it's same as previous incoming value. Or LED freaks out!

    Hi @tonton81, I thought I would just post the part of the code relevant to my question so it would be less code to parse through. But I will post the whole thing since you have these questions. Please note that it's a work in progress and that all I am concerned with at the moment is...
  28. N

    ignoring incoming value if it's same as previous incoming value. Or LED freaks out!

    Hi everyone, I think it's mostly a coding question. I have had a lot of trouble figuring out how to send SPI hardware messages from a Teensy 3.6 to an Adafruit TLC5947 board to control RGB LEDs. But that got figured out in this thread...
  29. N

    Teensy 3.6 is very slow for some reason...

    Hi everyone, I finally, after tons of hours, am able to use the hardware SPI to control the LEDs using the TLC5947 board. Wow, that took awhile. I want to thank everyone for their input, advice and help. I really think this is one of the best forums for advice out there. And I am sure I will...
  30. N

    Need help on using SPI library

    Hi Po Ting, Thanks for the info. I got it to work! I'm having trouble controlling the LEDs, but I think I can figure that out, it's a coding issue.
  31. N

    Need help on using SPI library

    Hi Po Ting, Can you post the example code that worked for hardware SPI? I have been trying to figure out how to use the TLC5947 with hardware SPI and it is really difficult. Your post is giving me hope it is possible. Thank You.
  32. N

    Teensy 3.6 is very slow for some reason...

    @wcalvert, Thanks I will try the digitalWriteFast() thing. I would like to figure out the hardware SPI thing too. I just got a new Teensy and I'm going to start over with this and just try and figure it out (my other Teensy has a lot of things connected to it). I have hope in this thread...
  33. N

    Teensy 3.6 is very slow for some reason...

    @wcalvert it works easily with the Adafruit example code and software SPI. It's just slower. I hope I beat you to it, I've been at this for weeks now! lol
  34. N

    Teensy 3.6 is very slow for some reason...

    defragster, thank you for your help. I changed the pins and tried the test patch again. No luck :( I tried it with const int slaveSelectPin = 10; #define clock 13 // 10 #define data 11 #define oe 12 // 12 #define latch 10 // 11 #define NUM_TLC5974 5 and const int...
  35. N

    Teensy 3.6 is very slow for some reason...

    Hey everyone, I'm still working on this issue. I am giving up on that library above for now because I can't get it the example code to compile. I did find a thread on this forum which is giving me hope, and is basically the exact same problem I am facing...
  36. N

    Teensy 3.6 is very slow for some reason...

    Hi defragster, Ok I'm going to post the original example code and the error test as well. example: /* TLC5947 Control Library Used to control the TI TLC5947 LED driver chip Zack Phillips - zkphil@berkeley.edu Product Page: http://www.ti.com/product/tlc5947 Copyright (c)...
  37. N

    Teensy 3.6 is very slow for some reason...

    Hi thebigg Ok I changed the line you specified to const int TLC5947::_tlc_count = 1; // Change to reflect number of TLC chips But now I'm getting errors further down in the code. I tried, int, const int, etc. What do you think I should declare these other variables as? The...
  38. N

    Teensy 3.6 is very slow for some reason...

    Hey everyone, I am running into an issue that I can't really figure out. It seems simple though. I downloaded this TLC5947 Library from here: https://github.com/ramonaoptics/TLC5947 I tried to verify the example code in Arduino software v. 1.8.8 and I got error messages. Having something...
  39. N

    Teensy 3.6 is very slow for some reason...

    Hey wcalvert, Wow this library you found is nice. And in the example he's using the same chip in the LED driver I have, TLC5947. I will give this a try and let you know how it works out. I was worried that I would have to re-envision this thing i'm making because I can't find a button...
  40. N

    Teensy 3.6 is very slow for some reason...

    Hi Oddson. Thanks for the input. Right now the midi code and sensors work fine. You are probably right in that it can be optimized to work better/faster. But in my previous version of this code the midi input and output is fine. For what I'm doing I only read MIDI data at one control change...
  41. N

    Teensy 3.6 is very slow for some reason...

    Hi wcalvert Thank you for the reply. Yes, the problem is not with the Teensy, as when i delete the code related to the Adafruit LED driver everything works fine. I should change the name of this thread. OK I am so happy that there is a Teensy library to deal with this problem! amazing. So...
  42. N

    Teensy 3.6 is very slow for some reason...

    Hi all, I am just updating you all to something else that I tried. It didn't work, but I am adding it here to document it and in case it inspires someone to think of something else I should try. The LED displays I have connected (that you can see in the video) are connected to SCL0 and SDA0...
  43. N

    Teensy 3.6 is very slow for some reason...

    I'm still trying to figure out what's going on with this code issue (hopefully that's what it is) Because I am using SCL0 and SDA0 for the LED displays, and that happens on the same pins that are A5 and A4, I commented out the code pertaining to A4 and A5 in my loop() So my loop() now has...
  44. N

    Teensy 3.6 is very slow for some reason...

    Hi, Yes my post was pretty vague. Sorry about that. I am having a hard time articulating what's going on. I made a video that will help a little bit. Here is a link: https://www.youtube.com/watch?v=ApEMP2Us8Q8&feature=youtu.be I will try again to explain what is going on, because it might...
  45. N

    Teensy 3.6 is very slow for some reason...

    Hi, First of all, I want to thank everyone here for their guidance. I've had a few issues with the project I'm working on and all have been resolved, EXCEPT for the new one I am encountering now. This is sort of related to another thread, but it's a different issue so I am creating this new...
  46. N

    Eliminate LED fast flickering from PWM breakout board and Teensy 3.6

    @defragster Yes that's a good point. Right now nothing is connected to my Teensy except that board and 4 LED/button switches. The board is powered from the Vin connection on the Teensy. It's funny you should say this, because I've had the Teensy just randomly power down a few times. I'll...
  47. N

    Eliminate LED fast flickering from PWM breakout board and Teensy 3.6

    @defragster Yes this makes a lot of sense! If I can replace that resistor with a smaller value I believe the LEDs will be brighter. OK I'll try and figure out how to do that. Thanks for pointing that out, I would never have thought about that.
  48. N

    Eliminate LED fast flickering from PWM breakout board and Teensy 3.6

    Update: Ultimately what I am creating is a midi controller. I incorporated the code from this PWM breakout board and LED control into my existing MIDI controller code. Before I uploaded I selected USB type: MIDI. I am able to use midi control change output to control the color of the LEDs...
  49. N

    Eliminate LED fast flickering from PWM breakout board and Teensy 3.6

    Hey Frank B. Thanks for the reply! Wow, I'm impressed that you saw the transposed 4 and 7 in: Adafruit_TLC5947 tlc = Adafruit_TLC5947(NUM_TLC5947, clock, data, latch); I would have never seen that. I fixed that. I tried using pin 27 for clock, and I added the latch pin on pin 31. None of...
  50. N

    Eliminate LED fast flickering from PWM breakout board and Teensy 3.6

    Hi, This is a follow up to a previous post: https://forum.pjrc.com/threads/56834-Best-way-to-expand-the-number-of-Digital-Outputs-on-Teensy-3-6 I am trying to get more digital outputs from a teensy 3.6 for some RGB LED button switches I’m using. So I am using a PWM breakout board. Right now I...
Back
Top