Audio Input Troubles

Having trouble getting the OS to recognize the USB 'sound card' input. So looking at some new sound options for the Pi:

One is wayyyy cheaper than the other. We'll see, I'm hoping one of these gets inputs working well.  Ideally I could solder in connections to a 1/4" jack for input and output that I could then put into the side of a 'box' for this whole contraption, but that's a step for way down the line after the proof of concept is working. Hopefully.

Guitarix Pi Build Day 1

Got the Raspberry Pi 4 hooked up and working with the touch screen. Waiting on more stuff to get delivered to try out Guitarix. Th Pi is super simple to set up. Kinda loving it.

Potential Project: Raspberry Pi guitar pedal effects board

Next up project is a big one for the summer - I want to work with my daughter to build THIS:

She plays guitar and this would be a fun project to work on together. The outcome would (hopefully) be a pedal board that she can hit up to 10 switches to change the sound of her guitar through a Raspberry Pi running Guitarix and a bunch of hardware hooking that all up to buttons you can hit with your foot. Basically I'll be following the instructions without a lot of improvising as electronics isn't my strong suit.

If I end up doing it, I'll try to do a series of posts about the build here.

Solar Panel API Project is my new coding project. Here's the tech behind it:

  • Ruby 2.7.0
  • Postgresql 12
  • SolarEdge API
  • OpenWeather API (for weather)
  • API (for sun position data)
There's two things executing in this project:
This is the code that runs in a loop and checks for data, putting it into the postgres database. Due to a quirk of the SolarEdge API, data for a given time (15 minute increments) sometimes isn't actually there for a good 5-10 minutes. So this script, on 15 minute intervals (:00, :15, :30, and :45) gathers weather and sun position data. THEN 10 minutes after THAT it queries the SolarEdge API for solar generation data in watts. Once that's gathered it's all put into the database under the timestamp of the solar data (:00, :15, :30, :45). Then it creates a .png file chart (using the 'gruff' gem) of power generation over the last 24 hours. Finally all that is bundled up and posted to a Twitter account - @JdbSolar.

Also every week (Sunday at 19:00) a weekly report to Twitter is run with a weekly chart.

This script also has other commands to export as csv and run a weekly report.

This is a lightweight Sinatra app that hosts two endpoints: / and /export. / serves up a simple index.html that shows the last year of data (or as much as it can if it's been running less than a year) and a link to export all data as a csv. /export does just what you'd think - exports all data as a csv.

What's Next
  • Do some code refactoring
  • Add unit tests for my /lib/ classes
  • Add in some new data fields for the weather
    • Weather id? It's an id for the current condition from Open Weather
    • snowfall in the last hour (mm)
    • snowfall in the last 3 hours (mm)
    • rain in the last hour (mm)
    • rain in the last 3 hours (mm)
  • Data SCIENCE
    • Use statistical analysis to figure out what fields have the most significant impact on power generation
Update: Added weather condition id, snow in the last hour, and rain in the last hour. Didn't add in teh last 3 hours because for some reason the openweather api was showing snow in the last hour but NOT in the last 3 hours and I didn't want to potentially pollute my data with a bunch of zeros.