Need help linking a Raspberry Pi to a Teensy3.0

Status
Not open for further replies.

howzagoin

Member
I'm a noob when it comes to electronics, I've gone and bought a few toys and now don't know how to get them working together. I want to run a 16x30 rgb matrix made of 2811 strings. I can get the strings running using OctoWS2811 LED Library examples on the Teensy3.0. I think I can use the example sketch videodisplay.cpp.hex and the movie2serial Program to receive video from the Pi. I've got matrix control software Glediator running on a RSpi model B. I can't seem to find info on how to output the Glediator signal to the Teensy. I'm guessing it outputs through the GPIO, but what format and what pins? Any advice or links people can help me with would be much appreciated.
 
Usually the best way is by USB. Just connect Teensy3 to the Raspberry Pi USB host port. It will appear as /dev/ttyACM0. You may need to add the udev rule file to have permission to open the port.

Especially if you're using movie2serial, you definitely want to use USB. If you connect more than 1 Teensy3, using a Multi-TT USB hub.
 
Thanks for the info Paul.
I've been looking at http://magikh0e.ihtb.org/pubPapers/Raspberry.Pi.Hacking.pdf which suggests using the UART / Serial interface going through a logic level converter to keep the voltage at 3.3V. Other posts I've read suggest that a converter isn't needed if the Teensy isn't sending data back to the Rpi. Either way using the usb would be much simpler, no converter needed and I can power it with the same cable.
I can see the Teensy when I lsusb and I've added the 49-teensy.rules to /etc/udev/rules.d/
I can't get the Teensyduino installer to run, I've set chmod 777, Arduino will run fine but Teensy and Teensyduino won't start with nothing in task manager. I compiled the command line version of Teensy Loader but don't know what processor to put in "teensy_loader_cli -mmcu=atmega32u4 -w blink_fast.hex" If it's even possible to use.
When I copied the arduino directory with teensy already installed over and tried to run arduino I got this very interesting error:

"Possible cause: can't load IA 32 bit .so on a ARM-bit platform"

So I'm guessing the teensyduino binary won't run on a RaspberryPi.
Can the Teensyduino source code be compiled on a RaspberryPi? Will this work?

I'll go hunt round the RaspberryPi forums for an answer and see if I can figure it, cheers
 
Teensy 3.0 uses 3.3V signals, so if you connect the serial lines, a 3 to 5 volt conversion is not needed.

But the serial link is not nearly as fast as USB. If you're using movie2serial for 30 frames/sec video and a large number of LEDs, you'll probably need the speed of USB.

I compiled the command line version of Teensy Loader but don't know what processor to put in "teensy_loader_cli -mmcu=atmega32u4 -w blink_fast.hex" If it's even possible to use.

Use this code. It's been updated for Teensy3, but only on Linux. The Windows, Mac and BSD code is still Teensy2 only.

http://www.pjrc.com/teensy/beta/load_linux_only.c

Can the Teensyduino source code be compiled on a RaspberryPi? Will this work?

Sadly, it does not work. I tried some time ago. I haven't had time to work on solving the Raspberry Pi problems.
 
Not sure if I'm compiling it right

$ gcc -Wall load_linux_only.c -o load_linux_only

/tmp/ccOyK2XX.o: In function `main':
load_linux_only.c: (.text+0x267): undefined reference to `teensy_open'
undefined reference to `hard_reboot'
undefined reference to `teensy_write'
undefined reference to `teensy_write'
undefined reference to `teensy_close'
collect2: error: ld returned 1 exit status

Thanks for the quick reply above, good to know usb is faster, think I'll get some sleep.
 
Sorry to keep bugging you Paul,

Google can find anything on -DUSB_LIBUSB
I'm guessing it's part of the libusb c library
I've tried sudo apt-get install libusb-1.0-0-dev

Not sure what to do.
 
Status
Not open for further replies.
Back
Top