Attribute Error When Attempting to Use LED Matrix

A group and I have been putting together the FlyPi Fluorescence Microscope, and have yet to get it to work. We get the GUI to pop up, but whenever we try to interact with the LED Matrix or LED Ring, we get the following error:

Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.5/tkinter/init.py", line 1562, in call
return self.func(*arg)
File "/home/pi/Desktop/Flypi-master/Python/matrix.py", line 134 , in matrixPattern1
self.ser.write(output.encode("utf-8"))
AttributeError: 'str' object has no attribute 'write'

This will happen, then the GUI will no longer respond. Before this, if we don't interact with it, other components of the FlyPi will work like the camera.

Is this a software or hardware issue?

Thanks

Comments

  • edited August 2018

    Hi!
    Thanks for reaching out here, glad to see more people are building FlyPi's!

    This seems like a software problem. Would you mind letting us know from which repository you downloaded the code? and more or less when?

    Since we realized most people had little use for the Matrix, we "turn it off" in the current code and further hardware development. BUT we are happy to guide you through turning it on again and helping develop things further!

    best,

  • Thanks for the fast response.

    We have tried multiple codes for the FlyPi, both the old code(about 12 months old) and the new code that you uploaded a few days ago. We tried downloading from both the amchagas repository on github, and the Prometheus Science repository. The most recent code that we downloaded was about 4 days ago

    We are also using the PCB Version 0.6 with the Arduino Nano on the outside. if that makes any difference.

    As of right now, the only things we can get to work was the onboard LED and the Fan( which only barely works...its one and off). The Peltier, LED ring, LED matrix, and other LEDs are not working.

    Would you mind telling us which way to orient the Arduino(with the port facing into or out of the board?

    Also, do you have a schematic or instructions for how our version of the PCB should be set up to make sure we have every piece on the correct way?

    Thanks!

  • Update: We just had the ring working (accidentally). We didn't tell it to come one, it just did. Then we closed the GUI, and it wouldn't come back on.

    Any thoughts on this???

    Thanks again!

  • Hi!
    thanks for the extra infos. I'm really sorry that things are not working as planned and also a bit puzzled that so many of the components are not working. Anyway, let's work through it and get it working :)

    About the arduino, the usb port should face the outside of the board like in the following image:

    In the most up to date code for the arduino, the matrix commands are turned off.
    Can you please try the following file: https://github.com/amchagas/Flypi/tree/deb6119e076c93d69b94f9ebaaa406ff533ab9c7/Arduino/main_RGB_ring_n_matrix to see if the matrix works?

    Could you please send us a photo of the PCB, more specifically of the place where the wires that go to the ring, peltier, etc are connected?

  • Okay, so we tried using the newest code that you uploaded, and still nothing. None of the LEDs would work. We also had to tweak a few things with the new code (main_RGB_ring_n_matrix) to get it to upload to the arduino.


    Here are some images of our Flypi. If you want some more specific pictures, just ask and we can send you some more.

  • Try installing Adafruit GFX library on the arduino IDE and upload the development test file. Other issues to check for the ring is RGB vs RGBW in the code (check your model) and check you have pyserial vs serial (you might get a serial attribute error in the IDE if this is an issue)

  • Hi there! (I have been working with mcuser2021.)

    @mattj1061 We saw that string of comments on the other forum post and tried all of the above in order to try troubleshooting our device without any luck.

    @amchagas It appears that your transistors are oriented in the opposite direction with respect to the PCB print... Is there any reason for this? We've tried just about everything we could think of without much success, so we are open to anything.

  • Hi @bcallen,

    welcome to the Forum!

    I sent @mcuser2021 a direct message yesterday, did he/she get it? Since the board has been updated since the version you are using, and I never saw such a problem (where basically nothing works), my suggestion in the message was that you sent me an address and I send you a newer board with all components tested. This will make everyone's lives easier :) Send me a private message with an address either here or on the email listed on the FlyPi paper.

Sign In or Register to comment.