Uncanny Eyes is getting expensive

Glad to hear it did the trick. Thanks for the info on the framerate, that's pretty decent really, hopefully enough to give you pretty smooth results.
 
I'm in need of assistance with using the TeensyEyes files from Michael's github. I'm far from an expert with programming, but have a few years experience with creating projects on the Arduino and Teensy series of microcontrollers using the Arduino IDE. I'm familiar with file location for the .h .cpp, in regard to compiling, and feel confident I have everything in order, yet I cant get the files to compile without a number of "undefined reference" errors as if I have files in the incorrect location. This is what I've done, any help with stupid mistakes would be appreciated.

Download the zip file containing source files from git hub.
After unpacking I simply create a folder with the same name as the dummy ino file, then move all the files in the src directory to this new folder. When opening in the Arduino ide everything looks good, the .ino , .cpp and .h files are all shown. When I try and compile I get errors like this:

AppData\Local\arduino\sketches\5904FFEEB0724C46188F8A54E7FAA385\sketch\main.cpp.o:(.data.eyeDefinitions+0x68): undefined reference to `polarAngle_240'
AppData\Local\arduino\sketches\5904FFEEB0724C46188F8A54E7FAA385\sketch\main.cpp.o:(.data.eyeDefinitions+0x6c): undefined reference to `polarDist_240_125_85_0'
AppData\Local\arduino\sketches\5904FFEEB0724C46188F8A54E7FAA385\sketch\main.cpp.o:(.data.eyeDefinitions+0x8c): undefined reference to `disp_240_125'

The #include references in the config.h file all use "" rather than <> which tells me the compiler is looking in the directory structure under the .ino file, not the main Arduino/libraries folder, and this appears to work just fine. The problem seems to be that if the config.h file points to a another .h file (which as mentioned seems OK) but if there is another #include "" inside of that file , then I have issues with the complier finding that second #include.

Eaxmple.... this bit of code is part of the config.h file, the compiler seems to find eyes/240x240/bigBlue.h

Code:
// Enable the eye(s) you want to #include -- these are large graphics tables for various eyes:
//#include "eyes/240x240/anime.h"
#include "eyes/240x240/bigBlue.h"
//#include "eyes/240x240/blueFlame1.h"

in the file eyes/240x240/bigBlue.h there are these statements , which is where the complier is stumbling

Code:
#pragma once

#include "../eyes.h"
#include "polarAngle_240.h"
#include "polarDist_240_125_85_0.h"
#include "disp_240_125.h"

Is there a preference in my IDE setup I'm missing? ( I do have the Tools/Board selected as Teensy 4.1 )

I've successfully set up and used the Adafruit version UncannyEyes, this version looks like entertaining.

MSC
 
I'm in need of assistance with using the TeensyEyes files from Michael's github. I'm far from an expert with programming, but have a few years experience with creating projects on the Arduino and Teensy series of microcontrollers using the Arduino IDE. I'm familiar with file location for the .h .cpp, in regard to compiling, and feel confident I have everything in order, yet I cant get the files to compile without a number of "undefined reference" errors as if I have files in the incorrect location. This is what I've done, any help with stupid mistakes would be appreciated.
Note, for various reasons, I have not been doing much with Teensys lately.
Download the zip file containing source files from git hub.
After unpacking I simply create a folder with the same name as the dummy ino file, then move all the files in the src directory to this new folder. When opening in the Arduino ide everything looks good, the .ino , .cpp and .h files are all shown. When I try and compile I get errors like this:

AppData\Local\arduino\sketches\5904FFEEB0724C46188F8A54E7FAA385\sketch\main.cpp.o:(.data.eyeDefinitions+0x68): undefined reference to `polarAngle_240'
AppData\Local\arduino\sketches\5904FFEEB0724C46188F8A54E7FAA385\sketch\main.cpp.o:(.data.eyeDefinitions+0x6c): undefined reference to `polarDist_240_125_85_0'
AppData\Local\arduino\sketches\5904FFEEB0724C46188F8A54E7FAA385\sketch\main.cpp.o:(.data.eyeDefinitions+0x8c): undefined reference to `disp_240_125'
Exactly where did you get the files from? Both Chris's original source and my updates have been mentioned in this thread.
Now, the branch you probably want is the 2nd branch (i.e. meissner2). The main branch is intended to be the minimal changes from Chris's tree to get the files to build under the Arduino system, while the meissner2 branch is where I did other changes to the code. When Chris did the changes last November, I first re-based the changes into the main branch, and then I re-based those changes into the meissner2 branch.

If you can do standalone git commands, you can do 'git checkout meissner2' and it should switch you to my development branch. The way I did development under my Linux system is I symlink the git files in the 'src' sub-directory to separate directories in '~/Arduino' I actually put the files in '~/Arduino/meissner' to separate them from other Teensy sketches. In that directory, I rename 'TeensyEyes.ino' to be the directory name with a .ino suffix. Then I symlink the appropriate config-display*.h file to be config-display.h.

I.e. if the directory is '~/Arudindo/meissner/TeensyEyes-gc9a01a-2eye':
  • I rename, copy, or symlink the TeensyEyes.ino file to be TeensyEyes-gc9a01a-2eye.ino;
  • I rename, copy, or symlink the config-display-gc9a01a-2eye.h file to be config-display.h; (and)
  • This directory builds the TeensyEyes package for a system with 2 round GCA01A 240x240 displays, but no people/gravity/etc. sensors.

If you downloaded Chris's branch, it won't build under Arduino. It was built for the PlatformIO system. One of the differences is PlatformIO is able to build things in subdirectories, and Arduino can't. So, when I created my branch, I added the files that begin with 'build-*' that pull in files from the various sub-directories.
  • build-disp.cpp: Pull in disp_240_120, disp_240_125, and disp_240_130 from the eyes/240x240 directory.
  • build-eyelids.cpp: Pull in noeyelids_120 from the eyes/240x240 directory.
  • build-GC9A01A.cpp: If config-display.h defines USE_GC9A01A, pull in GC9A01A_Display from the displays directory.
  • build-GravitySensor.cpp: Pull in GravitySensor from the sensors directory.
  • build-LightSensor.cpp: Pull in LightSensor from the sensors directory.
  • build-logging.cpp: Pull in logging from the util directory.
  • build-PersonSensor.cpp: Pull in PersonSensor from the sensors directory.
  • build-polarDist.cpp: Pull in the various polarDist tables from the eyes/240x240 directory.
  • build-ST7789.cpp: If config-display.h defines USE_ST7789, pull in ST7789_Display from the displays directory.
I just rebuilt the meissner2 branch using the recently announced 6th beta test of TeensyDunio 1.60 for the Arduino 2.3.7 system on my Linux system. I also still have the 3rd beta test for TeensyDunio 1.60 for the Arduino 1.8.19 system lying around, and it also built (though the Java system is spewing out various warnings).
 
Last edited:
Note, for various reasons, I have not been doing much with Teensys lately.
I did see a post on a different thread in regards to this.. so I really appreciate that you took the time to help, enough said...


Now, the branch you probably want is the 2nd branch (i.e. meissner2).
Ahhh... that's where I went wrong. I knew Chris Miller's version was setup to compile with PlatformIO, but when I downloaded from your github I didn't pay attention to the fact that there were 2 branches... anyway, downloaded correct files today, compiled on the first try, took me a few minutes to remove the FPS number from the center of the eyes and to get them to blink randomly...(ok, the FPS removal took more than a few minutes...).

Thanks again for a helping hand, and also your work with TeensyEyes (someone has put in a LOT of effort)

MSC
 
Back
Top