ps2dev icon indicating copy to clipboard operation
ps2dev copied to clipboard

Does this work on a Teensy 2.0?

Open sofakng opened this issue 3 years ago • 4 comments

Do you know if this would work on a Teensy 2.0? ...or does it require the Arduino bootloader/code?

sofakng avatar May 26 '21 20:05 sofakng

Never used teensy, so give it a try and let me know. It certainly requires Arduino API, such as digitalWrite(pin, LOW); and similar... Perhaps if you program Teensy using Arduino IDE, this will be probably part of the Teensy support package for Arduino. If you use different framework, it will probably be missing.

Personaly i would accept modifications to add HAL layer to support other platforms, this should be easy to implement. Just few wrappers and ifdefs around GPIO and interrupt code.

Harvie avatar May 27 '21 07:05 Harvie

It works, I use it.

cyberluke avatar Jul 17 '21 17:07 cyberluke

@cyberluke Good to know. Thank you. Did you needed to modify something or do some extra setup?

Harvie avatar Jul 17 '21 20:07 Harvie

No, works out of the box. You just need to download Arduino IDE for Teensy, which is called Teensyduino: https://www.pjrc.com/teensy/teensyduino.html

I shared a code with you in another thread for Teensy 3.2

The only change, if you want to use SPI is this code initialization:

#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
#include <SPI.h>

cyberluke avatar Jul 17 '21 22:07 cyberluke