uncanny eyes with Teensy 3.1
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- rbbtebo
- Posts: 57
- Joined: Tue Aug 18, 2015 9:12 am
Re: uncanny eyes with Teensy 3.1
I second what VKSOI said!
- KANAMAN
- Posts: 6
- Joined: Thu Oct 22, 2015 8:30 pm
Re: uncanny eyes with Teensy 3.1
This 44mm lens works great. Makes the eye huge.
[urlhttp://www.amazon.com/gp/product/B00HLBHLIA?ps ... ge_o06_s00][/url]
[urlhttp://www.amazon.com/gp/product/B00HLBHLIA?ps ... ge_o06_s00][/url]
- zombie2120
- Posts: 2
- Joined: Sat Nov 07, 2015 4:58 pm
Re: uncanny eyes with Teensy 3.1
I am extremely new at this and thought I would give this a try. I am getting the following errors when I try to compile. I already did the test for display and its working fine. Just can not get file to compile. Any help would be greatly appreciated.
In file included from uncannyEyes.ino:27:0:
C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:22:0: warning: "swap" redefined [enabled by default]
#define swap(a, b) { uint16_t t = a; a = b; b = t; }
^
In file included from uncannyEyes.ino:17:0:
C:\Program Files\Arduino\hardware\teensy\avr\libraries\Adafruit_GFX/Adafruit_GFX.h:11:0: note: this is the location of the previous definition
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
uncannyEyes.ino:479:17: warning: extra tokens at end of #ifdef directive [enabled by default]
uncannyEyes.ino: In function 'void frame(uint16_t)':
uncannyEyes.ino:346:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
uncannyEyes.ino:423:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.cpp:21:0:
C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.h:22:0: warning: "swap" redefined [enabled by default]
#define swap(a, b) { uint16_t t = a; a = b; b = t; }
^
In file included from C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.cpp:20:0:
C:\Program Files\Arduino\hardware\teensy\avr\libraries\Adafruit_GFX/Adafruit_GFX.h:11:0: note: this is the location of the previous definition
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
Teensy Loader could not find the file uncannyEyes.cpp
Error compiling.
Code: Select all
C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library/Adafruit_SSD1351.h:22:0: warning: "swap" redefined [enabled by default]
#define swap(a, b) { uint16_t t = a; a = b; b = t; }
^
In file included from uncannyEyes.ino:17:0:
C:\Program Files\Arduino\hardware\teensy\avr\libraries\Adafruit_GFX/Adafruit_GFX.h:11:0: note: this is the location of the previous definition
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
uncannyEyes.ino:479:17: warning: extra tokens at end of #ifdef directive [enabled by default]
uncannyEyes.ino: In function 'void frame(uint16_t)':
uncannyEyes.ino:346:67: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
uncannyEyes.ino:423:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.cpp:21:0:
C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.h:22:0: warning: "swap" redefined [enabled by default]
#define swap(a, b) { uint16_t t = a; a = b; b = t; }
^
In file included from C:\Users\ZOMBIE AMUSEMENTS\Documents\Arduino\libraries\Adafruit_SSD1351_library\Adafruit_SSD1351.cpp:20:0:
C:\Program Files\Arduino\hardware\teensy\avr\libraries\Adafruit_GFX/Adafruit_GFX.h:11:0: note: this is the location of the previous definition
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
Teensy Loader could not find the file uncannyEyes.cpp
Error compiling.
- zombie2120
- Posts: 2
- Joined: Sat Nov 07, 2015 4:58 pm
Re: uncanny eyes with Teensy 3.1
I seem to have to found the problem and now its works just fine
- charxian
- Posts: 10
- Joined: Thu Dec 08, 2011 6:35 pm
Re: uncanny eyes with Teensy 3.1
Im having the same problem, how did you fix it?
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: uncanny eyes with Teensy 3.1
What version of the Arduino IDE are you using? I had some trouble with 1.6.6 and Teensy, it's a bit bleeding edge and may require a little integration time. 1.6.5 was OK though.
Also, install the GFX and display libraries using the Arduino Library Manager, not from the Teensyduino installer.
Also, install the GFX and display libraries using the Arduino Library Manager, not from the Teensyduino installer.
- PunyViking
- Posts: 2
- Joined: Tue Dec 15, 2015 1:32 pm
Re: uncanny eyes with Teensy 3.1
Nice project!
I have made this with one of those cheap ebay tfr lcd's, 1.8" 128x160 pixels. And with a few modifications to the code it works like a charm!
But I would like to rotate the eye on the display to make the most out of the height of the display and to make the displays fith the project better, but the obvious way to do this
after the the InitR doesn't work. A great deal of nothing is changed. Is there a way to rotate the image using code? If not I have to rotate by changing the graphics, and that will need both displays to be rotated the same way, and I want each displays to rotate the oposite ways.
Thanks!
I have made this with one of those cheap ebay tfr lcd's, 1.8" 128x160 pixels. And with a few modifications to the code it works like a charm!
But I would like to rotate the eye on the display to make the most out of the height of the display and to make the displays fith the project better, but the obvious way to do this
Code: Select all
eye[e].display.setRotation(1);
Thanks!
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: uncanny eyes with Teensy 3.1
Not familiar with the display in question, but it's possible they implement rotation differently; setRotation() may require some work and a datasheet.
If you do need to 'manually' rotate the graphics, you might not need separate right/left. The eye code exploits the mirroring capability of the Adafruit TFT & OLED displays...if the same capability exists in the displays you're using, it's just a matter of issuing the right commands.
If you do need to 'manually' rotate the graphics, you might not need separate right/left. The eye code exploits the mirroring capability of the Adafruit TFT & OLED displays...if the same capability exists in the displays you're using, it's just a matter of issuing the right commands.
- PunyViking
- Posts: 2
- Joined: Tue Dec 15, 2015 1:32 pm
Re: uncanny eyes with Teensy 3.1
I just made it! I needed to move the
from void setup to void draw eye!.
I just love this project! Now my quadruped robot are going to get some eyes!!!
Code: Select all
eye[e].display.setRotation(1);
I just love this project! Now my quadruped robot are going to get some eyes!!!
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: uncanny eyes with Teensy 3.1
That sounds TERRIFYING. :) Please post pics!PunyViking wrote:Now my quadruped robot are going to get some eyes!!!
Glad to hear it was a simple fix.
- merlins_ghost
- Posts: 50
- Joined: Wed Jan 07, 2015 1:39 am
Re: uncanny eyes with Teensy 3.1
I have been having a lot of fun making eye's (from human to robotic eyes) with the uncanny eyes project. I do have a question though I was looking at the python code and noticed that there was code there for the pupil map if the radius was put in as a negative number, but it does not seem to be working with the files that I am using, what are the parameters for using the pupil map? Does the pupil map code work? I used the pupil map from the dragon eye for testing, but got errors. I did rename the dragon pupil map to PupilMap.png.
Thanks
Thanks
Last edited by merlins_ghost on Sun Dec 27, 2015 4:08 am, edited 3 times in total.
- merlins_ghost
- Posts: 50
- Joined: Wed Jan 07, 2015 1:39 am
Re: uncanny eyes with Teensy 3.1
Regarding the making of eyes, have you thought about making a collection point where people could post their eye image creations or parts (.h or .png files)? I have created a plethora of eyes that others might like to use that I would be willing to share, some are quite cool. I am also very curious what kind of eye images others are making. Example(s)
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: uncanny eyes with Teensy 3.1
Those are amazing! Would love to see them in motion. Does the aperture eye do the...uh...aperture thing?
The pupil map image needs to be named 'pupilMap.png' (initial p is lower case) and must match the iris dimensions exactly. What sort of errors are you seeing exactly?
The pupil map image needs to be named 'pupilMap.png' (initial p is lower case) and must match the iris dimensions exactly. What sort of errors are you seeing exactly?
- merlins_ghost
- Posts: 50
- Joined: Wed Jan 07, 2015 1:39 am
Re: uncanny eyes with Teensy 3.1
Yes, the aperture does the aperture thing. I will recompile later today using the lower case p and see what happens. Here are three more. The first is a nebula that I converted.
- Attachments
-
- Eye-Nebula.JPG (35.39 KiB) Viewed 1452 times
-
- Eye-Santa.JPG (47.25 KiB) Viewed 1452 times
-
- Eye-Radiation.JPG (37.32 KiB) Viewed 1452 times
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: uncanny eyes with Teensy 3.1
Crazy stuff. Santa eye is SCARY! :)
BTW, if you want to go even more crazy, it's pretty easy to rotate the irises...might look especially cool with things like the nebula. In uncannyEyes.ino, around like 184:
Right after this, you can add in an offset and clip it to the iris coordinates, something like:
where 'someOffset' is a global int that you increment every frame. (Since the code uses the mirroring feature of the displays, they'll spin in opposite directions).
BTW, if you want to go even more crazy, it's pretty easy to rotate the irises...might look especially cool with things like the nebula. In uncannyEyes.ino, around like 184:
Code: Select all
a = (IRIS_MAP_WIDTH * (p >> 7)) / 512; // Angle (X)
Code: Select all
a = (a + someOffset) % IRIS_MAP_WIDTH;
Please be positive and constructive with your questions and comments.