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 pburgess on Fri Jun 09, 2017 12:08 am

Wiring looks good and I still haven't been able to reproduce the issue nor see any likely culprit.

To confirm some assumptions:
  • You've run the normal SSD1351 'test' example (with dc/cs/rst pins adjusted to match wiring) and this works?
  • You did NOT install the Adafruit_GFX or Adafruit_SSD1531 libraries offered by the Teensyduino installer? Use the Arduino Library Manager instead or fetch the code from Github. The Teensyduino versions may break something. Remove them if that's what you installed.
  • You're running the plain vanilla Uncanny Eyes sketch linked to in the guide, not anyone's custom variant just yet, correct?
  • Using the default human eye?
  • Teensy speed set at 72 MHz?

If it's not any of that, please elaborate on your system setup: OS, IDE version, etc. (e.g. Windows 10, Arduino IDE 1.8.2, Teensyduino 1.35 installer)

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

Re: Electronic Animated Eyes using Teensy 3.1

by TheElectronicWosky on Sun Jun 11, 2017 10:32 pm

Now everything is working fine, I set the teensy to 16MHz, and works perfectly.
tho, now the teensy doesn't appear on ports, and I need to use an FTDI board to upload the code, any ideas why this happened?
anyways, thanks for all the help you gave me.

TheElectronicWosky
 
Posts: 6
Joined: Sat Jun 03, 2017 1:14 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Sun Jun 11, 2017 11:29 pm

When running the Teensy board below 24 MHz, it's normal for there to be no serial port (since it can't handle USB timing at these lower speeds). It's not necessary to pick a port when uploading to this board over USB; the Teensy Loader application and bootloader kind of do their own thing. Port's only needed if using Serial.print().

With the OLED displays, you can run the Teensy board up to 72 MHz (and have USB serial if you need it).

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

Re: Electronic Animated Eyes using Teensy 3.1

by TheElectronicWosky on Mon Jun 12, 2017 12:03 am

oh, okay.
I tried to use 72mhz but sadly, it doesn't work.

TheElectronicWosky
 
Posts: 6
Joined: Sat Jun 03, 2017 1:14 am

Re: Electronic Animated Eyes using Teensy 3.1

by michaelmeissner on Wed Jun 14, 2017 8:19 am

As I said earlier, I could only get the Adafruit displays to run at 24Mhz (which is the slowest speed where USB serial will still work). I could not get them to work at 48Mhz. And a different brand of the OLED displays (newhaven), I could run at 48Mhz, but not 72Mhz.

So, I suspect sample variation, and you just have to test the display to see what works for you. It may be the 24Mhz was a particular run of the displays, and another batch might be slower or faster.

michaelmeissner
 
Posts: 1311
Joined: Wed Aug 29, 2012 12:40 am

Re: Electronic Animated Eyes using Teensy 3.1

by alan_hansen on Mon Jun 19, 2017 7:59 pm

If the displays are freezing or displaying garbage, then edit the SPI clock speed, highly dependent on cable length.

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

Try values from 15000000 to 20000000

I have a Teensy 3.2 running 120MHz overclocked

And not all 5V power supplies are equal, solder a 100uF 6V on Teensy 5V buss

alan_hansen
 
Posts: 1
Joined: Mon Jun 19, 2017 7:47 pm

Re: Electronic Animated Eyes using Teensy 3.1

by TheElectronicWosky on Fri Jun 23, 2017 8:49 pm

So I'm trying to upload the dragon eye example, and it gives this error

dragonEye.h:15637: error: narrowing conversion of '-1' from 'int' to 'uint16_t {aka short unsigned int}' inside { } [-Wnarrowing]
0X007F, 0X007F, 0X007F, 0X007F, 0X007F, 0X007F, 0X007F, 0X007F, };

^

TheElectronicWosky
 
Posts: 6
Joined: Sat Jun 03, 2017 1:14 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Fri Jun 23, 2017 8:54 pm

If you plan to use the dragon eyes (or any of the non-default, non-human eyes), you should install the Arduino IDE version 1.8.1 and then run the Teensyduino 1.35 installer atop this. This is a temporary situation due to a bug in the latest Teensy compiler preventing arrays over 32K…guide will be updated when this is fixed. If you want the latest IDE for other projects, it’s valid and possible to have multiple Arduino IDE installs on your system, just need to give each a unique name.


IDE 1.8.1 can be downloaded here: https://www.arduino.cc/en/Main/OldSoftw ... s#previous
And Teensyduino 1.35 here: https://forum.pjrc.com/threads/41493-Te ... -35-Beta-2

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

Re: Electronic Animated Eyes using Teensy 3.1

by TheElectronicWosky on Tue Jun 27, 2017 9:47 pm

I'm such a dummy sometimes (ok fine, most of the times). Thank you guys so much for being so nice nwn.

last question (I hope so), I'm trying to do a Dragon/demon-like eyes, and I successfully changed the iris color, but I fail at the pupil.

So, I noticed that the dragon and g0at (banned word, why tho?) eyes have a pupil map, where it is supposed to go? I tried both of this options but none of them worked for me.

a) python tablegen.py DragonEye/sclera.png DragonEye/iris.png DragonEye/upper.png DragonEye/lower.png DragonEye/PupilMap 160 > DragonEye.h

b) python tablegen.py DragonEye/sclera.png DragonEye/iris.png DragonEye/upper.png DragonEye/lower.png 160 DragonEye/PupilMap > DragonEye.h

c) Add your reply here.

Again, thanks a lot.

TheElectronicWosky
 
Posts: 6
Joined: Sat Jun 03, 2017 1:14 am

Please be positive and constructive with your questions and comments.