Trouble installing Teensyduino

Status
Not open for further replies.
Hi all, I'm really not good at this stuff, because I'm a novice but I have a prototype EWI (electronic music instrument) prototype I want to make functional, so I have to learn how to code for the Teensy. I have a 3.2 and an LC. I also have successfully installed the Arduino IDE, and also understand that there is a missing library needed in order to program the Teensy. I was unable to get Teensyduino to install correctly. My mac said, "Can't load unrecognized files" or something like that. Now I overrode the security and put a check next to Arduino Use Document Folder. So I'm not sure what is going on. I was able to link to a library that claims to support the teensy called (ACAN). It looks like I have that available. I was expecting the word "teensy" to be available in the drop down, but I don't see it. I don't know if I have a correct install here. What can I watch on youtube to help me get started?
 
Last edited:
for forum.png

This is the error message I"m gettting. Hope it helps to understand what is happening. There is some confusion because there was a version of Arduino IDE that was posted here that is also called "Teensyduino", which I also downloaded and it runs perfectly. It seems identical to my Arduino install. Not sure what the difference is. I juat want to make sure that I have an Arduino IDE install that will allow me to compile and upload simple programs to either the LC or 3.2. I don't want to wipe out the kernel on these things.
 
Which version of MacOS are you using?

There are 2 copies of Teensyduino for MacOS on the download page:

https://www.pjrc.com/teensy/td_download.html

One works with MacOS 10.10 to 11.6. The other works with 10.7 to 10.14. This error looks like you're running the one meant for MacOS 10.7 to 10.14 on a newer-than-10.14 (Mojave) version of MacOS.

Starting with 10.15 (Catalina) Apple changed security settings to require "notarization". The old installer approach could not longer work with Apple's new requirements. Eventually this older version will be dropped, but since Catalina we've been publishing 2 copies. If you have Catalina or Big Sur (or Monterey beta) only the newer version works. Apple doesn't allow the older software to run on their newer systems.
 
Thanks! That seemed to do the trick. I'm in way over my head with what I'm doing, so you may be hearing from me on this forum, soon. But I followed your instructions and now I can see that the teensy boards are available in the dropdowns. I am making an EWI (electronic music instrument) similar to the Bergland Insrtruments. In fact, Johann Bergland is well known in the EWI community, having developed two instruments called the NuEVI and the NuRad. Perhaps you have heard of him? Both of these instruments are realized using teensy. That is why I have two teensy boards. He is very difficult to get a hold of, but his project uses two ADAFruit M121 capsense boards, a breath pressure sensor and uses a 5 pin MIDI connector to stream MIDI data (I think only two pins are actually used (data and power). My EWI is basically the same, but I wish to had about 10 more capsense touches. I have musical reasons for this not important here. His code is open source and I have downloaded it, but it's difficult to understand how he is distinguishing one capsense board from the other, how they are linked to the board, what pin numbers the various capsense switches correspond to. I"m thinking of getting some bread board and starting with a pressure sensor and a midi port. If I can write simple code for that, I can add elements one at at time.
 
So, just to be clear, having installed this version of the Arduino IDE, I don't have to download any addition programs or patches to upload sketches to the teensy?
 
Yes, confirmed.

Also on the download page under "Macintosh Installation" it says "Note: This download is a complete copy of all software. No separate installer is used". Hopefully that's clear?
 
Okay, I was able to load "blink" and successfully modify it by increasing the blink rate. The next step is wiring up a midi port with correct resistors. This is wired to serial port 1 and I used code from this forum. I expect a series of midi notes but only get 6 bytes of sys ex and I've included pictures of what the midi monitor sees, my breadboard, and also the code I copied. I checked my wiring a bunch of times. There is one difference, a 470 ohm resistor that is supposed to wire back to the serial receive pin. This according to the schematic on the pjrc forum midi page. I will give that a try, but I doubt that's it.midi monitor, only 6 bytes, no midi.pngmidi out code.png
 
Okay, I was able to load "blink" and successfully modify it by increasing the blink rate. The next step is wiring up a midi port with correct resistors. This is wired to serial port 1 and I used code from this forum. I expect a series of midi notes but only get 6 bytes of sys ex and I've included pictures of what the midi monitor sees, my breadboard, and also the code I copied. I checked my wiring a bunch of times. There is one difference, a 470 ohm resistor that is supposed to wire back to the serial receive pin. This according to the schematic on the pjrc forum midi page. I will give that a try, but I doubt that's it.View attachment 26189View attachment 26190Teensy 3.2 with midi out port.jpg
 
The midi monitor picture shows a SysEx message on channel 0. Your code is supposedly sending notes on channel 1.
Can you perhaps check with an oscilloscope on pin 1 of the Teensy whether you see any MIDI data actually being sent out?

The 470 ohm resistor is only needed to pullup the optocoupler output of the MIDI receiver circuitry [which you don't use].

Paul
 
I do not have an Oscilliscope, have never used one. I do however also have an unused Teensy LC. I have a voltmeter but little experience using it. I did try to combine "blink" with this basic midi out port code. It didn't blink, so something about the midi code is causing it to freeze. Maybe there is a different midi command I should try? Why can't I just use a serial write command of some kind? Usually there is the setting of the baud rate in streaming data to a midi port. I don't see that here.
 
Looks like the wires may be swapped.

The green wire in your photo connects to 3.3V. That should go to pin 4 (positive), but it looks like it's wired to pin 5 (negative). Likewise for the orange wire, it should got to pin 5 (negative) but is actually wired to pin 4.

sc.jpg

While not criitical to making MIDI work, pin 2 should connect to GND rather than AGND.
 
It just looks that way...

Looks like the wires may be swapped.

The green wire in your photo connects to 3.3V. That should go to pin 4 (positive), but it looks like it's wired to pin 5 (negative). Likewise for the orange wire, it should got to pin 5 (negative) but is actually wired to pin 4.

View attachment 26200

While not criitical to making MIDI work, pin 2 should connect to GND rather than AGND.

I've attached a photo of the port so you can see that it just appears that way. It's an inverted port. I'm pretty sure it's correct.inverted.jpg

I'm very intent on getting this to work, so I hope we can figure it out. As I said, I have an unused LC that I could try, also what about alternative code? Is there a simpler test that I can do, maybe try a different serial out pin? I don't have an ocilliscope but maybe I can get a cheap one. I have a volt meter that I barely know how to use but I'm willing to get started. I'm going to need to know how to do basic things with it. Ultimately I want to power my device with batteries. I remember doing this about 9 years ago with an arduino, and I managed to write valid midi code using a "serial write" This is a vague memory. Usually there is code to set the baud rate which for midi is something like 32,000 or what ever the valid number that is in that range is.
 
Last edited:
Use the blink-example, make it a bit slower (2 seconds) and make it flash the tx pin instead pin 13. Then you can measure with your DMM (switch it to voltage mode, "DC" - never ever resistance (for now)) The DMM should show 3.3 volt for two seconds - then zero. And measure the opening on the port.
Alternatively you can use a wire and connect it from pin 13 to the tx pin. Now, the LED should flash even when you toggle the tx pin. Then, do the same with the opening on the port.

This way you can use the inbuilt LED to diagnose levels on any pin (but not vin).
 
Last edited:
There's nothing wrong with the code. It works, as is, when connected to a SY77 keyboard using Serial1.
There must be something wrong with the hardware connections.

Pete
 
Quite possible that the pins of the port are not long enough. Or, as Paul said, wrong pins used.
Or the breadboard is defective.

Chris, please try the LED test I described above.
 
As @Paul says in #12, you have the pins wired the wrong way round. The circuit I used when I tested your code has Teensy pin 2 (Serial1 Tx) connected through a series resistor to pin 5 of the MIDI connector.

Pete
 
Use the blink-example, make it a bit slower (2 seconds) and make it flash the tx pin instead pin 13. Then you can measure with your DMM (switch it to voltage mode, "DC" - never ever resistance (for now)) The DMM should show 3.3 volt for two seconds - then zero. And measure the opening on the port.
Alternatively you can use a wire and connect it from pin 13 to the tx pin. Now, the LED should flash even when you toggle the tx pin. Then, do the same with the opening on the port.

This way you can use the inbuilt LED to diagnose levels on any pin (but not vin).

I'm sorry but I'm just getting started. What is a "DMM"? Your answer seems to be a bit above my level at this point. I will think about it it.
I may ask you more questions when I have a better understanding of what your answer is here. This seems like some very tricked out diagnostic tricks that I am bound to screw up. The picture is clear on the illustration that comes in the shipping packet: the first pin is GND, the second is RX1 and the third down is TX1. I am using the third pin down. Is that not the correct pin? Any confusion about my mixing up pos and neg are because the port I'm using is upside down. I'm pretty sure it's wired correctly. Maybe I can modify the code to try the next serial port? (Pin9)
 
DMM is a Digital MultiMeter - for measuring voltage levels of power and signal lines against Ground. Might also be DVM - Digital Volt Meter.

Will verify polarity as wired as well.
 
blink pin 13 to midi din pin #5.jpg

Is this what you meant? There is a 3.3v pulse on pin 13 when the "Blink" prg is running, so route that to pin 5 of the midi din and look to see if it's visible? I just did this and am looking at the result with a midi monitor program, but that really isn't designed to see a blast of voltage, so it doesn't really prove anything. I will use my volt meter later. Still doesn't solve the problem. I read that "serial.write" on teensy is the USB port and that I should use Serial1.Write if I want to use pin number 3 (TX1). I tried making that change to my code and still no luck.
 
Don't change the code. The code you showed in #8 is correct. It uses Serial1 for MIDI and the library will set the baud rate.
All you have to do is change the connections as described by Paul in #12.

Pete
 
FWIW, getting pins 4 & 5 mixed up is by far the most common serial MIDI output problem (for MIDI input, optocoupler issues reign supreme...)

Seriously, it's so easy to get these swapped. Lots of other web pages show a diagram and it's not clear if pictures are supposed to be the jack or the plug, or if the view is from the front or back. That's why when I wrote the MIDI library page on the PJRC site so many years ago I took that macro shot of the actual jack connector and put those purple labels on the image.

If you're still skeptical, just hold your breadboard so you're looking into the jack from the same angle as that photo. Then you can easily see you've connected the +3.3V power (and 47 ohm) to the pin which was supposed to be the negative side.
 
You were right, of course.

FWIW, getting pins 4 & 5 mixed up is by far the most common serial MIDI output problem (for MIDI input, optocoupler issues reign supreme...)

Seriously, it's so easy to get these swapped. Lots of other web pages show a diagram and it's not clear if pictures are supposed to be the jack or the plug, or if the view is from the front or back. That's why when I wrote the MIDI library page on the PJRC site so many years ago I took that macro shot of the actual jack connector and put those purple labels on the image.

If you're still skeptical, just hold your breadboard so you're looking into the jack from the same angle as that photo. Then you can easily see you've connected the +3.3V power (and 47 ohm) to the pin which was supposed to be the negative side.

I changed them and it's working but like one of those optical illusions that looks like an old woman and a young woman, I"m only seeing it one way. So thanks! I'm sure I'll get into trouble again very quickly.
 
Status
Not open for further replies.
Back
Top