Teensy 3.0 Beta9 Software

Status
Not open for further replies.

Paul

Administrator
Staff member
Update: Teensyduino for Teensy 3.0 has been officially released. These beta test copies will be removed.


Here is the latest "beta9" release for Teensy 3.0


Old beta download links removed. Please use the latest version:
https://www.pjrc.com/teensy/td_download.html



For use without Arduino, see the sample makefile in hardware/teensy/cores/teensy3

For first-time use on Windows, the Serial Installer is needed.

http://www.pjrc.com/teensy/serial_install.exe
http://www.pjrc.com/teensy/windows8.txt

For first-time use on Linux (as a non-root user), this udev rule is required.

http://www.pjrc.com/teensy/49-teensy.rules


Beta #9 adds USB Mouse, Joystick and MIDI support.

Analog input speed is increased, and analogReadResolution() and analogReadAveraging() control the A/D parameters, allowing you to gain higher speeds at lower resolution.

AnalogWriteFrequency() is implemented, so you can set the PWM frequency. Even though there are 10 PWM pins, the chip can only generated 2 frequencies. Pins 3 & 4 share a common frequency. The other PWMs share a common frequency, so if you change any of those 8 pins, the other 7 are also changed.

Many minor bugs were fixed since beta8. Thanks to everyone who's posted feedback and fixes on these forums!
 
I still seem to be getting an error when using keyboard actions such as "KEY_DELETE" is this normal or am I doing something wrong?
 
Just curious ...

With the new Teensy 3 extended functions commands like
analogWriteFrequency()
analogReadResolution()
analogReadAveraging()

What on-line document points to these functions?

Put it another way, if I was a new Teensyduino user, how would I ever know that these functions ever exist?
Of course, I could read every beta release and go through every core header and cpp but there should be
a document detailing these extended functions.
 
Last edited:
The PWMFrequency setting.. What's the acceptable range? How arbitrary can the settings be, like what kind of resolution can be used for the different frequencies?
 
You can go as high as 10 MHz in PWM Frequency but at that rate you have I think only two bits of resolution (eg. only four levels, including OFF). You can go at least as low as 260 Hz, but I didn't try the find the minimum supported frequency.
 
Put it another way, if I was a new Teensyduino user, how would I ever know that these functions ever exist?
Of course, I could read every beta release and go through every core header and cpp but there should be
a document detailing these extended functions.

Documentation on the website is coming.

Usually I try to release features quickly, especially while still calling the code "beta", and then follow up with documentation. Sometimes I tend to build more than document.... especially over the last few months while working on the other USB types and these commonly requested features.

Now that all the widely used USB types are (finally) done, I'll be spending more time testing/porting Arduino libraries and working on the website documentation.
 
Serial via HID

Which example runs the HID SEREMU_INTERFACE? Is there a program for the host for this to talk to via the HID SEREMU_INTERFACE? Also, there is plans to have a simple bulk in/bulk out for USB?
 
Which example runs the HID SEREMU_INTERFACE?

Keyboard+Mouse+Joystick and MIDI. Select them from the Tools > USB Type menu.

Is there a program for the host for this to talk to via the HID SEREMU_INTERFACE?

hardware/tools/teensy_gateway

Once it's running, connect to it using "telnet 127.0.0.1 28541".

Also, there is plans to have a simple bulk in/bulk out for USB?

No short-term plans. Serial fills that need quite well.
 
source/repo?


I have more projects than teensy++ 2.0's, and since the 3.0 is out I thought I would give it a try. With Debian and the teensy++ 2.0 I just `apt-get install gcc-avr binutils-avr avr-libc` compile the teensy_loader_cli.c and go. The gcc here is taking the command lines -mcpu=cortex-m4 -mthumb, since it's arm native, so the compiler should be good. I wouldn't expect the teensy_loader_cli.c to work with the 3.0 unmodified and it looks like all the above are intel based binaries, which isn't going to run on an arm development system. Is there a repository for the new loader? I assume there would be more pieces than a compiler and loader anyway.

Since I see references to getting arduino from github, I was expecting the teensy 3.0 to be living there as a clone of that repository, but I haven't found it.

I like what I see in the teensy 3.0 hardware reading through the manual and datasheets, like a faster chip and a lower power draw, and the 3.3V would be handy for the newer sensors that seem to be going that way.
 
Hi Paul, i received 2 of the Teensy 3.0 boards today (thank you very much), and i was wondering about the status of ISR (interrupt service routine) support as i was planning to do some hardware pin sampling and PWM generation (not with the servo library, but with my own code), unfortunately the K20 datasheet wasn't really helpful in this area (mostly just brought more confusion) as the timers are much more advanced compared to an older atmega32 chip.

Thank you for your reply and wish you a nice day.
 
Hi Paul, i received 2 of the Teensy 3.0 boards today (thank you very much), and i was wondering about the status of ISR (interrupt service routine) support as i was planning to do some hardware pin sampling and PWM generation (not with the servo library, but with my own code), unfortunately the K20 datasheet wasn't really helpful in this area (mostly just brought more confusion) as the timers are much more advanced compared to an older atmega32 chip.

I spent some time poking and prodding, and managed to get an ISR working and reading from the SPI bus:
http://forum.pjrc.com/threads/1347-...her-way-to-read-SPI-consistently-on-Teensy3-0
 
I still seem to be getting an error when using keyboard actions such as "KEY_DELETE" is this normal or am I doing something wrong?

Im getting errors with all the KEY_* , so I guess it's something wrong somewhere. Here are the error messages the example "MediaButtons" output:
Code:
MediaButtons:50: error: 'KEY_MEDIA_PREV_TRACK' was not declared in this scope
MediaButtons:56: error: 'KEY_MEDIA_PLAY_PAUSE' was not declared in this scope
MediaButtons:62: error: 'KEY_MEDIA_NEXT_TRACK' was not declared in this scope
MediaButtons:68: error: 'KEY_MEDIA_VOLUME_DEC' was not declared in this scope
MediaButtons:74: error: 'KEY_MEDIA_VOLUME_INC' was not declared in this scope
MediaButtons:80: error: 'KEY_MEDIA_EJECT' was not declared in this scope

I get the same error on all other code I have written that tries to press a key!
Using the hex codes for the keyboard buttons work so I guess it's just putting it into the correct variables in the keyboard map. I have tried it with several different keyboard layouts.

oh, and by the way the teensy 3.0 i got this year was the best Christmas gift ever :D
 
The media keys are tricky. The way I implemented them on Teensy 2.0, which appeared to be correct according to the HID standard, only works on Mac and Linux. It does not work on Windows. Microsoft, in the infinite wisdom, decided to implement keyboard security in a weird way. Eventually, I found this page that explains the situation:

http://msdn.microsoft.com/en-us/windows/hardware/gg463446

Rather than just copy Teensy 2.0's implementation, I left the media keys out for now. A Windows compatible implementation requires basically implementing the media keys as a completely separate HID interface on its own endpoint. The initial implementation I published when we shipped the Kickstarter rewards was USB Serial only. Keyboard was the first USB type to be added, which involved restructuring the code somewhat. Many people were eagerly awaiting Keyboard support. It seemed like a good idea to keep things simple, to get Keyboard done quickly with the least opportunity for bugs, so I made a decision at the time to add only 1 more USB interface at that time.

Since then, the USB code has matured pretty well, with Mouse, Joystick and MIDI added. Media keys is definitely on my to-do list. Maybe I should just do it now? I've been trying to wrap up another beta release, so while media keys seems quick and easy. Then again, I've been burned many times before trying to rush a last-minute feature right before a release....

Anyway, that's the situation with the media keys. It would be really simple to copy how I did it on Teensy 2.0, except that simply does not work on Windows. I really want to take the time to do this again in a Windows compatible way, now that I know about Microsoft's weird separate interface requirement.


EDIT: as far as I know, the other issues mentioned on that old thread have all been fixed. If there are any remaining Keyboard bugs (other than missing media keys), please start a new thread. I'm preparing to release beta 10 soon, so bug fixes are my top priority right now.
 
Last edited:
Probably a good call to defer media keys and then release them as a new composite device (keyboard+mouse+joystick+media) later.

The missing HID Usage codes mentioned in the older thread have not been fixed. I have made an updated keylayouts.h locally which adds these codes. Paul, I will mail you that file plus a unified diff relative to beta9.

I also changed the UK and French layouts from 'untested' to 'good' in the comments :)
 
Status
Not open for further replies.
Back
Top