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 Sun Sep 24, 2017 4:38 pm

Clear photos of all the wiring would be helpful in troubleshooting. Also, try the graphicstest example from the Adafruit_ST7735 library (adjusting the CS/RST/DC pins in the sketch as needed), see if it does anything.

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

Re: Electronic Animated Eyes using Teensy 3.1

by Danzini on Mon Sep 25, 2017 1:35 am

Fixed my brite white TFT problem. Happens when you don't have a good SPI-CLK connection.

Thanks...

Danzini
 
Posts: 4
Joined: Thu Sep 14, 2017 6:27 am

Re: Electronic Animated Eyes using Teensy 3.1

by David_Sebek on Tue Feb 13, 2018 12:04 am

pburgess wrote:You should get a pop-up alert when trying to upload the code, about the code being too big and will be truncated. Hit 'yes' and upload anyway. Should be fine.

What happens is that the Teensy loader doesn't know what board's attached until the first time something's uploaded. It'll figure it out and do the right thing during the upload.


I have tried to upload the code to my Teensy 3.2 but it continues to say too uncannyEyes.ino.hex (too large!) I have not been able to find the 'yes" and upload anyway on either the teensy screen or the arduino code screen. What am I missing? How do I get the code to upload to my Teensy?

David_Sebek
 
Posts: 5
Joined: Mon Feb 12, 2018 11:44 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Tue Feb 13, 2018 1:04 am

Does it compile OK and fail to upload, or does even the compilation step fail?

Regardless, big data dump of information would be helpful so I can try to reproduce it:
- What operating system
- What version of the Arduino IDE
- What version of Teensyduino (this can be found on the Arduino 'about' window)
- OLED or TFT header enabled?
- Which eye data have you enabled
- Did you try uploading a second time

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

Re: Electronic Animated Eyes using Teensy 3.1

by David_Sebek on Tue Feb 13, 2018 1:33 am

Thank you for your quick response.

It does compile okay but fails to upload.
macOS Sierra V. 10.12.6
Arduino 1.8.3
Teensyduino 1.41
OLED enabled, TFT disabled
I enabled data for just one eye per eye of newt directions
I did try uploading a second time.
Thank you again for your help.

David_Sebek
 
Posts: 5
Joined: Mon Feb 12, 2018 11:44 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Tue Feb 13, 2018 2:51 am

Both my machines are on High Sierra now so I can't mirror your setup exactly, but do have the same Arduino IDE & Teensyduino installed. Haven't been able to reproduce the issue yet.

What CPU speed and optimizer settings are you using? If you just compile (without upload), what does it report the compiled sketch size as?

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

Re: Electronic Animated Eyes using Teensy 3.1

by David_Sebek on Tue Feb 13, 2018 8:25 am

CPU Speed is set to 72MHz and the Optimizer is set to Faster

After compiling last three lines read:
Sketch uses 241288 bytes (92%) of program storage space. Maximum is 262144 bytes.
Global variables use 4752 bytes (7%) of dynamic memory, leaving 60784 bytes for local variables. Maximum is 65536 bytes.
/Users/DavidandNeelySebek/Documents/Arduino/libraries/Adafruit_Circuit_Playground/examples/Hello_CircuitPlayground/Hello_Blink/Hello_Blink.ino

David_Sebek
 
Posts: 5
Joined: Mon Feb 12, 2018 11:44 pm

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Tue Feb 13, 2018 2:20 pm

David_Sebek wrote:After compiling last three lines read:
Sketch uses 241288 bytes (92%) of program storage space. Maximum is 262144 bytes.
Global variables use 4752 bytes (7%) of dynamic memory, leaving 60784 bytes for local variables. Maximum is 65536 bytes.
/Users/DavidandNeelySebek/Documents/Arduino/libraries/Adafruit_Circuit_Playground/examples/Hello_CircuitPlayground/Hello_Blink/Hello_Blink.ino


That last line is just bizarre.

Something to try, if it's not a huge inconvenience: install a fresh Arduino IDE, version 1.8.5 (you can keep the prior version installed, just rename the app something like "Arduino-1.8.3" I keep several prior releases installed), install Teensyduino 1.41 atop that and DO NOT select any of the Teensy libraries during installation.

I could get the eye code to compile to the exact same size if the dragon (not newt) eye is enabled, one eye, OLED, 72 MHz Faster. Uploaded to the board without complaint. In theory, only difference is High Sierra (and maybe that I haven't installed the Teensy libraries). Give the thing above a try...if it doesn't work, might be worth asking in the PJRC forums if there's a known thing with Sierra.

Also, a little earlier in this thread I gave some code to max out the program space on the Teensy 3.2. You need to tweak the array size up or down to eventually reach exactly 100% of the available program space, but it's possible. The code will then compile OK in the IDE but report "too large" in Teensy Loader after hitting the upload button in the Arduino IDE. This dialog box pops up -- or rather, should pop up, but it's buried under the Arduino IDE windows -- clicking "OK" then does upload the sketch to the board. But I only get any of this behavior right when it's at the 100% mark…anything less, it uploads without complaint.

Last time we went through this, it turned out to be helpful to upload a small sketch (e.g. Blink) to the Teensy board first, so Teensy Loader "knows" the board that's connected and it's capacity, then upload the eye sketch.

dialog.jpg
dialog.jpg (76.12 KiB) Viewed 282 times

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

Re: Electronic Animated Eyes using Teensy 3.1

by David_Sebek on Tue Feb 13, 2018 8:44 pm

I went through the whole process and when I tried to upload blink it gave me a Teensy did not respond to USD based request. I am wondering if I have the right type of USB cord connected, I just ordered a 5 pin micro USB to see if a new cord could be the reason for the problem.

Any other ideas? Did not find anything in the pjrc forums that was helpful other than when I looked in my Hardware folder undre USB the Serial USB to the Teensy was not showing up. So another reason to think it might be the cord?

David_Sebek
 
Posts: 5
Joined: Mon Feb 12, 2018 11:44 pm

Re: Electronic Animated Eyes using Teensy 3.1

by David_Sebek on Fri Feb 16, 2018 12:53 am

Update...buying a new cord seems to have cleared up the problem. The program seems to have uploaded and once I have everything hooked up we will see how it works. Thank you for your help and insight.

David_Sebek
 
Posts: 5
Joined: Mon Feb 12, 2018 11:44 pm

Re: Electronic Animated Eyes using Teensy 3.1

by haydenp on Mon Mar 26, 2018 10:06 pm

ok, I've been beating my head against the wall for a while here.

I got the eyes running just fine. Tried a few of the built in eyes, works just fine. Decided to try making my own.
I adjusted the color in the defaultEye files and pasted the python script segment in the tutorial. I get
file "tablegen.py", line 51
Print "#define SCLERA_Width " + str(I'm.size[0])

any idea what I'm doing wrong?

Thanks!!

haydenp
 
Posts: 2
Joined: Fri Oct 12, 2012 11:57 am

Re: Electronic Animated Eyes using Teensy 3.1

by pburgess on Mon Mar 26, 2018 11:04 pm

Your system might be set up to run Python 3 by default.

Instead of 'python tablegen.py {argument list}', try 'python2.7 tablegen.py {argument list}' and see if that works.

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

Re: Electronic Animated Eyes using Teensy 3.1

by haydenp on Wed Mar 28, 2018 6:43 pm

ok, installing the Python 2.7 version specifically and the python imaging library 1.1.7 seems to resolve the issue. Thanks!

haydenp
 
Posts: 2
Joined: Fri Oct 12, 2012 11:57 am

Please be positive and constructive with your questions and comments.