PDA

View Full Version : Teensyduino 1.38 Beta #4



Paul
08-25-2017, 09:25 AM
Here is a fourth beta test for Teensyduino 1.38.


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


Changes since Teensyduino 1.38-beta3 (https://forum.pjrc.com/threads/45964-Teensyduino-1-38-Beta-3)

Fix TeensyThreads conflict with MillisTimer
Remove 2.5 second wait in Serial.begin
USBHost_t36 mouser driver (wwatson)
Update Adafruit_CC3000, AccelStepper, Adafruit_GFX, Adafruit_SSD1306, FastLED, IRremote, Keypad, MFRC522, SoftPWM, SPIFlash

Frank B
08-26-2017, 07:38 PM
Works like a charm - yes, it's better without 2.5 second wait.

PaulStoffregen
08-27-2017, 03:38 AM
I'm considering wrapping up 1.38 on Sunday or Monday (August 28).

There's a pretty long list of stuff I was hoping to get into 1.38 which isn't ready... so maybe 1.39 will come early?

But right now, can anyone see any major issues that ought to hold up releasing 1.38?

Frank B
08-27-2017, 07:59 AM
One very minor thing - but I think the reason is very difficult to find:
If my teensy 3.6 is connected to a powered hub - and I switch the hub on to power the teensy - but not the computer (=still switched off!) , the teensy hangs when i use the usb-host library (keyboard).
If i use a usb-batterypack instead, it's ok. Sounds a bit crazy, I know..

defragster
08-27-2017, 10:57 AM
Frank - using my K66 PROTO and MSFT wireless I don't see it with the sketch below when PC OFF and powered up on hub (or batterypack)?
Using IDE 1.8.3 and TD_1.38b4 on my windows machine with powered hub ( tried two ) { note both hubs are getting USB power even when hub power is unplugged on this machine with machine off}

This is the USBHost TEST sketch with midi removed - left in other bits as shown - whatever they do. Does it repro your scenario/issue?

T_3.6 starts - turns on LED_BUILTIN:
> No USB in 1st 4 seconds :: waits 4 seconds in setup() before blink
> With USB before 4 secs :: it blinks on the second
> If blinking - a keystroke toggles the LED.
[ tested F_CPU=240/F_BUS=120 ]



// Simple test of USB Host
// https://forum.pjrc.com/threads/46011-Teensyduino-1-38-Beta-4?p=151921&viewfull=1#post151921
// This example is in the public domain

#include "USBHost_t36.h"

USBHost myusb;
USBHub hub1(myusb);
USBHub hub2(myusb);
USBHub hub3(myusb);
KeyboardController keyboard1(myusb);
KeyboardController keyboard2(myusb);

void setup()
{
pinMode( LED_BUILTIN, OUTPUT );
digitalWriteFast( LED_BUILTIN, 1 );
while (!Serial && millis() < 4000) ; // wait for Arduino Serial Monitor
Serial.println("USB Host Testing");
myusb.begin();
keyboard1.attachPress(OnPress);
keyboard2.attachPress(OnPress);
}

elapsedMillis tBlink;
bool tState = true;
void loop()
{
myusb.Task();
if ( tBlink > 1000) {
tBlink -= 1000;
digitalWriteFast( LED_BUILTIN, tState = !tState );
}
}


void OnPress(int key)
{
digitalWriteFast( LED_BUILTIN, tState = !tState );
Serial.print("key '");
Serial.print((char)key);
Serial.print("' ");
Serial.println(key);
}

mjs513
08-27-2017, 11:23 AM
Been using it for awhile now and not have any problems with it. Don't use it the same way as some but have not had any issues.

TipsEZ
08-27-2017, 11:58 AM
I've just downloaded it for little project I'm working on. I'll be using it with Visual Studio 2015 and Visual Micro. Anyone had any issues with this combo?

defragster
08-30-2017, 08:32 PM
I'm considering wrapping up 1.38 on Sunday or Monday (August 28).

There's a pretty long list of stuff I was hoping to get into 1.38 which isn't ready... so maybe 1.39 will come early?

But right now, can anyone see any major issues that ought to hold up releasing 1.38?

I got an email from FrankB - he tried code from post #5 and it works on his system for USB_HOST. So it is something else in the system as he has it for Teensy64.

Frank B
08-30-2017, 08:46 PM
@defragster: It's not important and a very minor issue. Nevertheless there seems to be a special condition and something crashes. I'll look later, maybe...
Edit: You have access to the sourcecode ;)

defragster
08-30-2017, 08:49 PM
@defragster: It's not important and a very minor issue. Nevertheless there seems to be a special condition and something crashes. I'll look later, maybe...

Just wanted Paul to know the odd behavior doesn't seem to be in the included HOST code.

Frank B
08-30-2017, 08:50 PM
I'm not sure about that. But maybe the reason is the old fork (~ first release), I use :)
Or it's just my USB-hub.