PDA

View Full Version : Teensyduino 1.31 Beta #2 Available



Paul
10-23-2016, 09:02 PM
Here is a second beta test for Teensyduino 1.31.


Edit: old beta test linkes removed. Full non-beta release is here:
http://www.pjrc.com/teensy/td_download.html



Changes since Teensyduino 1.31-beta1 (https://forum.pjrc.com/threads/37204-Teensyduino-1-31-Beta-1-Available):


Arduino SD library support 4 bit SDIO on Teensy 3.5 & 3.6 (special thanks WMXZ)
Fix EEPROM on Teensy 3.6 with CPU speed > 120 MHz (special thanks Defragster)
Update FlexCAN library for CAN1 on Teensy 3.6 (thanks Pawelsky)
Update OctoWS2811 to support Teensy 3.5 & 3.6
Fix USB serial number on Teensy 3.6 with CPU speed > 120 MHz
Fix audio I2S output on Teensy 3.6 with CPU speed > 120 MHz when also using I2S input
Support Teensy 3.5 & 3.6 on older versons of Arduino
Fix SPI1 default SCK1 pin (thanks KurtE)
Optimize attachInterrupt (thanks tni)
Improve USB stability on Teensy 3.6 with CPU 180 or 216 MHz
Add USB MIDI custom name example
Fix Adafruit_ST7735 on Teensy 3.5 & 3.6 (thanks MichaelMeissner)
Many library metadata files updated for PlatformIO

PaulStoffregen
10-23-2016, 09:17 PM
Before everyone posts it... Yeah, I see the annoying (but harmless) compiler warnings from the HSRUN functions with Teensy 3.2. Will fix soon...

TelephoneBill
10-24-2016, 10:41 AM
Just tried the SD Card Info example from "https://github.com/PaulStoffregen/SD/blob/master/examples/CardInfo/CardInfo.ino" with 1.31 Beta 2.

Am I right in thinking that this example should work now with a standard T3.6 using the built-in SD card? I changed the "chipselect" as follows...

// change this to match your SD shield or module;
// Arduino Ethernet shield: pin 4
// Adafruit SD shields and modules: pin 10
// Sparkfun SD shield: pin 8
// Teensy audio board: pin 10
// Teensy 3.5 & 3.6 on-board: BUILTIN_SDCARD
// Wiz820+SD board: pin 4
// Teensy 2.0: pin 0
// Teensy++ 2.0: pin 20
const int chipSelect = BUILTIN_SDCARD;

I'm getting the following error messages on trying to compile...


Arduino: 1.6.11 (Windows 7), TD: 1.31-beta2, Board: "Teensy 3.6, Serial, 180 MHz, United Kingdom"

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:25:57: error: 'void (* SdFile::dateTime_)(uint16_t*, uint16_t*)' is not a static member of 'class SdFile'

void (*SdFile::dateTime_)(uint16_t* date, uint16_t* time) = NULL;

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:33:28: error: no 'uint8_t SdFile::addCluster()' member function declared in class 'SdFile'

uint8_t SdFile::addCluster() {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:46:35: error: no 'uint8_t SdFile::addDirCluster()' member function declared in class 'SdFile'

uint8_t SdFile::addDirCluster(void) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:61:44: error: no 'dir_t* SdFile::cacheDirEntry(uint8_t)' member function declared in class 'SdFile'

dir_t* SdFile::cacheDirEntry(uint8_t action) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:74:27: error: no 'uint8_t SdFile::close()' member function declared in class 'SdFile'

uint8_t SdFile::close(void) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:91:71: error: no 'uint8_t SdFile::contiguousRange(uint32_t*, uint32_t*)' member function declared in class 'SdFile'

uint8_t SdFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:130:44: error: no 'uint8_t SdFile::createContiguous(SdFile*, const char*, uint32_t)' member function declared in class 'SdFile'

const char* fileName, uint32_t size) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:158:36: error: no 'uint8_t SdFile::dirEntry(dir_t*)' member function declared in class 'SdFile'

uint8_t SdFile::dirEntry(dir_t* dir) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:178:50: error: no 'void SdFile::dirName(const dir_t&, char*)' member function declared in class 'SdFile'

void SdFile::dirName(const dir_t& dir, char* name) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:201:46: error: no 'void SdFile::ls(uint8_t, uint8_t)' member function declared in class 'SdFile'

void SdFile::ls(uint8_t flags, uint8_t indent) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:245:58: error: no 'uint8_t SdFile::make83Name(const char*, uint8_t*)' member function declared in class 'SdFile'

uint8_t SdFile::make83Name(const char* str, uint8_t* name) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:284:57: error: no 'uint8_t SdFile::makeDir(SdFile*, const char*)' member function declared in class 'SdFile'

uint8_t SdFile::makeDir(SdFile* dir, const char* dirName) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:384:74: error: no 'uint8_t SdFile::open(SdFile*, const char*, uint8_t)' member function declared in class 'SdFile'

uint8_t SdFile::open(SdFile* dirFile, const char* fileName, uint8_t oflag) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:476:68: error: no 'uint8_t SdFile::open(SdFile*, uint16_t, uint8_t)' member function declared in class 'SdFile'

uint8_t SdFile::open(SdFile* dirFile, uint16_t index, uint8_t oflag) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:502:64: error: no 'uint8_t SdFile::openCachedEntry(uint8_t, uint8_t)' member function declared in class 'SdFile'

uint8_t SdFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:550:26: error: 'uint8_t SdFile::openRoot' is not a static member of 'class SdFile'

uint8_t SdFile::openRoot(SdVolume* vol) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:550:26: error: 'SdVolume' was not declared in this scope

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:550:36: error: 'vol' was not declared in this scope

uint8_t SdFile::openRoot(SdVolume* vol) {

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\uti lity\SdFile.cpp:550:41: error: expected ',' or ';' before '{' token

uint8_t SdFile::openRoot(SdVolume* vol) {

^

Multiple libraries were found for "SD.h"
Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
Not used: C:\Program Files (x86)\Arduino\libraries\SD
Error compiling for board Teensy 3.6.

manitou
10-24-2016, 01:33 PM
it may be necessary to remove any SdFat libraries that you have

MichaelMeissner
10-24-2016, 02:03 PM
Unfortunately, the Adafruit_ST7735 library just does not work for me, using the 128x128 TFT display I've been using for uncannyEyes.

I cloned the graphicstest and changed the pin defaults for my screen:

CS is pin 10
D/C is pin A1/15
Reset is pin 8
SCLK is pin 13
MOSI is pin 11
I used the INITR_GREENTAB initialization option (note in the Adafruit version, INITR_128GREENTAB is the preferred version, but that isn't in the Teensy version).
screen powered via 3.3v regulator off of VIN
Teensy 3.1


If I substitute the current Adafruit library for the Teensy one it works fine (part of the screen is clipped because the 128x128 screen is smaller than the 160x128 display, but the rest of the stuff is displayed on the screen).

If I use the current 1.31 beta2 Teensy version, the screen just stays blank.

Note, this is a Teensy 3.1, and not the Teensy 3.6, so the recent changes should not matter. Unlike uncannyEyes, this test just uses the standard graphics primitives.



/************************************************** *
This is an example sketch for the Adafruit 1.8" SPI display.
This library works with the Adafruit 1.8" TFT Breakout w/SD card
----> http://www.adafruit.com/products/358
as well as Adafruit raw 1.8" TFT display
----> http://www.adafruit.com/products/618

Check out the links above for our tutorials and wiring diagrams
These displays use SPI to communicate, 4 or 5 pins are required to
interface (RST is optional)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
************************************************** **/

// This Teensy3 native optimized version requires specific pins
//
#define sclk 13 // SCLK can also use pin 14
#define mosi 11 // MOSI can also use pin 7
#define cs 10 // CS & DC can use pins 2, 6, 9, 10, 15, 20, 21, 22, 23
#define dc A1 // but certain pairs must NOT be used: 2+10, 6+9, 20+23, 21+22
#define rst 8 // RST can use any pin
#define sdcs 4 // CS for SD card, can use any pin

#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>

#if defined(__SAM3X8E__)
#undef __FlashStringHelper::F(string_literal)
#define F(string_literal) string_literal
#endif

// Option 1: use any pins but a little slower
//Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst);

// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst);
float p = 3.1415926;


#define Neutral 0
#define Press 1
#define Up 2
#define Down 3
#define Right 4
#define Left 5

// Check the joystick position
int CheckJoystick()
{
int joystickState = analogRead(3);

if (joystickState < 50) return Left;
if (joystickState < 150) return Down;
if (joystickState < 250) return Press;
if (joystickState < 500) return Right;
if (joystickState < 650) return Up;
return Neutral;
}


void setup(void) {
pinMode(sdcs, INPUT_PULLUP); // don't touch the SD card
Serial.begin(9600);
Serial.print("hello!");

// Our supplier changed the 1.8" display slightly after Jan 10, 2012
// so that the alignment of the TFT had to be shifted by a few pixels
// this just means the init code is slightly different. Check the
// color of the tab to see which init code to try. If the display is
// cut off or has extra 'random' pixels on the top & left, try the
// other option!
// If you are seeing red and green color inversion, use Black Tab

// If your TFT's plastic wrap has a Black Tab, use the following:
//tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
// If your TFT's plastic wrap has a Red Tab, use the following:
//tft.initR(INITR_REDTAB); // initialize a ST7735R chip, red tab
// If your TFT's plastic wrap has a Green Tab, use the following:
//tft.initR(INITR_GREENTAB); // initialize a ST7735R chip, green tab

//tft.initR(INITR_144GREENTAB); // initialize a ST7735R chip with 128x128 display, green tab
tft.initR(INITR_GREENTAB); // initialize a ST7735R chip, green tab

Serial.println("init");

uint16_t time = millis();
tft.fillScreen(ST7735_BLACK);
time = millis() - time;

Serial.println(time, DEC);
delay(500);

// large block of text
tft.fillScreen(ST7735_BLACK);
testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ", ST7735_WHITE);
delay(1000);

// tft print function!
tftPrintTest();
delay(4000);

// a single pixel
tft.drawPixel(tft.width()/2, tft.height()/2, ST7735_GREEN);
delay(500);

// line draw test
testlines(ST7735_YELLOW);
delay(500);

// optimized lines
testfastlines(ST7735_RED, ST7735_BLUE);
delay(500);

testdrawrects(ST7735_GREEN);
delay(500);

testfillrects(ST7735_YELLOW, ST7735_MAGENTA);
delay(500);

tft.fillScreen(ST7735_BLACK);
testfillcircles(10, ST7735_BLUE);
testdrawcircles(10, ST7735_WHITE);
delay(500);

testroundrects();
delay(500);

testtriangles();
delay(500);

mediabuttons();
delay(500);

Serial.println("done");
delay(1000);
}

void loop() {
tft.invertDisplay(true);
delay(500);
tft.invertDisplay(false);
delay(500);
int joy = CheckJoystick();
switch (joy)
{
case Left:
Serial.println("Left");
break;
case Right:
Serial.println("Right");
break;
case Up:
Serial.println("Up");
break;
case Down:
Serial.println("Down");
break;
case Press:
Serial.println("Press");
break;
}
}

void testlines(uint16_t color) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(0, 0, x, tft.height()-1, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(0, 0, tft.width()-1, y, color);
}

tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(tft.width()-1, 0, x, tft.height()-1, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(tft.width()-1, 0, 0, y, color);
}

tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(0, tft.height()-1, x, 0, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(0, tft.height()-1, tft.width()-1, y, color);
}

tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(tft.width()-1, tft.height()-1, x, 0, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(tft.width()-1, tft.height()-1, 0, y, color);
}
}

void testdrawtext(char *text, uint16_t color) {
tft.setCursor(0, 0);
tft.setTextColor(color);
tft.setTextWrap(true);
tft.print(text);
}

void testfastlines(uint16_t color1, uint16_t color2) {
tft.fillScreen(ST7735_BLACK);
for (int16_t y=0; y < tft.height(); y+=5) {
tft.drawFastHLine(0, y, tft.width(), color1);
}
for (int16_t x=0; x < tft.width(); x+=5) {
tft.drawFastVLine(x, 0, tft.height(), color2);
}
}

void testdrawrects(uint16_t color) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color);
}
}

void testfillrects(uint16_t color1, uint16_t color2) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=tft.width()-1; x > 6; x-=6) {
tft.fillRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color1);
tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color2);
}
}

void testfillcircles(uint8_t radius, uint16_t color) {
for (int16_t x=radius; x < tft.width(); x+=radius*2) {
for (int16_t y=radius; y < tft.height(); y+=radius*2) {
tft.fillCircle(x, y, radius, color);
}
}
}

void testdrawcircles(uint8_t radius, uint16_t color) {
for (int16_t x=0; x < tft.width()+radius; x+=radius*2) {
for (int16_t y=0; y < tft.height()+radius; y+=radius*2) {
tft.drawCircle(x, y, radius, color);
}
}
}

void testtriangles() {
tft.fillScreen(ST7735_BLACK);
int color = 0xF800;
int t;
int w = 63;
int x = 159;
int y = 0;
int z = 127;
for(t = 0 ; t <= 15; t+=1) {
tft.drawTriangle(w, y, y, x, z, x, color);
x-=4;
y+=4;
z-=4;
color+=100;
}
}

void testroundrects() {
tft.fillScreen(ST7735_BLACK);
int color = 100;
int i;
int t;
for(t = 0 ; t <= 4; t+=1) {
int x = 0;
int y = 0;
int w = 127;
int h = 159;
for(i = 0 ; i <= 24; i+=1) {
tft.drawRoundRect(x, y, w, h, 5, color);
x+=2;
y+=3;
w-=4;
h-=6;
color+=1100;
}
color+=100;
}
}

void tftPrintTest() {
tft.setTextWrap(false);
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0, 30);
tft.setTextColor(ST7735_RED);
tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ST7735_YELLOW);
tft.setTextSize(2);
tft.println("Hello World!");
tft.setTextColor(ST7735_GREEN);
tft.setTextSize(3);
tft.println("Hello World!");
tft.setTextColor(ST7735_BLUE);
tft.setTextSize(4);
tft.print(1234.567);
delay(1500);
tft.setCursor(0, 0);
tft.fillScreen(ST7735_BLACK);
tft.setTextColor(ST7735_WHITE);
tft.setTextSize(0);
tft.println("Hello World!");
tft.setTextSize(1);
tft.setTextColor(ST7735_GREEN);
tft.print(p, 6);
tft.println(" Want pi?");
tft.println(" ");
tft.print(8675309, HEX); // print 8,675,309 out in HEX!
tft.println(" Print HEX!");
tft.println(" ");
tft.setTextColor(ST7735_WHITE);
tft.println("Sketch has been");
tft.println("running for: ");
tft.setTextColor(ST7735_MAGENTA);
tft.print(millis() / 1000);
tft.setTextColor(ST7735_WHITE);
tft.print(" seconds.");
}

void mediabuttons() {
// play
tft.fillScreen(ST7735_BLACK);
tft.fillRoundRect(25, 10, 78, 60, 8, ST7735_WHITE);
tft.fillTriangle(42, 20, 42, 60, 90, 40, ST7735_RED);
delay(500);
// pause
tft.fillRoundRect(25, 90, 78, 60, 8, ST7735_WHITE);
tft.fillRoundRect(39, 98, 20, 45, 5, ST7735_GREEN);
tft.fillRoundRect(69, 98, 20, 45, 5, ST7735_GREEN);
delay(500);
// play color
tft.fillTriangle(42, 20, 42, 60, 90, 40, ST7735_BLUE);
delay(50);
// pause color
tft.fillRoundRect(39, 98, 20, 45, 5, ST7735_RED);
tft.fillRoundRect(69, 98, 20, 45, 5, ST7735_RED);
// play color
tft.fillTriangle(42, 20, 42, 60, 90, 40, ST7735_GREEN);
}


<edit>
I was curious, I went back to previous Teensy versions back to 1.26, and none of them seem to work with the teensy version of Adafruit_ST7735 using the INITR_GREENTAB option.]

So for now, I'm going to keep the Adafruit version in my tree instead of the Teensy version. For me, the work around is acceptable, but presumably there might be other people trying to use this display.

TelephoneBill
10-24-2016, 03:19 PM
it may be necessary to remove any SdFat libraries that you have

Looking at the IDE library list (menu "Sketch" then "Include Library"), I see there is "SD" (under Arduino Libraries) and "SdFat" (under "Contributed Libraries") and also "uSDFS" (under "Contributed Libraries"). I think I remember adding these last two when experimenting with the SD card previously.

So your suggestion implies removing just the second one ("SdFat"). There is no obvious way to remove a library from the IDE menu, so I went to delete the folder called "SdFat" listed in "C:\Program Files (x86)\Arduino\libraries".

This then compiled without error. Thanks for your help.

Frank B
10-24-2016, 03:48 PM
It compiles for me, without errors, too,
BUT:

The example "SdCardTest" from the AudioLibrary does not work. This is the output:


SD Card Test ------------
SD card is connected :-)
Card type is SDHC
File system space is 7939.82 Mbytes.
SD library can not access the filesystem!
Please report this problem, with the make & model of your SD card.
http://forum.pjrc.com/forums/4-Suggestions-amp-Bug-Reports
Unable to find SDTEST1.WAV on this card


I should mention, that SDTEST1.WAV is on the card.

defragster
10-24-2016, 04:02 PM
Before everyone posts it... Yeah, I see the annoying (but harmless) compiler warnings from the HSRUN functions with Teensy 3.2. Will fix soon...

Bummer - I could have caught those - but ... it was late when published and I'm just now seeing this was posted . . .

Paul: for your make the IDE Better list - would it be possible on the 'status' BAR between the Code/Output windows to place a count of Warnings / Errors?

Frank B
10-24-2016, 04:06 PM
...and add a VT-100 emulation PLEEAAAAAAAAASE :rolleyes:
(+ my little trick with "defs.h" in platform.txt :-)

el_supremo
10-24-2016, 05:01 PM
I have the same problem with the new ST7735 as Michael has reported - I am using a T3.6 and just get a blank, black screen. When I revert to the previous library I was using all is well. I'll compare the two libraries and try to sort out what's wrong.

Pete

manitou
10-24-2016, 05:46 PM
It compiles for me, without errors, too,
BUT:

The example "SdCardTest" from the AudioLibrary does not work. This is the output:
[
I should mention, that SDTEST1.WAV is on the card.

Did you use BUILTIN_SDCARD in the SD.begin()?

Frank B
10-24-2016, 05:54 PM
@manitou. Yes. See the quoted output - everything is ok, except accessing the file. In the example.
Other sketches work, but not the one example from the audio-library.

A Question, i never tried this: Is it possible to open a file twice ? I'd like to try something like a big FIFO-Buffer.. on SD-Card

manitou
10-24-2016, 06:02 PM
@manitou. Yes. See the quoted output - everything is ok, except accessing the file. In the example.
Other sketches work, but not the one example from the audio-library.


Yes, your output suggests BUILTIN_SDCARD was used in init() but not begin()

Frank B
10-24-2016, 06:07 PM
oops.
i got it. thanks.. :)

PaulStoffregen
10-24-2016, 10:53 PM
Unfortunately, the Adafruit_ST7735 library just does not work for me, using the 128x128 TFT display I've been using for uncannyEyes.

Which display are you using? My ST7735 is 160x128 pixels.

PaulStoffregen
10-24-2016, 11:33 PM
...and add a VT-100 emulation PLEEAAAAAAAAASE :rolleyes:


What, like in the Arduino Serial Monitor?

KurtE
10-24-2016, 11:59 PM
Which display are you using? My ST7735 is 160x128 pixels.
My guess is he has something like: https://www.adafruit.com/products/2088

The adafruit current library added support for this display. I think they have extra init table for different boards.

el_supremo
10-25-2016, 12:28 AM
FYI: my ST7735R is this one: https://www.adafruit.com/products/358

Pete

E.TexasTesla
10-25-2016, 01:59 AM
Hello, I'm new to this forum and I sure could use a little help.

I,m building the adafruit "uncannyEyes" project for halloween.
I have a new Teensy3.2 and a pair of 1.8 TFTs <128*160 ST7735 driver chip>
I,m running arduino IDE version 1.6.12 and the above mentioned beta version of teensyduino .
Should i roll back my verion of arduino IDE or go ahead and try it with the beta version.
It sounds like their may be a few quirks ?

Thanks, CJ

MichaelMeissner
10-25-2016, 02:00 AM
Which display are you using? My ST7735 is 160x128 pixels.

It is a 128x128 display that I bought from ebay: http://www.ebay.com/itm/122005165823?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT.

Adafruit sells a similar display that also has a micro-SD card for slightly more: https://www.adafruit.com/products/2088.

The adafruit page claims its current draw is ~25mA, while with the 3rd party display I got, I'm seeing about 100mA of draw.

There is a new init flag for this display (INITR_144GREENTAB), and the places that set the height/width check that flag and set the appropriate width to 128 (or height for rotation) instead of 160.

However, if I use the standard INITR_GREENTAB flag, the demo program does work with the adafruit driver, but not with the Teensy driver.

MichaelMeissner
10-25-2016, 02:05 AM
Hello, I'm new to this forum and I sure could use a little help.

I,m building the adafruit "uncannyEyes" project for halloween.
I have a new Teensy3.2 and a pair of 1.8 TFTs <128*160 ST7735 driver chip>
I,m running arduino IDE version 1.6.12 and the above mentioned beta version of teensyduino .
Should i roll back my verion of arduino IDE or go ahead and try it with the beta version.
It sounds like their may be a few quirks ?

Thanks, CJ

I doubt the beta driver will work for you. It didn't for me with a 128x128 display and it didn't work for el sumpreo either. I went back several releases of TeensyDuino and none of the drivers worked for me.

If you temporarily don't install the Teensy version, and install the Adafruit version, it should work fine until a fix is found. You may have to change the initialization from INITR_144GREENTAB to the appropriate display for your system (perhaps INITR_GREENTAB). Hopefully the extra pixels won't change the display (which is targeted to 128x128 displays).

PaulStoffregen
10-25-2016, 02:15 AM
I ordered the Adafruit display.

MichaelMeissner
10-25-2016, 02:19 AM
I ordered the Adafruit display.

If there is anything you want me to try, before your board arrives, let me know.

<edit>
I was curious, and if I remove the giant if statement on line 578 of Adafruit_ST7735 that enables the special hardware support, the test program (using INITR_GREENTAB) works fine.

GRNdragon
10-26-2016, 03:52 PM
Unfortunately, the Adafruit_ST7735 library just does not work for me, using the 128x128 TFT display I've been using for uncannyEyes.

I cloned the graphicstest and changed the pin defaults for my screen:

CS is pin 10
D/C is pin A1/15
Reset is pin 8
SCLK is pin 13
MOSI is pin 11
I used the INITR_GREENTAB initialization option (note in the Adafruit version, INITR_128GREENTAB is the preferred version, but that isn't in the Teensy version).
screen powered via 3.3v regulator off of VIN
Teensy 3.1


If I substitute the current Adafruit library for the Teensy one it works fine (part of the screen is clipped because the 128x128 screen is smaller than the 160x128 display, but the rest of the stuff is displayed on the screen).

If I use the current 1.31 beta2 Teensy version, the screen just stays blank.

Note, this is a Teensy 3.1, and not the Teensy 3.6, so the recent changes should not matter. Unlike uncannyEyes, this test just uses the standard graphics primitives.



/************************************************** *
This is an example sketch for the Adafruit 1.8" SPI display.
This library works with the Adafruit 1.8" TFT Breakout w/SD card
----> http://www.adafruit.com/products/358
as well as Adafruit raw 1.8" TFT display
----> http://www.adafruit.com/products/618

Check out the links above for our tutorials and wiring diagrams
These displays use SPI to communicate, 4 or 5 pins are required to
interface (RST is optional)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
************************************************** **/

// This Teensy3 native optimized version requires specific pins
//
#define sclk 13 // SCLK can also use pin 14
#define mosi 11 // MOSI can also use pin 7
#define cs 10 // CS & DC can use pins 2, 6, 9, 10, 15, 20, 21, 22, 23
#define dc A1 // but certain pairs must NOT be used: 2+10, 6+9, 20+23, 21+22
#define rst 8 // RST can use any pin
#define sdcs 4 // CS for SD card, can use any pin

#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>

#if defined(__SAM3X8E__)
#undef __FlashStringHelper::F(string_literal)
#define F(string_literal) string_literal
#endif

// Option 1: use any pins but a little slower
//Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst);

// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst);
float p = 3.1415926;


#define Neutral 0
#define Press 1
#define Up 2
#define Down 3
#define Right 4
#define Left 5

// Check the joystick position
int CheckJoystick()
{
int joystickState = analogRead(3);

if (joystickState < 50) return Left;
if (joystickState < 150) return Down;
if (joystickState < 250) return Press;
if (joystickState < 500) return Right;
if (joystickState < 650) return Up;
return Neutral;
}


void setup(void) {
pinMode(sdcs, INPUT_PULLUP); // don't touch the SD card
Serial.begin(9600);
Serial.print("hello!");

// Our supplier changed the 1.8" display slightly after Jan 10, 2012
// so that the alignment of the TFT had to be shifted by a few pixels
// this just means the init code is slightly different. Check the
// color of the tab to see which init code to try. If the display is
// cut off or has extra 'random' pixels on the top & left, try the
// other option!
// If you are seeing red and green color inversion, use Black Tab

// If your TFT's plastic wrap has a Black Tab, use the following:
//tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
// If your TFT's plastic wrap has a Red Tab, use the following:
//tft.initR(INITR_REDTAB); // initialize a ST7735R chip, red tab
// If your TFT's plastic wrap has a Green Tab, use the following:
//tft.initR(INITR_GREENTAB); // initialize a ST7735R chip, green tab

//tft.initR(INITR_144GREENTAB); // initialize a ST7735R chip with 128x128 display, green tab
tft.initR(INITR_GREENTAB); // initialize a ST7735R chip, green tab

Serial.println("init");

uint16_t time = millis();
tft.fillScreen(ST7735_BLACK);
time = millis() - time;

Serial.println(time, DEC);
delay(500);

// large block of text
tft.fillScreen(ST7735_BLACK);
testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ", ST7735_WHITE);
delay(1000);

// tft print function!
tftPrintTest();
delay(4000);

// a single pixel
tft.drawPixel(tft.width()/2, tft.height()/2, ST7735_GREEN);
delay(500);

// line draw test
testlines(ST7735_YELLOW);
delay(500);

// optimized lines
testfastlines(ST7735_RED, ST7735_BLUE);
delay(500);

testdrawrects(ST7735_GREEN);
delay(500);

testfillrects(ST7735_YELLOW, ST7735_MAGENTA);
delay(500);

tft.fillScreen(ST7735_BLACK);
testfillcircles(10, ST7735_BLUE);
testdrawcircles(10, ST7735_WHITE);
delay(500);

testroundrects();
delay(500);

testtriangles();
delay(500);

mediabuttons();
delay(500);

Serial.println("done");
delay(1000);
}

void loop() {
tft.invertDisplay(true);
delay(500);
tft.invertDisplay(false);
delay(500);
int joy = CheckJoystick();
switch (joy)
{
case Left:
Serial.println("Left");
break;
case Right:
Serial.println("Right");
break;
case Up:
Serial.println("Up");
break;
case Down:
Serial.println("Down");
break;
case Press:
Serial.println("Press");
break;
}
}

void testlines(uint16_t color) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(0, 0, x, tft.height()-1, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(0, 0, tft.width()-1, y, color);
}

tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(tft.width()-1, 0, x, tft.height()-1, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(tft.width()-1, 0, 0, y, color);
}

tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(0, tft.height()-1, x, 0, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(0, tft.height()-1, tft.width()-1, y, color);
}

tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawLine(tft.width()-1, tft.height()-1, x, 0, color);
}
for (int16_t y=0; y < tft.height(); y+=6) {
tft.drawLine(tft.width()-1, tft.height()-1, 0, y, color);
}
}

void testdrawtext(char *text, uint16_t color) {
tft.setCursor(0, 0);
tft.setTextColor(color);
tft.setTextWrap(true);
tft.print(text);
}

void testfastlines(uint16_t color1, uint16_t color2) {
tft.fillScreen(ST7735_BLACK);
for (int16_t y=0; y < tft.height(); y+=5) {
tft.drawFastHLine(0, y, tft.width(), color1);
}
for (int16_t x=0; x < tft.width(); x+=5) {
tft.drawFastVLine(x, 0, tft.height(), color2);
}
}

void testdrawrects(uint16_t color) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=0; x < tft.width(); x+=6) {
tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color);
}
}

void testfillrects(uint16_t color1, uint16_t color2) {
tft.fillScreen(ST7735_BLACK);
for (int16_t x=tft.width()-1; x > 6; x-=6) {
tft.fillRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color1);
tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color2);
}
}

void testfillcircles(uint8_t radius, uint16_t color) {
for (int16_t x=radius; x < tft.width(); x+=radius*2) {
for (int16_t y=radius; y < tft.height(); y+=radius*2) {
tft.fillCircle(x, y, radius, color);
}
}
}

void testdrawcircles(uint8_t radius, uint16_t color) {
for (int16_t x=0; x < tft.width()+radius; x+=radius*2) {
for (int16_t y=0; y < tft.height()+radius; y+=radius*2) {
tft.drawCircle(x, y, radius, color);
}
}
}

void testtriangles() {
tft.fillScreen(ST7735_BLACK);
int color = 0xF800;
int t;
int w = 63;
int x = 159;
int y = 0;
int z = 127;
for(t = 0 ; t <= 15; t+=1) {
tft.drawTriangle(w, y, y, x, z, x, color);
x-=4;
y+=4;
z-=4;
color+=100;
}
}

void testroundrects() {
tft.fillScreen(ST7735_BLACK);
int color = 100;
int i;
int t;
for(t = 0 ; t <= 4; t+=1) {
int x = 0;
int y = 0;
int w = 127;
int h = 159;
for(i = 0 ; i <= 24; i+=1) {
tft.drawRoundRect(x, y, w, h, 5, color);
x+=2;
y+=3;
w-=4;
h-=6;
color+=1100;
}
color+=100;
}
}

void tftPrintTest() {
tft.setTextWrap(false);
tft.fillScreen(ST7735_BLACK);
tft.setCursor(0, 30);
tft.setTextColor(ST7735_RED);
tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ST7735_YELLOW);
tft.setTextSize(2);
tft.println("Hello World!");
tft.setTextColor(ST7735_GREEN);
tft.setTextSize(3);
tft.println("Hello World!");
tft.setTextColor(ST7735_BLUE);
tft.setTextSize(4);
tft.print(1234.567);
delay(1500);
tft.setCursor(0, 0);
tft.fillScreen(ST7735_BLACK);
tft.setTextColor(ST7735_WHITE);
tft.setTextSize(0);
tft.println("Hello World!");
tft.setTextSize(1);
tft.setTextColor(ST7735_GREEN);
tft.print(p, 6);
tft.println(" Want pi?");
tft.println(" ");
tft.print(8675309, HEX); // print 8,675,309 out in HEX!
tft.println(" Print HEX!");
tft.println(" ");
tft.setTextColor(ST7735_WHITE);
tft.println("Sketch has been");
tft.println("running for: ");
tft.setTextColor(ST7735_MAGENTA);
tft.print(millis() / 1000);
tft.setTextColor(ST7735_WHITE);
tft.print(" seconds.");
}

void mediabuttons() {
// play
tft.fillScreen(ST7735_BLACK);
tft.fillRoundRect(25, 10, 78, 60, 8, ST7735_WHITE);
tft.fillTriangle(42, 20, 42, 60, 90, 40, ST7735_RED);
delay(500);
// pause
tft.fillRoundRect(25, 90, 78, 60, 8, ST7735_WHITE);
tft.fillRoundRect(39, 98, 20, 45, 5, ST7735_GREEN);
tft.fillRoundRect(69, 98, 20, 45, 5, ST7735_GREEN);
delay(500);
// play color
tft.fillTriangle(42, 20, 42, 60, 90, 40, ST7735_BLUE);
delay(50);
// pause color
tft.fillRoundRect(39, 98, 20, 45, 5, ST7735_RED);
tft.fillRoundRect(69, 98, 20, 45, 5, ST7735_RED);
// play color
tft.fillTriangle(42, 20, 42, 60, 90, 40, ST7735_GREEN);
}


<edit>
I was curious, I went back to previous Teensy versions back to 1.26, and none of them seem to work with the teensy version of Adafruit_ST7735 using the INITR_GREENTAB option.]

So for now, I'm going to keep the Adafruit version in my tree instead of the Teensy version. For me, the work around is acceptable, but presumably there might be other people trying to use this display.



In running the unCannyEyes on Teensy 3.6 I had to set the SPI clock rate to 18MHz or less using the OLED displays, depending on the running speed of the Teensy I would get a corrupt display or no display. Just a thought.

// EYE-RENDERING FUNCTION --------------------------------------------------

SPISettings settings(18000000, MSBFIRST, SPI_MODE3); // Teensy 3.1 max SPI

void drawEye( // Renders one eye. Inputs must be pre-clipped & valid.

MichaelMeissner
10-26-2016, 05:08 PM
In running the unCannyEyes on Teensy 3.6 I had to set the SPI clock rate to 18MHz or less using the OLED displays, depending on the running speed of the Teensy I would get a corrupt display or no display. Just a thought.

// EYE-RENDERING FUNCTION --------------------------------------------------

SPISettings settings(18000000, MSBFIRST, SPI_MODE3); // Teensy 3.1 max SPI

void drawEye( // Renders one eye. Inputs must be pre-clipped & valid.

Note, OLED displays use the SSD1351 driver, and yes it is well known the displays can't be refreshed that fast. I can currently get 24 Mhz from a Teensy 3.6 using the Adafruit display, and 72 Mhz using the Newhaven display.

However, the ST7735 bug is for the TFT display. Using the Adafruit driver (which avoids setting the special sauce for faster SPI support), I can run two third party displays up to 240 Mhz (on the Teensy 3.6, but I can't run 2 displays at all on the Teensy 3.1). But the OLED displays look better, particularly if you aren't viewing the display head on.

thanos
10-27-2016, 10:36 AM
Hello,i have the version 1.6.12 of arduino and 1.31 of teensyduino.
I have written this code



volatile byte channel_1, channel_2, channel_3, channel_4, channel_5, channel_6;
volatile int transmitter_channel_1, transmitter_channel_2, transmitter_channel_3, transmitter_channel_4, transmitter_channel_5, transmitter_channel_6;
volatile unsigned long current_time, time_channel_1, time_channel_2, time_channel_3, time_channel_4, time_channel_5, time_channel_6;

void setup() {

pinMode(2, INPUT);
pinMode(6, INPUT);
pinMode(7, INPUT);
pinMode(8, INPUT);
pinMode(14, INPUT);
pinMode(20, INPUT);

while(!Serial);
Serial.begin(9600);

attachInterrupt(digitalPinToInterrupt(2), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(6), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(7), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(8), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(14), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(20), transmitter_signals, CHANGE);

}

void loop() {

Serial.println(transmitter_channel_1);
Serial.println(transmitter_channel_2);
Serial.println(transmitter_channel_3);
Serial.println(transmitter_channel_4);
Serial.println(transmitter_channel_5);
Serial.println(transmitter_channel_6);
delay(100);

}

void transmitter_signals(){

current_time = micros();

if(channel_1 == 0 && GPIOD_PDIR & (1<<0)){
channel_1 = 1;
time_channel_1 = current_time;
}
else if(channel_1 == 1){
channel_1 = 0;
transmitter_channel_1 = current_time - time_channel_1;
}

if(channel_2 == 0 && GPIOD_PDIR & (1<<1)){
channel_2 = 1;
time_channel_2 = current_time;
}
else if(channel_2 == 1){
channel_2 = 0;
transmitter_channel_2 = current_time - time_channel_2;
}

if(channel_3 == 0 && GPIOD_PDIR & (1<<2)){
channel_3 = 1;
time_channel_3 = current_time;
}
else if(channel_3 == 1){
channel_3 = 0;
transmitter_channel_3 = current_time - time_channel_3;
}

if(channel_4 == 0 && GPIOD_PDIR & (1<<3)){
channel_4 = 1;
time_channel_4 = current_time;
}
else if(channel_4 == 1){
channel_4 = 0;
transmitter_channel_4 = current_time - time_channel_4;
}

if(channel_5 == 0 && GPIOD_PDIR & (1<<4)){
channel_5 = 1;
time_channel_5 = current_time;
}
else if(channel_5 == 1){
channel_5 = 0;
transmitter_channel_5 = current_time - time_channel_5;
}

if(channel_6 == 0 && GPIOD_PDIR & (1<<5)){
channel_6 = 1;
time_channel_6 = current_time;
}
else if(channel_6 == 1){
channel_6 = 0;
transmitter_channel_6 = current_time - time_channel_6;
}
}


when i do compile i have this error

Arduino: 1.6.12 (Windows 7), TD: 1.31, Πλακέτα:"Teensy 3.6, Serial, 180 MHz, US English"

receiver_tennsy: In function 'void setup()':
receiver_tennsy:19: error: 'transmitter_signals' was not declared in this scope
receiver_tennsy: In function 'void loop()':
'transmitter_signals' was not declared in this scope

What is the problem?

WMXZ
10-27-2016, 10:55 AM
put a line


void transmitter_signals();
before setup()

I cannot see why print_signals is flagged as an error, it does not show up in your code. Are you sure you show all code or the right code?

thanos
10-27-2016, 11:03 AM
WMXZ is that what you mean?



volatile byte channel_1, channel_2, channel_3, channel_4, channel_5, channel_6;
volatile int transmitter_channel_1, transmitter_channel_2, transmitter_channel_3, transmitter_channel_4, transmitter_channel_5, transmitter_channel_6;
volatile unsigned long current_time, time_channel_1, time_channel_2, time_channel_3, time_channel_4, time_channel_5, time_channel_6;

void transmitter_signals();

void setup() {

pinMode(2, INPUT);
pinMode(6, INPUT);
pinMode(7, INPUT);
pinMode(8, INPUT);
pinMode(14, INPUT);
pinMode(20, INPUT);

while(!Serial);
Serial.begin(9600);

attachInterrupt(digitalPinToInterrupt(2), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(6), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(7), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(8), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(14), transmitter_signals, CHANGE);
attachInterrupt(digitalPinToInterrupt(20), transmitter_signals, CHANGE);

}

void loop() {

Serial.println(transmitter_channel_1);
Serial.println(transmitter_channel_2);
Serial.println(transmitter_channel_3);
Serial.println(transmitter_channel_4);
Serial.println(transmitter_channel_5);
Serial.println(transmitter_channel_6);
delay(100);

}

void transmitter_signals(){

current_time = micros();

if(channel_1 == 0 && GPIOD_PDIR & (1<<0)){
channel_1 = 1;
time_channel_1 = current_time;
}
else if(channel_1 == 1){
channel_1 = 0;
transmitter_channel_1 = current_time - time_channel_1;
}

if(channel_2 == 0 && GPIOD_PDIR & (1<<1)){
channel_2 = 1;
time_channel_2 = current_time;
}
else if(channel_2 == 1){
channel_2 = 0;
transmitter_channel_2 = current_time - time_channel_2;
}

if(channel_3 == 0 && GPIOD_PDIR & (1<<2)){
channel_3 = 1;
time_channel_3 = current_time;
}
else if(channel_3 == 1){
channel_3 = 0;
transmitter_channel_3 = current_time - time_channel_3;
}

if(channel_4 == 0 && GPIOD_PDIR & (1<<3)){
channel_4 = 1;
time_channel_4 = current_time;
}
else if(channel_4 == 1){
channel_4 = 0;
transmitter_channel_4 = current_time - time_channel_4;
}

if(channel_5 == 0 && GPIOD_PDIR & (1<<4)){
channel_5 = 1;
time_channel_5 = current_time;
}
else if(channel_5 == 1){
channel_5 = 0;
transmitter_channel_5 = current_time - time_channel_5;
}

if(channel_6 == 0 && GPIOD_PDIR & (1<<5)){
channel_6 = 1;
time_channel_6 = current_time;
}
else if(channel_6 == 1){
channel_6 = 0;
transmitter_channel_6 = current_time - time_channel_6;
}
}

Stendall
10-27-2016, 05:53 PM
The Adafruit_ST7735 still do not work well with audio shield.
Doesn't have the begin() function to call inside setup() after SPI pins remap.
The library setup the SPI pins in the constructor which is called when the object it's created (usually outside the loop()). But you cannot remap SPI pins outside setup() or loop()
If someone has the same problem (needs to use Paul's audio shield and ST7735 tft) you could try the sumotoy library.
https://github.com/sumotoy/TFT_ST7735/tree/1.0p1

Frank B
10-29-2016, 10:18 PM
Paul, the new stereo-DAC works great. Thank you.

kobe12345
10-31-2016, 08:12 AM
The upload process takes forever.... and didnt make it in the end.
Is there something wrong with the settings?
Im using arduino 1.6.12 & teensy Teensyduino 1.31 Beta 2

8683

defragster
10-31-2016, 08:33 AM
Settings are mostly ignored with Teensy as it has it's own loader. It has Help / Verbose window that may show errors/issues if you post that text.

The USB port ( try computer restart) or Teensy health might not be right - or the USB cable or connection?

kobe12345
10-31-2016, 12:01 PM
The problem seems fixed after I pressed on the button in the new T3.5 board and now the port8 shows up.
But its still taking a lot of time to upload sketch and I dont know why.

Frank B
10-31-2016, 11:26 PM
that's very unusal.
are you using a hub ?

PaulStoffregen
11-01-2016, 12:14 AM
But its still taking a lot of time to upload sketch and I dont know why.

Normally the uploading takes less than 1 second. Most computers take a few seconds to recognize the USB device change. Windows versions before 10 are slower in detecting USB devices, sometime adding 2 to 8 seconds delay after the upload, before Windows can communicate with the freshly programmed Teensy. But even then, the upload part should be quick.

In the Teensy Loader windows Help menu is Verbose Info. It opens a window with lots of diagnostic info. There's a Log menu with an option to save the info to a file, which you can attach to a message here (click "Go Advanced" to get the attach stuff). You can also copy and paste direct to a message (best to surround with code tags). Maybe there's useful info that can help us figure out what's going wrong?

Also, try the obvious... cold reboot, different USB cable, with or without USB hubs, disconnect other USB devices, temporarily disable anti-virus or Windows Defender to see if it makes any difference.

defragster
11-01-2016, 01:09 AM
After seeing the results from Paul's #35 steps.

If the behavior persists - do the "15 second button press reset" on the device and try again. I'm wondering if you are seeing what I saw where there was a ~6 second delay added before USB came online at one point that went away with this reset. (https://forum.pjrc.com/threads/34808-K66-Beta-Test?p=115391&viewfull=1#post115391)

Kenidowa
11-01-2016, 01:54 AM
any thoughts on how to install on a RPI3 using the ARM version?
Thanks,
Ken

PaulStoffregen
11-01-2016, 02:04 AM
any thoughts on how to install on a RPI3 using the ARM version?


Same as you'd install on 32 or 64 bit x86 Linux. Extract the Arduino tarball, and remember the pathname. Copy the udev rule. Then run the Teensyduino installer, select the location where you extracted.

kobe12345
11-01-2016, 05:21 AM
Normally the uploading takes less than 1 second....

The problem is fixed now! After I reinstall the software and stuff. Thanks everyone for the advice :)

Kenidowa
11-02-2016, 09:35 PM
ok that helped and I have it installed on my RPI3. Trying it with Arduino 1.6.12. So far I can compile but it doesn't seem to load. Need to work on that part. I am trying to see if I can use the RPI3 as my development platform as my WIN XP is slowly dying.