19 Replies Latest reply on Jan 7, 2020 10:25 AM by easyejl

    Is it just me, or do you end up installing raspbian over and over again on a complex project?

    easyejl

      I don't even think this project is all that complex. A raspberry pi 3b+ with a Waveshare WM8960 sound card, a generic 16 channel servo card, running google assistant with hotword recognition, running servos to move a puppet (and have the mouth move more or less in time with the speech).

       

      I keep running into audio issues, where installing one thing or another ends up messing up the asound or pulseaudio config and then I lose output to the speakers. I got that card to simplify things as it has a tiny onboard amp and speakers, as well as built in microphone. But i'm now up to having reinstalled raspbian at least 8 or 10 times trying to get all the components to work together. I know I could scrap that card for this, add a usb microphone, and powered speakers but I don't have a usb mic handy, and I wanted this to all fit inside a moose head puppet. If I need another power supply on top of the pi + servo board (to drive the speakers) it seems like its gone a little too far

        • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
          dougw

          It sounds very frustrating to say the least.

          When I used Google Assistant with a Pi3B, I used a Google AIY Voice Hat to generate the sound, and there were lots of detailed installation instructions available. (but I still had some trouble getting it all working - fortunately I didn't end up reinstalling the operating system)

          I haven't tried your specific hardware, so I don't know what issues will occur with that setup, but your project sounds interesting. I hope you get it working.

          1 of 1 people found this helpful
          • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
            colporteur

            There are a few of us Element14 minions that have struggled with Pi audio.

             

            The following post was made to resolve a bluetooth audio issue. It contains some links to reference material to better understand Pi's audio setup.

            https://www.element14.com/community/message/280804/l/route-all-pi-audio-to-bluetooth-speaker#280804

             

            I found the .asoundrc file key to getting an keeping audio working. As I made changes I kept saving the file contents. The minutes things went for a shite, I restore the file to the last know good configuration.

             

            There are other posts for audio issues. I seem to recall someone made a post on the process they developed to establish audio across a number of applications. Unfortunately I am unable to find it in the time limit my wife gave to play on the computer before guest arrived.

            4 of 4 people found this helpful
            • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
              rsc

              On a complex RPi project I usually start with 2-8G and 2-16G SD cards.

              Load all 4 with the latest raspbian image.

              load all "extra software and drivers" on the first 8G card and make sure to write down each step you used during the installs.
              Try and duplicate the system on the second 8G card, if it works OK, then save that image on a HD. This is your backup BASE image.

              Try and add some code, and every time you get a major feature working duplicate it on the second 8G.

              At the end of the day, make a copy of the working image.

              When you get to a point where you need more storage, switch to the 16G cards.

              Scott

              6 of 6 people found this helpful
              • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                easyejl

                I definitely need to spend more effort on installing a piece, testing, backing up working configuration and then installing the next piece

                  • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                    colporteur

                    I got some time to find the link another member posted on Pi audio tribulations.

                    Alsa no audio (glitch) issue Pi 4 fix

                     

                    I suggest you review the post and examine the links. I'm confident it will increase you knowledge level on the subject. Hopefully it provides you the insight to resolve your issue.

                     

                    When troubleshooting audio issues I start with a clean install for the Pi and backup the .asoundrc file after confirming audio is working. As I make software changes I keep track of what is happening in .asoundrc. You can see the changes and can compare that to what was working.

                     

                    I confess consistent audio setup has never been easy on the Pi. Just when you think you got it nailed down it evolves and you are left picking up the gauntlet of audio not working once again.

                    3 of 3 people found this helpful
                  • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                    sjmill01

                    In the past two months, I've found that GitHub is my biggest buddy to fight off development woes.  For those who haven't embarked on GitHub, yet - the power of it comes with its use at the very start of a project.

                     

                    In the past, I'd just throw my finished project in there which could benefit others - but, I didn't realize how I was missing the boat for it helping me out in the development phase.  It provides easy backup and retrieval to readily recover your project to a known good state.  In addition, it has you log a quick summary of any changes between syncs between your local project and the cloud.  I've found these features invaluable as a Maker.

                     

                    Here's my M.O.:

                    1. At the start of the project, create a GitHub Repository.  Edit the README.md file to lay out the project summary.
                    2. On your Pi, do a 'git clone repository_address'.  You will now be in sync between a Pi directory and your cloud repository.
                    3. As you make 3D Printable files or collect sounds and images, use the web interface to organize them in your repository.  Then do a 'git pull' on the Pi to sync it.
                    4. As you discover required packages and learn tricks for setting up the Pi, update that README.md file accordingly.
                    5. As you update code on your Pi, do a "git add ., git comit, git push" to sync back to the cloud repository.
                    6. You can make a bash script that will allow for "install" of your project on a clean pi as well and house it in the repository.  Or simply update the README.md with instructions.

                     

                    Now, within seconds, you can deploy your project to an infinite number of PIs.  You never lose track of where you left off or the magic .asoundrc file that was working for you.

                     

                    Here's an example project I have brewing:  Ghost-Catcher-Cam.  The README.md at this state isn't written for others - it's to keep me straight on all the complexities of the build from audio, to display, to OpenCV, mouse pointer hiding, taskbar hiding, etc.

                     

                    In the end, you'll have a perfect repository allowing you to share or remake your project from scratch without having to remember a thing.  You'll also be able to quickly leverage an old project into a new.

                     

                    Happy New Year!

                    Sean

                    5 of 5 people found this helpful
                    • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                      urkraft

                      I very much doubt that it is just you.

                       

                      I have the latest version of Raspbian installed on my pi 4. Have hardly had any time to use it for a long time now, but try at least to check for updates and install them every week. Yesterday i found time to do some Python programming on it and noticed that it is really screwed up! No one else has access to it and it is shut down when i am not using it, but now the settings are waco - probably due to changes made by an update. I have been using Raspberry Pi's for quite a few years now and have at least 7 of them of various models and have never had problems configuring them properly. The first thing i do when i start a session with any of them is to check for updates and install them. Nonetheless, i have experienced that they occasionally experience so many problems that i believe it is best to just reinstall and reconfigure them.

                       

                      But i have never before that my configuration settings have been so drastically changed as on my pi 4. Although i live in Norway, i do not believe in setting up anything i have (pc's or pi's) that are not designed in Norway for the Norwegian version. I learned a long time ago that it is wise to always use the native version since that is probably tested most rigorously, and only change the things that are necessary (like for example keyboard and wifi configuration). But suddenly lots of my settings are corrupt and the graphical interface is in a mixture of Norwegian and English! When using the Geany editor for Python programming the "Save" menu is in Norwegian ("Lagre"), while the "Save All" menu is in English!

                       

                      Very frustrating for me every time things like this happen - and it happens far too often on all systems! Even a huge developer like Microsoft releases updates and products without (in my opinion) adequately testing first.

                       

                      S**t happens - and keeps happening, unfortunately.

                      2 of 2 people found this helpful
                      • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                        rsc

                        I agree with Sean about Github for version control, I also use GitLab when there are multiple people working on a software project.

                        2 of 2 people found this helpful
                        • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                          aspork42

                          I Had kind of a similar nightmare with that during the Pi Chef Challenge. I was integrating the 4D Systems touchscreen and kept bricking the Pi and I had to reinstall. I lost a week or two on it. I finally set it down and came back to it later. Eventually I realized that because the screen had a custom kernel, that every time I tried to run updates it would plow over the custom stuff and basically brick it. So I ended up with an image which is locked in time and can’t be updated, but everything worked once I figured that out. I found later that it is mentioned kinda sorta in passing to not run updates, but I read right over it. Wish it was stated clearer.... So double check all the documentation.

                           

                          https://www.element14.com/community/community/design-challenges/pichef/blog/2018/02/13/pi-chef-challenge-smart-range-hood-initial-pi-power-up-config

                          3 of 3 people found this helpful
                          • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                            grondak

                            Sometimes, a system configuration management tool like these could be useful (or they could be overkill). I think SBC projects are often right at the edge of the need for these things. We could teach each other how to make new packages for Raspbian so that installation is a lot easier after we finish our adventures with the RPi. I was going to offer a how-to blog entry on this. However, my link is a page from the Debian Administrator's Handbook. This is a wheel we needn't recreate!

                            3 of 3 people found this helpful
                            • Re: Is it just me, or do you end up installing raspbian over and over again on a complex project?
                              easyejl

                              For everyone's laughs, i'll share this weekend. I installed fresh buster on the pi, set up samba, set up a windows share. Got sound recording with usb mic + playback via headphone jack + powered speakers, and used rsync to back it up. Installed pulse audio, configured it, backed it up. Then I installed only the deprecated google assistant and got it working fairly easily. so I used rsync to back it up again. Installed the drivers for my sound card hat, only had to play around a little bit to get it all working, backed it up.

                               

                              So I guess the plan with taking intermediate backups had me being just cautious enough with everything else that it all more or less worked the first time. I spent more time waiting on rsync than actually installing or modifying configs