Teensy 3.2 vs Particle photon

I am porting following project to particle photon

Code and hardware design for a Bluetooth to POTs telephone adapter

following is the sketch
blue_pot_proto.ino

  1. can anyone give me pointers on the changes required in this sketch?
  2. photon is fully compatible with teensy sketches?

@nitinjs123 ,

In general converting from an Arduino sketch to Particle is not that hard. The biggest issue is typically the libraries and even there you will find a lot of work may have already been done for you. You may also need to remap some of the pin assignments - and make sure you have enough IO

Looking at your sketch, the only library I see is EEPROM so you will simply need to use Particle’s equivalent calls.

The easiest way to start would be to try compiling and running this code on your Photon. If you run into issues, you can share your code here and see if someone can help.

Good luck!

Chip

1 Like

@nitinjs123, the Teensy is considerably different (no WiFi, no Cloud connection, no DeviceOS running on FreeRTOS) from the Photon, including its toolchain. Here are some issues I see:

  • Call references in blue_pot_proto.ino are defined in the bt.ino and pots.inofiles. The Particle toolchain may not process multiple .ino files and typically, these are defined as separate libraries with .cpp and .h files.
  • The Teensyduino Audio library required in the pots.ino code is designed for the Teensy hardware and not portable to the Photon.
  • This statement is of concern as the Photon 3.3v supply will likely not be able to provide the current needed.

However the Teensy protective PTC (thermal fuse) must be bypassed because it will trip from the inrush current for the AG1171 3.3V power supply.

@nitinjs123, besides the power issue, the show-stopper is likely the Audio library. If its requirement can be removed, only Serial interfaces remain which can be ported mainly as-is, though some work is required to adjust for the Particle toolchain.

3 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.