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 Wed Oct 14, 2015 9:09 pm

Here's the relevant bits:
Code: Select all | TOGGLE FULL SIZE
Multiple libraries were found for "Adafruit_ST7735.h"
Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Adafruit_ST7735
Not used: C:\Users\Ian\Documents\Arduino\libraries\Adafruit_ST7735_Library

Two ST7735 libraries are present, one installed 'manually', the other by the Teensyduino installer. The latter appears to be a bit out of date. No problem, just quit the IDE, remove that version of the library (just delete the folder) and restart the IDE, try compiling again.

Delete this folder:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Adafruit_ST7735

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

Re: Electronic Animated Eyes using Teensy 3.1

by Yardracer on Wed Oct 14, 2015 9:35 pm

I wondered about that. Deleted that file, and it works now! Thank you so much!

Yardracer
 
Posts: 5
Joined: Wed Oct 14, 2015 7:27 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Wed Oct 14, 2015 10:52 pm

Yay!

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

Re: Electronic Animated Eyes using Teensy 3.1

by chuckvideo on Wed Oct 21, 2015 2:12 am

I'm watching this forum as well, as I'm getting the exact same error codes, minus the duplicate file locations when I run "uncanny eyes" (also Arduino 1.6.5, but running on a Mac OS X 10.11)
Here are my error codes:
Arduino: 1.6.5 (Mac OS X), TD: 1.25, Board: "Teensy 3.2 / 3.1, Serial, 72 MHz optimized, US English"

uncannyEyes.ino:460:17: warning: extra tokens at end of #ifdef directive [enabled by default]
uncannyEyes.ino: In function 'void setup()':
uncannyEyes:105: error: 'INITR_144GREENTAB' was not declared in this scope
uncannyEyes.ino: In function 'void frame(uint16_t)':
uncannyEyes.ino:327:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
uncannyEyes.ino:404:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
'INITR_144GREENTAB' was not declared in this scope

chuckvideo
 
Posts: 20
Joined: Wed Mar 03, 2010 8:25 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Wed Oct 21, 2015 2:19 am

Looks like either the ST7735 library isn't installed (use the Library Manager in the IDE), or isn't being included in the code (this switch must be made manually).

By default the OLED library is included, TFT lib is disabled:
Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_SSD1351.h>  // OLED display library -OR-
//#include <Adafruit_ST7735.h> // TFT display library (enable one only)

Comment out the opposite line to enable TFT support:
Code: Select all | TOGGLE FULL SIZE
//#include <Adafruit_SSD1351.h>  // OLED display library -OR-
#include <Adafruit_ST7735.h> // TFT display library (enable one only)

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

Re: Electronic Animated Eyes using Teensy 3.1

by chuckvideo on Wed Oct 21, 2015 2:24 pm

That was it! I had reloaded the Arduino app, (version 1.6.5) but I had forgotten to reload the TFT library for the St7735 display. And now it works, thank you so much!
And as the previous poster had mentioned, I'm also getting the errors that I have "multiple libraries found for Adafruit_ST7735.h", one in my Arduino Libraries folder where it should be, as well as one in "Applications/Arduino 1.6.5 app/Contents/Java/hardware/teensy/avr/Libraries/Adafruit_ST7735" but for the life of me I can't find this second copy of the ST7735.h library. I'd love to get rid of this second copy, but it appears to be compiling and running just fine with it somewhere my hard drive. Thanks again for the help on this, I can't wait to install my Eyes into something this Halloween.
Attachments
Screen Shot 2015-10-21 at 11.14.57 AM.png
Screen Shot 2015-10-21 at 11.14.57 AM.png (31.01 KiB) Viewed 1055 times

chuckvideo
 
Posts: 20
Joined: Wed Mar 03, 2010 8:25 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Wed Oct 21, 2015 2:53 pm

A couple of ways to do this:

Option 1 is to reinstall the Arduino software and then run the Teensyduino installer again, but when it gets to the libraries part, deselect any of the Adafruit stuff (use the Arduino IDE Library Manager for adding those instead).

Option 2 (on a Mac) is to right-click the Arduino application and select "Show Package Contents." You'll find the duplicate ST7735 library inside the Contents->Java->Libraries folder.

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

Re: Electronic Animated Eyes using Teensy 3.1

by chuckvideo on Wed Oct 21, 2015 3:19 pm

I'll give it a try, thanks again for the information. I just opened up the Contents/java/Libraries folder and I'll hunt down and kill that duplicate library for ST7735.

Appreciate everything you've done to help me, those eyes really are creepy looking!

chuckvideo
 
Posts: 20
Joined: Wed Mar 03, 2010 8:25 pm

Re: Electronic Animated Eyes using Teensy 3.1

by DougD03 on Mon Nov 09, 2015 1:57 am

Hi,

I'm a bit late to the party on this build project, but I got the components recently to try it. I have wired this project on a breadboard after soldering headers onto a Teensy 3.2 and the 1.44" TFT displays, but I'm only getting white screen on the TFT displays. I have loaded the "blink" program onto the Teensy, so I at least know that the board is configured in Arduino and can be programmed.

I have the following pins connected:
Teensy Pin 7 to TFT pin "O/C"
Teensy Pin 8 to TFT pin "RST"
Teensy Pin 9 to TFT pin "TCS"
Teensy Pin 12 (DIN) to TFT pin "SI"
Teensy Pin 13 (SCK) to TFT pin "SCK"
Teensy Pin "GND" to TFT pin "Gnd"
Teensy Pin "Vin" to TFT pin "Vin"

I have loaded the program to the Teensy 3.2 after commenting out the OLED library line and adding in the TFT line, and here are the compile results:

" uncannyEyesTFT.ino:460:17: warning: extra tokens at end of #ifdef directive [enabled by default]
uncannyEyesTFT.ino: In function 'void frame(uint16_t)':
uncannyEyesTFT.ino:327:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
uncannyEyesTFT.ino:404:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Opening Teensy Loader...

Sketch uses 183,808 bytes (70%) of program storage space. Maximum is 262,144 bytes.
Global variables use 4,776 bytes (7%) of dynamic memory, leaving 60,760 bytes for local variables. Maximum is 65,536 bytes. "

Any idea what I may be doing wrong? Am I wiring it wrong, do I have a bad solder connection, or is there another problem? Any ideas would be appreciated.
Thanks.

DougD03
 
Posts: 2
Joined: Mon Nov 09, 2015 1:31 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Mon Nov 09, 2015 2:21 am

"SI" should go to Teensy pin 11, not 12.

If that doesn't resolve it, one or more clear photos of all the wiring would be helpful.

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

Re: Electronic Animated Eyes using Teensy 3.1

by DougD03 on Mon Nov 09, 2015 2:35 am

pburgess wrote:"SI" should go to Teensy pin 11, not 12.


Thanks for the simple fix, that was my mistake!

DougD03
 
Posts: 2
Joined: Mon Nov 09, 2015 1:31 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Mon Nov 09, 2015 2:38 am

No prob. I've made the same error like three or four times already. :)

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

Re: Electronic Animated Eyes using Teensy 3.1

by msgt99 on Sun Dec 27, 2015 11:40 am

Pretty cool!

Definitely my project for next Halloween - set the eyes in a model skull.

What would make it even better is to have the eyes track someone walking by. Maybe combine an ultrasonic sensor to open the eyes when some approaches to a set distance and then use PIRs to to make the eyes track the body going by. Anyone try something like that?

Guess I need to get all the parts ordered and get busy on coding.

Thanks again for a pretty cool project!

msgt99
 
Posts: 18
Joined: Sun Dec 27, 2015 11:15 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Sun Dec 27, 2015 5:03 pm

Check out Tony D's project using a Raspberry Pi and OpenCV for face tracking:

https://learn.adafruit.com/creepy-face- ... t/overview

Could probably adapt some of that, using a serial connection between the Pi and Teensy.

Though I suppose one could port the eye code and drive the displays directly from the Pi if you really wanted to get deep into it.

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

Re: Electronic Animated Eyes using Teensy 3.1

by msargent on Mon Dec 28, 2015 7:02 am

I wasn't thinking of anything that complicated - that's out of my league!

I was just thinking of something much simpler. Seeing the joystick as a means to control movement of the eyes I was curious if using an array of PIRs (something like this - http://www.instructables.com/id/Motion- ... d-a-Servo/) and then based on the PIR activated in the array, reposition the pupils of the eyes to give a rough appearance of the eyes tracking movement.

So I guess my question is more like how is the joystick used/read to control movement of the eyes?


When I saw this project a LOT of possibilities jumped to mind to combine and make work together. But I guess I should stick with just getting a copy of your project working to start.

Again great project I look forward to getting all my pieces and parts to get to work. And thanks for your quick response.

msargent
 
Posts: 9
Joined: Thu Aug 21, 2014 3:13 am

Please be positive and constructive with your questions and comments.