Help with starting


I am having trouble getting the GUI to work on the FlyPi system. Everything is installed for what we need to use (we are only interested in the LED ring module). Everything else was done according to the instructions in the User and Assembly Manual. When we attempt to start the system using the following code:

cd ~/Desktop/Flypi-master/Python/
sudo python3 ./

We get the following message:

How do we solve this?

Thank you.


  • Hi!
    cool that you are trying to setup the FlyPi in your lab. This error seems to be related to the camera module. If you don't mind, answering the following questions should help us track down and debug:

    • Are you going to use the camera, or really just the LED ring system? - If you are not using the camera, you can turn off the entire camera module by opening the "" and changing the cameraflag to 0, as a matter of fact, you could do this to all of the parts not in use.

    • If you are going to use the camera, and one has been connected to the right port on the Raspberry Pi, this error message could stem from a faulty connection. Did you change the cable the camera comes with? (sometimes necessary as the original cable is short) Things to check in this case are a) to orientation of the cable, both at the camera end and at the RaspberryPi.

    Other than this two things, I would also suggest updating the whole software to the latest version, both Python and Arduino codes. they can be found here:

    Let us know how it goes!

  • Hi there,

    Thank you very much for your help! Everything was in fact connected properly and the system as updated as possible. I actually ended up getting get GUI to work by running the and then manually stopping it. After stopping the FlyPi GUI pops up and seems to work just fine. I'm not sure if this was how it was meant to be run, but regardless I'm happy it is working now.

    We plan to use both the camera and just the LED ring as a simple microscope. We do not need the LED Matrix. My question for you is: is it possible to run just the LED Ring without the matrix? I have everything soldered into the PCB for this module except for the screw terminal blocks associated with the LED matrix. I can't seem to get the LED Ring to light up and I'm wondering if those screw terminals need to be put into place. If so, is it okay that there will be no wires placed into them? I have attached an image of what our PCB looks like now.

    Thank you again for helping us, we are excited to start running experiments with the FlyPi!

  • Hi Emily,
    great to hear you got things up and running. Although this is not how it was supposed to run...

    From what you describe, it seems that there is still an issue with the communication in between the Raspberry Pi and the Arduino, and this will in turn affect the control of the led ring.

    One thing I forgot to mention in the previous post was that you should also update the serial library, to do so you need to open a terminal and type: sudo pip3 install serial --upgrade

    Other than that, the matrix and the ring are independent from one another, so you don't need both. The image you send looks fine. Another possibility is that the wires going to the ring are mixed up, not because you didn't solder them properly or anything, but most likely because there is a mix up on the silk screen on the board. If you could send an image of the backside of this one (more specifically the ring pads) and what is the color code for each wire (eg black=ground), we can check that out too.

    If none of this solves the issue, there should be some error being displayed on the terminal you used to execute "", if that is the case, please paste that here and we take it from there!

  • Hello,

    The color code used is the following:
    Red= power
    Black= ground
    White= signal

    I have updated the serial library using the command from the Github (sudo pip3 install --upgrade serial) but I will try the one you posted as well.

    Thank you so much for helping me out with this. I have attached the image of the back of the board.


  • Hi,
    so the order of the wires on the board is good (nice soldering! :smile:). Just to be on the safe side, the white wire should go to data input on the ring.

  • Hi,

    Thank you! The white wire is attached to the data input on the ring. I do get an error while uploading the fly_pi_development code to the arduino. Maybe that is the problem?

    Here is the message I get:
    Error Compiling
    fly-pi-development.ino:4:48: fatal error: Adafruit_LEDBackpack.h:No such file or directory compilation terminated

    I downloaded the necessary libraries from Adafruit for the ring but not the matrix. Should I download the libraries or should I delete the matrix portions of the arduino code?


  • Hi Emily,

    good catch! yes, you don't need the matrix parts on the arduino code. I had already removed the matrix code from development, but forgot the libraries. I updated the code on github... You can download and test that if it is easier... Otherwise you can comment out the libraries necessary for the matrix on top of the arduino sketch...


  • Hi Andre,

    I think that fixed the problem! I can even launch the GUI from the terminal now the way it was intended to be launched. My final issue is that the LED Ring doesn't quite take commands from the GUI. It flashes red in a random pattern, or gets stuck with only a portion of the pixels on red. I'm not experienced enough to know if this is a wiring problem or an arduino problem, but maybe you will know :)

    I have attached an image of what it looks like. I took a video of the flashing as well but I can't post a .mov to this forum.


  • I'm not experienced enough to know if this is a wiring problem or an arduino problem, but maybe you will know :)

    This is a weird problem :tongue: Ok, so it seems with baby steps we are getting somewhere..

    Could you please confirm which led ring you bought? Adafruit has expanded their offer, and some of them include a fourth led (white) per unit, so that they are RGBW, and not RGB - which then messes up the behaviour of the ring... If this is the case, then the solution is easy, mainly you'll need to change the arduino code:

    From (This is in line 69-70):
    //create function to control LED ring Adafruit_NeoPixel pixels = Adafruit_NeoPixel(ring_nPixels, RingPin, NEO_GRB + NEO_KHZ800);


    //create function to control LED ring Adafruit_NeoPixel pixels = Adafruit_NeoPixel(ring_nPixels, RingPin, NEO_GRBW + NEO_KHZ800);

    Also different rings use different libraries, in the example above the "+NEO_KHZ800" has to be changed depending on the ring being used.

    Other than this, it is worth checking if the python code and the arduino code have the same serial communication velocity set. Differences here could lead to strange behaviour too...

    let us know how it goes!

  • So the ring we have is the Adafruit Accessories NeoPixel Ring RGB LED 12 x WS2812 (Mfr. #: 1643). I have checked to make sure the library in use is correct for this ring and I believe it is.

    I will check the python and arduino codes to see if that is the issue. I'll let you know how it goes!

  • Good news! The problem was the wires didn't have the best connection in the terminal block, I re-did them and it works perfectly now! I am very excited to finish this system and start collecting data.

    Thank you so much for all of your help! I don't think I would've been able to finish it without your assistance. If I have any other questions I will definitely come back to this forum.

    Thanks again,

  • Awesome!!! Super happy to hear that you managed to get things working!!
    If you collect data that you can share, post a photo here! we would like to see it :smile:

Sign In or Register to comment.