Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Porting an arduino zero to teensy 3.2 project

  1. #1

    Porting an arduino zero to teensy 3.2 project

    Hello guys . I am a newbie and i am kindly request for your experience.
    I have a working project (ReflowChateau-master.zip) and i would like to rebuild this project with another firmware written for arduino zero(Controleo3-master .zip).
    I need to know if its posible to modify this firmware (Controleo3-master .zip) to work with my teensy 3.2 , adafruit 2.8 tft and upgraded MAX31856.
    I have attached both projects to this post .
    Any advise is highly appreciated.
    Thank you so much .

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,079
    I looked at Controleo3-master.zip briefly. My first impression is basically no, it probably will not work on Teensy or other boards, at least not without a *lot* of work to edit the code.

    The author of this code (likely Peter Easton) appears to have copied many of the popular Arduino libraries directly into this code. He also seems to have removed their open source license headers and added his own comments claiming authorship, which is probably not legal.

    The practical consequence of having all this code which is normally libraries copied directly into the project is a lack of portability. It will only work on boards which are supported by the specific versions of the SD, ILI9488, Touch and other libraries he copied. The project also has code like this:

    Code:
    // Constructor for the TFT display
    Controleo3LCD::Controleo3LCD(void)
    {
        // Get the addresses of Port B
        portBOut   = portOutputRegister(digitalPinToPort(A2));
        portBMode  = portModeRegister(digitalPinToPort(A2));
        portBIn    = portInputRegister(digitalPinToPort(A2));
        flood8Reg  = ((uint8_t *) portBOut) + 1;
        bitmapReg  = ((uint16_t *) portBOut);
    }
    First, this is hard-coded to use pin "A2". Second, the definition of flood8Reg has a "+ 1" which is specific to certain hardware and unlikely to work on other chips. It's also used in this very hardware-specific way, with a "0xDF" bit mask.

    Code:
            uint8_t writeIdle = *flood8Reg & 0xDF;
    This sort of code is very tightly tied to one specific chip and board. While not impossible to port to other hardware (especially since the author appears to have shamelessly copied popular Arduino libraries which could be replaced) to make it really work on any other chip and board will require a lot of work to find and fix these many hardware specific details, and swap out the copied libs for versions which work on Teensy.

    So in short, no, it won't work on Teensy 3.2.

  3. #3
    Thank you very much for your time and your answer . I was presuming that he used open source library . Finally I end up buying his board .
    Thank you one more time for your effort .

  4. #4
    Senior Member
    Join Date
    Apr 2013
    Posts
    151
    Quote Originally Posted by krammer2262000 View Post
    Thank you very much for your time and your answer . I was presuming that he used open source library . Finally I end up buying his board .
    Thank you one more time for your effort .
    Depends on how you spell OpenSource, avaliable does not mean usable. You can use the original librarys and rebuild it with the original hardware (you buyed, now) reimpliment it, with some luck you can find the libs he recycled to go faster with it, or the hard way get it run on your hardware with his sketch as blueprint.

    Btw. I see the product pictures from Peter Easton, please use wire end ferrules on the wires not like on the pictures getting, I getting nightmares from it.

  5. #5
    Thank you for the advice regarding ferrules. You suggest using a single ferrule on all wires or shall I split them in groups ?

  6. #6
    Senior Member
    Join Date
    Apr 2013
    Posts
    151
    Shown that in this picture

    Click image for larger version. 

Name:	05-aderendhuelsen-crimpen-ergebnis.png 
Views:	2 
Size:	220.6 KB 
ID:	20635

    There are ferrules for every diameter

  7. #7
    Senior Member
    Join Date
    Mar 2016
    Posts
    120
    You suggest using a single ferrule on all wires or shall I split them in groups ?
    Yes, put a ferrule on every wire that will go into a screw terminal. Especially the ones for line voltage or high current.

    If you have to join 2 wires, there are ferrules for that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •