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 Gid3on on Thu Jul 21, 2016 11:43 pm

Thank you so much for posting more detailed information. I followed the instructions and it keeps giving me the "Image size must match iris size". The original dragon iris shows as 512x80 @ 71.2KB while my new iris (which was a simple color conversion like you stated) is 512x80 but 71.6KB. Is this the problem? Sorry, I did as much trouble shooting as I could.

Gid3on
 
Posts: 39
Joined: Wed Jul 29, 2015 3:56 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Fri Jul 22, 2016 12:40 am

Code: Select all | TOGGLE FULL SIZE
file pupilMap.png

Should respond:
Code: Select all | TOGGLE FULL SIZE
PNG image data, 160 x 160, 8-bit grayscale, non-interlaced

If it doesn't, you're using the wrong pupilMap image. Copy it out of the 'dragon' directory:
Code: Select all | TOGGLE FULL SIZE
cp dragonEye/dragonPupilMap.png pupilMap.png

Verify with the 'file' command. If it's not 160x160, some image file's been misplaced or overwritten or something. Download a fresh one from Github.
You should only need to alter the dragonEye/iris.png image.

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

Re: Electronic Animated Eyes using Teensy 3.1

by Gid3on on Fri Jul 22, 2016 1:51 pm

I pulled down all new files and copied over the myiris.png that I created yesterday. I'm running windows so that "file" command isn't available to me. Attached at the file properties for the pupilmap.png and myiris.pgn files. They look fine to me, but I'm still receiving that same error. I've also attached the myiris.png file just in case. I've done this before using the default eye to create an Owl eye, and it worked perfectly.

myiris.JPG
myiris file properties
myiris.JPG (42.47 KiB) Viewed 344 times


pupilmap.JPG
pupilmap properties
pupilmap.JPG (41.03 KiB) Viewed 344 times


myIris.png
myIris file
myIris.png (71.66 KiB) Viewed 344 times

Gid3on
 
Posts: 39
Joined: Wed Jul 29, 2015 3:56 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Fri Jul 22, 2016 2:29 pm

My bad. Try "-160" instead of "-80" and I think it'll work. Got my diameter & radius stuff mixed up.

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

Re: Electronic Animated Eyes using Teensy 3.1

by Gid3on on Fri Jul 22, 2016 2:54 pm

DONE! Perfect, that worked. I did trying changing that value myself before but I never increased it up to -160. This is an awesome project you did, it works so well and looks absolutely amazing. This is the second time I'm using this in top hat project of mine, love it! Thanks again!

Cat Eyes.JPG
Cat Eyes.JPG (61.33 KiB) Viewed 341 times

Gid3on
 
Posts: 39
Joined: Wed Jul 29, 2015 3:56 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Fri Jul 22, 2016 5:01 pm

Yay creatures!

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

Re: Electronic Animated Eyes using Teensy 3.1

by mr_koz on Sun Jul 24, 2016 9:00 am

Fyi I got all 4 eyes working! Your advice worked perfectly. I haven't tried to rotate the eyes but thats my next step - I'll also be playing with using smaller images and swapping them in and out :)

Thank you for all your help pburgess !!

https://vimeo.com/176024577

mr_koz
 
Posts: 5
Joined: Thu Sep 24, 2015 10:00 am

Re: Electronic Animated Eyes using Teensy 3.1

by Gid3on on Fri Aug 19, 2016 5:52 pm

Just a suggestion for the 3D printed enclosures for the TFT version of these eyes. The front side of the enclosure has the hexagonal divots which is used to hold the nut in place while securing the bolt. I use the bolts to attach the eye to whatever backing I'm using so I purchase some bolts that are longer so they will go through these enclosures plus the backing. I secure the enclosures with a nut then put another nut on the other side of the backing. This makes for a very strong connection. If I were to use the enclosure according to how its designed, the bolts would come out the front side where the eyeball is. This wouldn't work obviously. I've included a picture for clarity.

Interestingly, I used the OLED version before and the nut holder was in the backside of the enclosure which is perfect.

TIM
Attachments
eye.JPG
eye.JPG (30 KiB) Viewed 289 times

Gid3on
 
Posts: 39
Joined: Wed Jul 29, 2015 3:56 am

Re: Electronic Animated Eyes using Teensy 3.1

by VukRayet on Wed Sep 14, 2016 2:43 am

HI! Im very new to arduino and I'm thinking of using this eyes for a dog project that I'm working on but I'm having an error with the code which states 'INITR_144GREENTAB' was not declared in this scope. Anyone can help? Thank you :D

VukRayet
 
Posts: 8
Joined: Wed Sep 14, 2016 2:40 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Wed Sep 14, 2016 2:52 am

In addition to enabling or commenting one of the two #includes near the top of the code (Adafruit_SSD1351.h or Adafruit_ST7735.h), you'll need to install the corresponding Arduino library. This can be done in the Arduino Library Manager. Sketch->Include Library->Manage Libraries... search for "1351" or "7735", hit the install button, then try compiling again.

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

Re: Electronic Animated Eyes using Teensy 3.1

by michaelmeissner on Wed Sep 14, 2016 7:44 am

Note, the Teensy version of Adafruit_ST7735.h does not have the recent changes that Adafruit has made incorporated. The answer is when you are installing Teensydunio, to not install the Adafruit_ST7735 library, but instead download the version from Adafruit. I don't know if there are Teensy specific optimizations that you would be missing by using the Adafruit version.

I did report this to PJRC.COM in the beta testing of the last Teensyduino, but Teensy's creator was/is rather busy with releasing Teensy 3.5/3.6 via beta testing and kickstarter, so it may be on the back burner. My report was message #11 in this thread: https://forum.pjrc.com/threads/36165-Teensyduino-1-30-Beta-3-Available

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

Re: Electronic Animated Eyes using Teensy 3.1

by VukRayet on Thu Sep 15, 2016 1:56 am

I added the zip library from this link https://github.com/adafruit/Adafruit-ST7735-Library but i'm still getting the same compiling error ): Plus would this library work on any TFT? I'm not using adafruits one but arduino's TFT. Thanks for your help!

VukRayet
 
Posts: 8
Joined: Wed Sep 14, 2016 2:40 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Thu Sep 15, 2016 2:26 am

If using a recent version of the Arduino IDE, you can use the Library Manager (instead of manually downloading from Git) to install the ST7735 library. Sketch->Include Library->Manage Libraries...

Search for "ST7735" and then click "Install."

If it's a 128x128 pixel TFT display, I'm pretty sure that one is compatible. The wiring might be a little different, but the code should work the same I think.

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

Re: Electronic Animated Eyes using Teensy 3.1

by VukRayet on Thu Sep 15, 2016 2:49 am

Actually, thinking about it, since my tft is in the wrong dimensions already I shall get an OLED instead. Im pretty sure this is compatible right? https://www.adafruit.com/products/1431 (just checking in case I end up buying the wrong one). Thanks!

VukRayet
 
Posts: 8
Joined: Wed Sep 14, 2016 2:40 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Thu Sep 15, 2016 2:52 am

That's the one, yes!

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

Please be positive and constructive with your questions and comments.