0

Electronic Animated Eyes using Teensy 3.1
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Electronic Animated Eyes using Teensy 3.1

by novice516 on Sat Jul 15, 2017 1:58 am

Capture.PNG
Capture.PNG (112.96 KiB) Viewed 196 times

novice516
 
Posts: 7
Joined: Wed Feb 01, 2012 11:58 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Sat Jul 15, 2017 2:21 am

novice516 wrote:I am using the "smallest code with LTO" and the default eye setting


Does the board take smaller sketches OK? Try the basic 'blink' sketch. Try something like one of the NeoPixel examples. Same error, or does the board receive the code OK?

ALSO: is this a Teensy 3.0 board or a later model? The eye code definitely won't fit on the 3.0...needs a 3.1 or later.

pburgess
 
Posts: 3819
Joined: Sun Oct 26, 2008 2:29 am

Re: Electronic Animated Eyes using Teensy 3.1

by novice516 on Sat Jul 15, 2017 5:18 pm

I am using the Teensy 3.2 and I did have the blink program working.

novice516
 
Posts: 7
Joined: Wed Feb 01, 2012 11:58 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Sun Jul 16, 2017 11:28 pm

Puzzling. What's the sketch size reported in the console when compiling? Should be the second to last line. For example, if I'm using the "Fastest with LTO" option with the default eye, I get:
Code: Select all | TOGGLE FULL SIZE
Sketch uses 186492 bytes (71%) of program storage space. Maximum is 262144 bytes.


I was able to produce a program that the compiler & linker were OK with but Teensyduino would refuse to upload as too large...but I had to take it right to the very edge of the board's capacity. Code is below if you'd like to try it...curious what the limit is of the "foo" array for you where it's able to compile but not upload. (This is a nonsense program that doesn't do anything, just takes up space to try and troubleshoot this weirdness.)

Code: Select all | TOGGLE FULL SIZE
#define BYTES128 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#define BYTES1K  BYTES128,BYTES128,BYTES128,BYTES128,BYTES128,BYTES128,BYTES128,BYTES128
#define BYTES8K  BYTES1K,BYTES1K,BYTES1K,BYTES1K,BYTES1K,BYTES1K,BYTES1K,BYTES1K
#define BYTES64K BYTES8K,BYTES8K,BYTES8K,BYTES8K,BYTES8K,BYTES8K,BYTES8K,BYTES8K

const uint32_t foo[] = {
  BYTES64K,BYTES64K,BYTES64K,
  BYTES8K,BYTES8K,BYTES8K,BYTES8K,BYTES8K,BYTES8K,
  BYTES1K,BYTES1K,
  BYTES128,BYTES128,BYTES128,BYTES128,BYTES128,BYTES128,BYTES128,
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};

void setup() {
}

void loop() {
  uint32_t i;
  Serial.println(foo[i++]);
}

pburgess
 
Posts: 3819
Joined: Sun Oct 26, 2008 2:29 am

Re: Electronic Animated Eyes using Teensy 3.1

by novice516 on Tue Jul 18, 2017 10:41 pm

I have not tried the new code you posted. It will likely be this weekend before I can get to it. Its odd because it looks like there is still available space, but i still get the "too large" error in teensy loader - image on left side. Thank you for all the help!
Attachments
Capture2.PNG
Capture2.PNG (102.81 KiB) Viewed 138 times

novice516
 
Posts: 7
Joined: Wed Feb 01, 2012 11:58 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Tue Jul 18, 2017 10:58 pm

You should get a pop-up alert when trying to upload the code, about the code being too big and will be truncated. Hit 'yes' and upload anyway. Should be fine.

What happens is that the Teensy loader doesn't know what board's attached until the first time something's uploaded. It'll figure it out and do the right thing during the upload.

pburgess
 
Posts: 3819
Joined: Sun Oct 26, 2008 2:29 am

Re: Electronic Animated Eyes using Teensy 3.1

by Snufkin52 on Wed Aug 02, 2017 4:47 pm

Hello.

May be someone can help me.

I need change Eyelids, when program is working.
I generate new_sclera matrix, add it to .h file,

I control Eyes by Serial port. What i will add, for change Eyelids matrix?

Snufkin52
 
Posts: 2
Joined: Tue Jul 11, 2017 7:42 pm

Re: Electronic Animated Eyes using Teensy 3.1

by novice516 on Thu Aug 03, 2017 5:09 pm

Phil,

I got the project working. Thank you for all the help! I must have damaged the TFT. I ordered a new one, installed it and everything worked as expected. For others with the same problem....I had an all white screen like the back light was working, but no image. The new screen fixed the issue.

Thanks again.

Tom

novice516
 
Posts: 7
Joined: Wed Feb 01, 2012 11:58 pm

Re: Electronic Animated Eyes using Teensy 3.1

by flightrisk on Mon Aug 07, 2017 8:45 am

What's the latest with using this with a Teensy vs. a Pi? Seems like most folks are using the Teensy, but the Pi article mentioned the faster processor and OpenGL could make a smoother eye motion and take advantage of anti-aliasing. Any helpful comments about choice of processor?

flightrisk
 
Posts: 19
Joined: Wed Jan 19, 2011 2:54 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Mon Aug 07, 2017 2:07 pm

I think most folks will be better served with the Teensy version for now. If you need a little more 'oomph' I'm told the code works OK on the Teensy 3.6.

There's a lot of potential with the Pi version but it's not fully realized yet. Antialiasing is there and looks amazing, and the 3D nature of it (rather than basically a 2D sprite) also improves things visually. Performance on the Pi Zero leaves a lot to be desired, but might improve with some optimization that just hasn't happened yet...so a Pi 2 or 3 is recommended but the size might be impractical for some projects like costumes. It's kind of a bleeding-edge thing that depends on one's willingness to get in there and really mess with the code.

pburgess
 
Posts: 3819
Joined: Sun Oct 26, 2008 2:29 am

Re: Electronic Animated Eyes using Teensy 3.1

by flightrisk on Wed Aug 16, 2017 9:55 am

Did anyone make a kit to sell of any of the parts or perhaps want to group buy? The cabachon place wants to charge almost $12 to ship $5 worth (2) of plastic domes. I would love to buy the cabachons and cases ready to assemble myself. Can anyone help? Otherwise, I need suggestions for cabachons that are the same half sphere design (most seem to be much flatter) and an idea for how to find someone (or a service) that will inexpensively make the 4 plastic parts for 2 OLED/Cabachon cases.

flightrisk
 
Posts: 19
Joined: Wed Jan 19, 2011 2:54 pm

Re: Electronic Animated Eyes using Teensy 3.1

by flightrisk on Wed Aug 16, 2017 10:42 am

Can anyone verify if this will work with a Teensy 3.5? I imagine on that or the 3.6, the processor speed and extra memory would mean you aren't running up against the limits of the device, especially for things like the dragon eyes. Correct?

flightrisk
 
Posts: 19
Joined: Wed Jan 19, 2011 2:54 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Wed Aug 16, 2017 1:20 pm

I've heard from others that it does work on the Teensy 3.5 & 3.6. Have not had time to wire one up myself, but I can confirm at least that the code compiled without complaints, so that's a promising start.

pburgess
 
Posts: 3819
Joined: Sun Oct 26, 2008 2:29 am

Please be positive and constructive with your questions and comments.