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

Thread: Teensy 4.1 - firmata

  1. #1
    Junior Member
    Join Date
    Sep 2020
    Posts
    6

    Teensy 4.1 - firmata

    Dear all,

    When I trying to run StandardFirmata on the board Teensy 4.1, I had an error shows:

    Code:
    In file included from C:\Program Files (x86)\Arduino\libraries\Firmata/Firmata.h:17:0,
    
                     from C:\Program Files (x86)\Arduino\libraries\Firmata\examples\StandardFirmata\StandardFirmata.ino:28:
    
    C:\Program Files (x86)\Arduino\libraries\Firmata/Boards.h:856:2: error: #error "Please edit Boards.h with a hardware abstraction for this board"
    
     #error "Please edit Boards.h with a hardware abstraction for this board"
    I then found Jeff's repo of the Boards.h. It seems the current version has not supported Teensy 4.1 yet.

    Question 1: does anyone have a solution for this?
    Question 2: My goal is to control the Teensy with python, if there is an alternative to do this?

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,887
    Assuming Circuit Python will do for python, CP has been supported on Teensy 4.0 for awhile now. Teensy 4.1 support is in the 6.0.0 alpha releases:

  3. #3
    Junior Member
    Join Date
    Sep 2020
    Posts
    6
    Thanks! Michael.

    I think I have just burnt my Teensy 4.1...
    Based your comment, maybe it's better for me to get a Teensy 4.0 and try the CP.

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,931
    Quote Originally Posted by hoga85 View Post
    I think I have just burnt my Teensy 4.1...
    Based your comment, maybe it's better for me to get a Teensy 4.0 and try the CP.
    I have looked at your three different posts and still have no idea what your problem is with your 4.1 and what you have tried to resolve it...

    Again if your having issues with a T4.1 (or any teensy) it would be might provide some additional information, including maybe a picture.

    Things like is this a bare bone board, or have you modified it any way. Things like soldered on pins or the like... Again if you have anything connected to it and have issues, unplug everything but USB and try again..

    I had the impression from another post that the board is being seen on your computer?

    You might look at the troubleshooting page: https://www.pjrc.com/teensy/troubleshoot.html

    Some of the things I would try include:

    a) Reset the board to default program. That is you hold the program button down for about 15-20 seconds. until hopefully the little led near the usb port starts to blink, release it and then board will reprogram with the default blink program... After that little LED turns off the main LED should start blinking the main led, and the board should show up as a HID device.

    b) then in Arduino IDE load up a simple sketch like the blink example. Make sure the board type is set to Teensy 4.1. Make sure the USB type is set to serial. And then press the verify button in the IDE, which should build the program and bring up the Teensy program. At that point I usually just push the program button on the Teensy and you should see the teensy program update the teensy, which should then give it an actual serial port...

    c) if the above does not work, I would check Serial cables, make sure not just a charging cable. Also maybe reboot your PC...

    d) Still does not work. Check the simple hardware things, like does VIN pin show +5v when plugged into USB? Does the 3.3v pins show 3.3v...

    Good luck

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,887
    And of course make sure that you have a USB cable that passes data, and is not just a charging cable that only provides power.

  6. #6
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,887
    Quote Originally Posted by hoga85 View Post
    Thanks! Michael.

    I think I have just burnt my Teensy 4.1...
    Based your comment, maybe it's better for me to get a Teensy 4.0 and try the CP.
    The 6.0.0 alpha release does support the Teensy 4.1. Presumably whenever 6.0.0 is released, it will be listed as fully supported.

  7. #7
    Junior Member
    Join Date
    Sep 2020
    Posts
    6
    Thanks KurtE

    Sorry if these questions are a bit confusing. I guess I was a bit too keen on trying the board and too naive to handle it properly, so the board stopped working. Questions just occurs one after another.

    - Purpose: I am trying to use Teensy and a multiplexer (74HC4067) to receive signals from 16 sensors. And I want these signals to be read in a computer; ideally, to be able to be handled in python. Because in the later stage, we would like use these signals attained by Teensy together with another signal that acquired by another device, processed by python.

    - I asked about Boards.h for the StandardFirmata is because I tried to control Arduino UNO with an python package, i.e.,pyFirmata2, and it worked fine. So I think if I can run the StandardFirmata with Teensy4.1. I can also use the pyFirmata2 to monitor the signal from Teensy4.1 within python environment (the reason that I am not using Arduino is because the signal to be detected can be at few kHz. It seems that Arduino may not handle that well). That was why my first question was on Boards. And my second question is on an alternative way of using python to control the board (thanks for Michael's comment on this : ) ).

    - Then, my board stopped working when I was connecting Teensy4.1 to 74HC4067. Before that, the pin 13 LED blinked normally, Teensyduino was installed, and the script for blink example was uploaded ok. After modifying the delay time, the the blinking frequency on the board can be adjusted, so the USB cable should be fine (but I also tried different cable during the debugging). I came across to the trouble shooting page you mentioned. Teensy Loader did not recognise my board anymore, so I followed those 6 steps, but with no luck.

    - I was desperately searching (as I just have it for two days...) for potential solutions. I then saw Paul's comments on the HID's VID/PID number. I checked them when the board was connected and I couldn't find the correct ID. It seems my computer cannot see the Teensy4.1 anymore. That was the last method I can find; I therefore leave a question there, to see if there is other way to save the board.

    - The Vin pin does have 5V and 3.3V output. When pressing the reset button for long time (c.a. 20 seconds), the red LED beside USB port blinks once. But after that, the Pin13 LED is still not blinking. And the chip gets really hot within 1 minute. That should probably mean it is dead...?

    Thank in any way for the comments and reply. Nice and neat debugging steps to follow. ))

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,931
    Quote Originally Posted by hoga85 View Post

    - The Vin pin does have 5V and 3.3V output. When pressing the reset button for long time (c.a. 20 seconds), the red LED beside USB port blinks once. But after that, the Pin13 LED is still not blinking. And the chip gets really hot within 1 minute. That should probably mean it is dead...?
    After the 15-20 seconds holding the program button, and the led blinks, then releasing it usually will then stay on for awhile as it programs the chip with the default program... Maybe 30 seconds probably more...

    But you say: the chip gets real hot... Which chip? The main processor? (the big chip), or one of the others?

    I wonder if when you cnnected up the 75H... chip and sensors if you did it sort of the same way as you did like on an UNO. As the UNO runs at 5v and the T4.x runs at 3.3v and none of the IO pins are 5v tolerant So you always need to be careful.

    Good luck

  9. #9
    Junior Member
    Join Date
    Sep 2020
    Posts
    6
    Thank KurtE~~

    Yes, the main processor was what I meant. The comment on IO pins' acceptable voltage is very useful! Something I should have known, but I actually overlooked this.

    Give it 30 seconds (instead of repeatedly pressing the rest button) more did make something different. After the red LED (the one beside USB port) blinks once, the after some time. The red LED was on for about 30 seconds. And I heard a sound showing that a USB device was connected from the laptop.

    But I spent another few hours on trying reboot my laptop/reconnect USB cable/pressing the reset button the Teensy Loader seems not read the board, and I couldn't find a device in the device manager/HID device that indicate the Teensy yet. Will spent some more time on trying this. Hope to get some good news on this.

    (The main processor gets so hot (it burns my finger, so I think it's at least above 55 degree C) that warms up the overall board (my hand can still hold the two rows of pins, so the temperature of them may be around 45 degree C ). That may not be a good sign?

  10. #10
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,931
    Sorry, that does not sounds like a good sign...

  11. #11
    Junior Member
    Join Date
    Sep 2020
    Posts
    6
    Quote Originally Posted by KurtE View Post
    Sorry, that does not sounds like a good sign...
    XDDD Time for me to face the reality, and get a new board.

    Thanks for those tips in any case. I will now need to think how to avoid my input signal goes above 3.3V.

Posting Permissions

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