K66 Beta Test

Status
Not open for further replies.
Actually I wish I could combine a few of the kickstarter rewards.

Please post this as a comment on the Kickstarter. :)

I believe we can add more reward options, so just ask. Robin will review all the feedback in a day or two and decide what to add. Obviously keeping the list short will let us ship everyone's quickly, but adding a few more probably wouldn't hurt.
 
Paul, (and others)

Was wondering, would you like us to continue to have most of the Teensy 3.5/3.6 Beta/Kickstarter conversation still in this thread or start new threads for different things.

Example:
I started making a set of Diptrace components and patterns, depending on which sets of pins I may want to use for a project. I want to make quick and dirty breakout board to start off with. The pattern for that board I think will look like:
T36pattern.jpg

I have some other basic questions, like the 5 pin connector for USB host, one pin is labeled +5v. Is it +5v or is it the same as VUSB? Likewise what is DD/DC/DE/G (assume GND on last pin)

EDIT: From Kickstarter: DE - Debug enable (internal pulled high), DC/DD are Debug command and Data... So hopefully we will have easy support for hardware debugging!

But more of an Interesting question I have is suppose I wish to setup a component to be used by either a T3.5(or6) or a T3.2, what strategy to take to allow either board to work. Probably the easiest guess is to constrain the pattern to mainly only use the pins that are on the front of the product cards.

But if I wish to use more pins, it looks like you can add in the 5 pins of T3.2(VBAT/3.3v, GND, Program, A14 DAC). As it looks like these will not interfere with placements of pads on bottom of T3.6.

But not sure about how many of the 14 pin surface found connector of T3.2, would be safe to install. If I am looking at layout properly and positions of pins, I believe I have (T32-T3.6) pins like:
(A12-GND, GND-DE, 24-DC, 25-DD, 26, 27, 28) last three don't have pads on T3.6
(A13-57, 3.3v-56, 33-55, 32-54, 31, 30, 29) Again last three...

The above is more of a long term question, but I can see myself maybe wanting to setup a board that can use either depending on what resources I wish to use.

Also congrats on the great start to kickstarter!
 
Last edited:
Damn, just deleted my message instead of editing.
@Paul, are both boards the same on the bottom side?

I need to clean up my Eagle footprint and I will post it today if possible.
 
As part of using this working on a graphical artificial horizon mapping a sphere. For those playing with beta units who have a display handy the 'renderer' for a wireframe ball looks like
Code:
int stepsize =30;
...

...just edited it to the ILI, edited the trig-functions to use floats and edited the constants to make it look a bit better.
looks good :)

Code:
#include "SPI.h"
#include "ILI9341_t3.h"

// For optimized ILI9341_t3 library
//!!!! EDIT THIS !!!!!!!!!!!
#define TFT_DC      15
#define TFT_CS      10
#define TFT_RST    255  // 255 = unused, connect to 3.3V
#define TFT_MOSI    11
#define TFT_SCLK    13
#define TFT_MISO    12

ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCLK, TFT_MISO);

const int stepsize = 20;
const int scale = 80;
const int center = 120;
float pitch = 30;
float roll = 0;
float heading = 0;

float zpoint(float longditude, float latitude) //returns depth information, used to mask rear of sphere
{
  return 1 * cosf(longditude + heading ) *  fabsf(cosf(latitude)) * cosf(pitch) + sinf(pitch) * -sinf(latitude);
}

float xpoint(float longditude, float latitude) //get x values from lat/long/heading
{
  return scale * sinf(longditude + heading) * cosf(latitude);
}

float ypoint(float longditude, float latitude) //get y value from lat/long/heading and pitch
{
  return scale * cosf(longditude + heading ) * sinf(pitch) * cosf(latitude) + scale * sinf(latitude) * cosf(pitch);
}


void placeLine(float startLong, float startLat, float endLong, float endLat)
{ //applies roll to final co-ordinates via vector conversion
  if (zpoint(startLong, startLat) > 0 && zpoint(endLong, endLat) > 0) {
    
    float startDistanceFromCenter = sqrtf(sq(xpoint(startLong, startLat)) + sq(ypoint(startLong, startLat)));
    float endDistanceFromCenter = sqrtf(sq(xpoint(endLong, endLat)) + sq(ypoint(endLong, endLat)));
    
    float startAngle = atan2f(ypoint(startLong, startLat), xpoint(startLong, startLat));
    float endAngle = atan2f(ypoint(endLong, endLat), xpoint(endLong, endLat));
    int rotatedXStart = center + floorf(startDistanceFromCenter * cosf(roll + startAngle ));
    int rotatedYStart = center + floorf(startDistanceFromCenter * sinf(roll + startAngle ));
    int rotatedXEnd = center + floorf(endDistanceFromCenter * cosf(roll + endAngle));
    int rotatedYEnd = center + floorf(endDistanceFromCenter * sinf(roll + endAngle));
    tft.drawLine(rotatedXStart, rotatedYStart, rotatedXEnd, rotatedYEnd, ILI9341_BLACK);
  }
}

void drawBall(float pitchIn, float headingIn, float rollIn) //produces geometry
{
  pitch = pitchIn;
  heading = headingIn;
  roll = rollIn;
  for (int i = 0; i < floor(360 / stepsize); i++) {
    float angle = float(i * stepsize) / 180 * PI;
    int meridiansize = floor(90 / stepsize);
    for (int l = -meridiansize; l < meridiansize + 1; l++) {
      float currantLat = float(l) * stepsize / 180 * PI;
      placeLine(angle, currantLat, angle + PI / 180 * stepsize, currantLat);
      placeLine(angle, currantLat, angle, currantLat + PI / 180 * stepsize);
    }
  }
}

void loop()
{

  tft.fillRect(center - scale, center - scale, center + scale, center + scale, ILI9341_BLUE);
  float m = millis();
  drawBall(sinf(m / 4000), m / 2000, sinf(m / 2000) / 2);
}

void setup() {
  SPI.begin();
  tft.begin();
  tft.fillScreen(ILI9341_BLUE);
  delay(1000);
  Serial.print(F_BUS);
}

Edit:
You can try to set
Code:
#define SPICLOCK 72000000
in ILI9341_t3.cpp

and
Code:
teensy36.menu.speed.240opt.build.fcpu=240000000 -DF_BUS=120000000
in boards.txt.

Its a good test of you want to know if your 3.6 and your display-board can work with these speeds :)
(however, the SPI will run @60MHz , not 72MHz for 240MHZ F_CPU - but you can try this @ 144MHz F_CPU)

Edit: missed abs and floor.. edited abs to fabsf and floor to floorf
 
Last edited:
...just edited it to the ILI,
less flickering:
Code:
#include "SPI.h"
#include "ILI9341_t3.h"

// For optimized ILI9341_t3 library
//!!!! EDIT THIS !!!!!!!!!!!
#define TFT_DC      15
#define TFT_CS      10
#define TFT_RST    255  // 255 = unused, connect to 3.3V
#define TFT_MOSI    11
#define TFT_SCLK    13
#define TFT_MISO    12

ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCLK, TFT_MISO);

const int stepsize = 15;
const int scale = 80;
const int center = 120;
float pitch = 30;
float roll = 0;
float heading = 0;

float zpoint(float longditude, float latitude) //returns depth information, used to mask rear of sphere
{
  return 1 * cosf(longditude + heading ) *  fabsf(cosf(latitude)) * cosf(pitch) + sinf(pitch) * -sinf(latitude);
}

float xpoint(float longditude, float latitude) //get x values from lat/long/heading
{
  return scale * sinf(longditude + heading) * cosf(latitude);
}

float ypoint(float longditude, float latitude) //get y value from lat/long/heading and pitch
{
  return scale * cosf(longditude + heading ) * sinf(pitch) * cosf(latitude) + scale * sinf(latitude) * cosf(pitch);
}


void placeLine(float startLong, float startLat, float endLong, float endLat, uint16_t color)
{ //applies roll to final co-ordinates via vector conversion
  if (zpoint(startLong, startLat) > 0 && zpoint(endLong, endLat) > 0) {

    float startDistanceFromCenter = sqrtf(sq(xpoint(startLong, startLat)) + sq(ypoint(startLong, startLat)));
    float endDistanceFromCenter = sqrtf(sq(xpoint(endLong, endLat)) + sq(ypoint(endLong, endLat)));

    float startAngle = atan2f(ypoint(startLong, startLat), xpoint(startLong, startLat));
    float endAngle = atan2f(ypoint(endLong, endLat), xpoint(endLong, endLat));
    int rotatedXStart = center + floorf(startDistanceFromCenter * cosf(roll + startAngle ));
    int rotatedYStart = center + floorf(startDistanceFromCenter * sinf(roll + startAngle ));
    int rotatedXEnd = center + floorf(endDistanceFromCenter * cosf(roll + endAngle));
    int rotatedYEnd = center + floorf(endDistanceFromCenter * sinf(roll + endAngle));
    tft.drawLine(rotatedXStart, rotatedYStart, rotatedXEnd, rotatedYEnd, color);
  }
}

void drawBall(float pitchIn, float headingIn, float rollIn) //produces geometry
{
  static float oldPitch, oldHeading, oldRoll;

  if (oldPitch != pitchIn || oldHeading != headingIn || oldRoll != rollIn) {

    for (int i = 0; i < floor(360 / stepsize); i++) {
      float angle = float(i * stepsize) / 180 * PI;
      int meridiansize = floor(90 / stepsize);

      for (int l = -meridiansize; l < meridiansize + 1; l++) {

        pitch = oldPitch;
        heading = oldHeading;
        roll = oldRoll;

        float currantLat = float(l) * stepsize / 180 * PI;
        placeLine(angle, currantLat, angle + PI / 180 * stepsize, currantLat, ILI9341_BLUE);
        placeLine(angle, currantLat, angle, currantLat + PI / 180 * stepsize, ILI9341_BLUE);

        pitch = pitchIn;
        heading = headingIn;
        roll = rollIn;

        placeLine(angle, currantLat, angle + PI / 180 * stepsize, currantLat, ILI9341_BLACK);
        placeLine(angle, currantLat, angle, currantLat + PI / 180 * stepsize, ILI9341_BLACK);
      }
    }

    oldPitch = pitchIn;
    oldHeading = headingIn;
    oldRoll = rollIn;
  }
}

void loop()
{
  float m = millis();
  drawBall(sinf(m / 4000), m / 2000, sinf(m / 2000) / 2);
}

void setup() {
  SPI.begin();
  tft.begin();
  tft.fillScreen(ILI9341_BLUE);
  delay(1000);
  Serial.print(F_BUS);
}
..last variant for today ;-)
 
Last edited:
Looking at KS:

Features specific to Teensy 3.5:
> does not show # Touch Sensing Inputs

Features specific to Teensy 3.6:
> 11 Touch Sensing Inputs

While waiting for some spec runs to finish, I downloaded the two manuals. The 3.6 does have touch sensing capability, and the 3.5 does not. So if you use touchRead, you don't want the Teensy 3.5. If you need 5v tolerance and touch reading, you need to stick with the Teensy 3.2.

Now, the KS campaign only lists ethernet for the 3.6, but both chips do support ethernet. I didn't bother checking the details however.

As a separate note, I do hope Paul, Robin, Erin and any other employees of PJRC will take some time off to recharge their batteries. Well done folks!.
 
Last edited:
Yes there are some differences between the two boards. If I remember correctly when I was looking over the stuff to update my Excel document, which I see I forgot to update the Board names, which I just did local.

There are some other differences like T3.5 has one less I2C buss. Does not have the TPM timer, and as mentioned does not have the touch inputs.

But I can see setting up boards to use them or T3.2. Especially for some quick knock it out boards, where it is a lot easier to get some IO pins without using the bottom pins.
 
Back to playing:

Was wondering about the USB Serial number problem when CPU Speed > 120mhz (HSRUN mode).

if it would be possible to maybe call off to usb_init_serialnumber before the code in Resethandler turns on the HSRUN mode? Again I am probably missing something obvious like others things need to be init before then, but was just sort of wondering... (Wonder if it would hurt to simply try adding the call and see if I see smoke)

Kurt
 
Thanks Frank B for fixing up my code! Knew the calls were in this thread but but hadn't found them before it was time to call it a night. Woke up in the morning and it's there with a bow on.
 
*Applies dunce cap*
Well, I forgot to backup my library to the cloud so the T3.6 footprint I made is stuck on my main pc until I get home Saturday.
My Kicad library auto-backs up on my cloud but I never setup Eagle :/

edit...
I did however bring my credit card :)
*puts on pledge badge*
 
Last edited:
... If you need 5v tolerance and touch reading, you need to stick with the Teensy 3.2.

Now, the KS campaign only lists ethernet for the 3.6, but both chips do support ethernet. I didn't bother checking the details however.

As a separate note, I do hope Paul, Robin, Erin and any other employees of PJRC will take some time off to recharge their batteries. Well done folks!.

Interesting note about Touch - I thought maybe it was a typo/omission.

This is what I saw about Ethernet:
Features common to both:
...
•Ethernet mac, capable of full 100 Mbit/sec speed
 
Back to playing:

Was wondering about the USB Serial number problem when CPU Speed > 120mhz (HSRUN mode).

if it would be possible to maybe call off to usb_init_serialnumber before the code in Resethandler turns on the HSRUN mode? Again I am probably missing something obvious like others things need to be init before then, but was just sort of wondering... (Wonder if it would hurt to simply try adding the call and see if I see smoke)

Kurt
I did a quick try out of this and I think it might work. I pushed up the change to a new branch Read-USB-Serial-before-HSRUN of my fork(kurte) on github.

I tried building at 96, 120, 180 mhz and it appears to still be able to get a serial number. Again don't know for sure if there are other issues by doing this. But did issue a PR in case you wish to take a look.
 
Interesting note about Touch - I thought maybe it was a typo/omission.

This is what I saw about Ethernet:

I was mixing up Ethernet with the 2nd USB port. The Teensy 3.5 only has a USB Full Speed (12 Mbit/sec) port for the 5 inner USB pins, while the Teensy 3.6 has a USB High Speed (480 Mbit/sec) port. Both USB's are OTG (on-the-go), which allows the Teensy to eventually control other USB devices (like read flash memory cards). I believe the micro USB plug is device only.
 
Sorry that I say that but the hole line in front of the SD-Card-Slot looks like an predetermined breaking point, hope it's stable enough. Thinking about it, if I cut the Card-Slot of would I lose more than the Slot and the Pins?
 
As I mentioned earlier, starting to hack up a Test board for myself for T35 or T36, with most every pin connected plus some power...

T363D-Start.jpg

Still have to finish routing it. Right now has stuff for AX servos, although not stuff to turn power on/off... Also need to play more with 3d parts.

Also deciding on how much power choices I want to give pins. Currently bottom row has +5v and Top as 3.3v. May want to to allow one where I can pass VIN to the pins or not...

But for now just playing. Maybe in the next day or so, can order some from OshPark or digistump.
 
Looks great.
Yes, i have some ideas for boards, too..
We need a display+audio board :)
And perhaps something like my cheap connector-board. Perhaps with pins on the side, as second row.

Does anybody know a ILI9341 with 8-BIT parallel connection ?
 
Looking good Kurt! I was hoping you would try a new breakoutboard 😊. I assume you dropped the XBEE sockets due to space? No speaker either?
 
Hi Kåre and Frank,

I sort of started off this board with the idea of exposing most every pin I can, with as simple of layout as possible.

Plus have lots of power/ground pins. Plus I liked the idea of doing AX Servos, but decided not to add circuit that turned power on and off to them, Could add back. I also wondered if I would try adding ability to maybe be able to have Many VS pins instead of +5v/3.3v pins as to try to use as servo controller...

Sound, Leds and the like. I would like to have, but wonder if to start off with assuming either add Sound shield or prop shield to add some of these capabilities.

I have not done to many boards with an XBee for awhile. Later I was doing ones with Arduino headers and then using Arduino shield for XBee...
When I use Teensy as main processor for Hexapod I mostly used XBees and will try one of these out. But when this is secondary to Linux board then may not need. Also wondering about building controller board to use one of the cheaper RF radios and maybe add one to remote control as well. May build my on Arbotix Commander board. This may remove some of the delay issues we have seen with XBees going bidirectional. Could potentially use two...

Again not sure how much to put on first board for me to be able try out all of the capabilities of these new boards.

Suggestions?
 
less flickering: ..last variant for today ;-)

Finally got to power up a display and it works with the ILI code from Frank! Unless I push my finger near the wires then the screen goes blank - silly wires.

Sometimes I see trailing dots from intersect points? But it rotates nicely and smoothly from 27 to 35 fps { 240MHz w/F_BUS 120M }

<edit> next post has solution - ...

Oddly it runs fine then this repeated twice second #386 both times (when printed once per second):
>> ... 30 29 31 32 33 34 26 21 19 17 16 15 14 14 13 13 12 12 12 11 11 11 11

I abbreviate the output and smoothed it 10::1 and get this where left number is count of 10 sec groups - right # is group avg FPS:
120000000
1 fps=30
2 fps=29
3 fps=31
4 fps=30
5 fps=29
...
38 fps=30
39 fps=29
40 fps=14
41 fps=10
...
46 fps=10

Put this code in for loop()::
Code:
elapsedMillis fpstest;
uint16_t  fpscnt = 0;
uint16_t  testcnt = 0;
void loop()
{
  float m = millis();
  drawBall(sinf(m / 4000), m / 2000, sinf(m / 2000) / 2);
  fpscnt++;
  if ( fpstest > 10000 ) {
    testcnt++;
    Serial.print(testcnt);
    Serial.print(" fps=");
    Serial.println(fpscnt/10);
    fpscnt = 0;
    fpstest = 0;
  }
}
 
Last edited:
As is often the case - you can fix things in Teensy Land with an elapsedMillis.

millis() over 386 seconds busts this math?
float m = testmillis;
drawBall(sinf(m / 4000), m / 2000, sinf(m / 2000) / 2);

Code:
elapsedMillis fpstest;
[B]elapsedMillis testmillis;[/B]
uint16_t  fpscnt = 0;
uint16_t  testcnt = 0;
void loop()
{
 [B] float m = testmillis;[/B]
  drawBall(sinf(m / 4000), m / 2000, sinf(m / 2000) / 2);
  fpscnt++;
  if ( fpstest > 10000 ) {
    testcnt++;
    if ( testcnt > 30 && fpscnt < 200) {
      testcnt = 0;
      [B]testmillis = 0;[/B]
    }
    Serial.print(testcnt);
    Serial.print(" fps=");
    Serial.println(fpscnt / 10);
    fpscnt = 0;
    fpstest = 0;
  }
}
 
Status
Not open for further replies.
Back
Top