Lubuntu – ignore power button press

There is only one thing that has irked me about my ASUS VivoBook, and it isn’t the laptop’s fault.  When I go to hit the “delete” key, it is right next to the power button.  The reason this matters is that default behavior in Ubuntu and all it’s flavor variants, is for this button to immediately shut the computer off…that’s right, no warning or popups etc, just slammed straight down.  To change this, you can edit logind.conf and set HandlePowerKey to “ignore”.

Here is the command you need:
sudo nano /etc/systemd/logind.conf

Then change HandlePowerKey=poweroff to HandlePowerKey=ignore

Do make sure that if it is commented out, you remove the comment.

Now the power button does nothing while the computer is running, and simply turns it on when the laptop is off.

**Note**
A 10 second press of the power button does still successfully force the laptop down.

Posted in Computers and Hardware, Technology | Comments Off on Lubuntu – ignore power button press

My first Kickstarter is live!


I have been building electronics for over 15 years and designing for almost as long.  For the first time though I am hoping to start selling my project as a kit – under the brand SSGuitar.com.

Enter the “Honey” amp, SSG-AMP-1.  Three knobs, two 1/8″ jacks, one input, all tone!

Controls: Gain, Tone, Master Volume
Inputs: Guitar, 1/8″ stereo aux
Outputs: Stereo headphone (from mono), Speaker 4-16 ohm
Input voltage required: 6-18v DC

Here’s the Kickstarter: https://www.kickstarter.com/projects/thatraymond/honey-battery-operated-guitar-amp-kit

Check it out!

Posted in Circuits and Electronics, Hobbies, Made in the USA | Comments Off on My first Kickstarter is live!

Load Arduino / avr bootloader using Raspberry Pi

This is more notes for me than anything else, but maybe someone else interested in using a Pi to program their Arduino would be interested.

It can be done:

https://learn.adafruit.com/ftdi-friend/programming-the-arduino-bootloader

https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins/programming

https://oxygene.sk/2015/02/using-raspberry-pi-as-an-arduino-avr-programmer/

https://learn.sparkfun.com/tutorials/raspberry-gpio/gpio-pinout

https://learn.adafruit.com/introducing-pro-trinket/pinouts

https://github.com/adafruit/Adafruit_ProTrinket_Bootloader

sudo avrdude -p atmega328p -C ~/avrdude_gpio.conf -c pi_1 -v -U flash:w:Blink.cpp.hex:i

Posted in Circuits and Electronics, Computers and Hardware, Hobbies, Technology | Comments Off on Load Arduino / avr bootloader using Raspberry Pi

8bit Metronome

8bit-metronome
8bit-metronome in Apple LCII PSU enclosure

Editor’s note: This post has been over a year in the making (I just kept procrastinating). It’s finally here, time to share some Arduino fun.

After creating my last metronome, based on a 555 IC, I decided I wanted to up the ante. I wanted to have a metronome that I could accurately control right to the single BPM. I also did not want to have a digital display. The best way I came up with was binary input via 8 toggle switches. This would allow me to control BPM from 0-255 BPM with precise accuracy. The easiest way I could come up with to control this is with an Arduino or Arduino clone. I chose the clone route and picked up an Adafruit Pro Trinket 5v/16mhz for all of $10. I also chose to get a small amplifier board to increase the volume coming off the PWM output of the Arduino. I used a small 8 ohm speaker from a greeting card and mounted the whole contraption in an old Apple LCII PSU I had gutted and saved.

This was my first Arduino project and also my first experience with Fritzing.

Rather than have the code do complex math, I simply had it look to each switch as a binary register and add it’s value if flipped high. IE, the first switch (from right to left) is valued as “1” if high, and “0” if low. While the switch all the way to the left is the 128 bit register and if flipped high is valued at “128”, if flipped low it is valued at “0.” After it checks all registers, it adds them up and there is your calculated BPM from binary.

As far as the physical build goes, I chose to use a 9v battery drawer for easy battery access. I also chose an LED embedded push button switch with separate LED control (normal it is lit when on, this can be controlled separately). I have it light up to match the BPM. When pushed, it still lights, but it mutes the speaker for quiet operation.

And now to the fun bits:


#define SPKR  12      // Speaker pin
 #define LED  13      // LED pin

 void setup(){
   // Configure input pins as an input and enable the internal pull-up resistor
   pinMode(3, INPUT_PULLUP);
   pinMode(4, INPUT_PULLUP);
   pinMode(5, INPUT_PULLUP);
   pinMode(6, INPUT_PULLUP);
   pinMode(8, INPUT_PULLUP);
   pinMode(9, INPUT_PULLUP);
   pinMode(10, INPUT_PULLUP);
   pinMode(11, INPUT_PULLUP);
   pinMode(SPKR, OUTPUT);  // Output to amp/speaker
   pinMode(LED, OUTPUT); // LED
 } 

int BPM() {
   int Sum = 0; // Start at 0, add registers if they are flipped high
   if (digitalRead(3) == HIGH)
     Sum += 1;
   if (digitalRead(4) == HIGH)
     Sum += 2;
   if (digitalRead(5) == HIGH)
     Sum += 4;
   if (digitalRead(6) == HIGH)
     Sum += 8;
   if (digitalRead(8) == HIGH)
     Sum += 16;
   if (digitalRead(9) == HIGH)
     Sum += 32;
   if (digitalRead(10) == HIGH)
     Sum += 64;
   if (digitalRead(11) == HIGH)
     Sum += 128;
   return(Sum);
 } 

void loop() {
   // Make metronome noises!
     if (BPM() == 0) { // If BPM is set to 0, light LED solid
       digitalWrite(LED, HIGH);
     } else {
       tone(SPKR, 440, 5); // Frequency of tick, length of tick
       digitalWrite(LED, HIGH); // Light LED for the length of the delay below
       delay(100);
       digitalWrite(LED, LOW);
       delay((60000 / BPM()) - 100); // Time between beats in ms, adjusted for above LED delay
      }
 }

8bit metronome Fritzing diagram

Posted in Circuits and Electronics, Hobbies, Music, Upgrade | Comments Off on 8bit Metronome

Copper pipe guitar wall hanger

I’ve finally made a wall hanger for my telecaster.  Everything was scrap from other projects.  The wood came from the underside of a dresser that got taken apart, the copper is from old baseboard, the wooden “plugs” in the copper are from something years ago (honestly, I forgot I even had this in the basement).  The “feet” on the lower pieces were from an old parts CB radio I took apart years ago.

The hanger itself consists of a board with two pieces of 3/4″ copper held in place by 3/4″ dowel whittled down to fit tightly in the pipe.  These pieces of dowel then got cut at roughly a 15 degree angle and screwed to the board.  This makes the copper pipe mounts slope upward, holding the guitar securely.  The copper pipes slip over these and then I put two similar pieces of dowel (cut straight this time) in the top of the pipes to make caps.  These caps protect my guitar from nicks and scratches while loading it into the hanger.

The two lower legs are to keep the guitar from trying to rotate while hung on the wall.  The guitar just barely touches them when it is in the hanger.  These pieces are 1/2″ copper pipe and have plastic “feet” sitting on top with long screws going through them that mount them to the wall.

It works great and I love the look.

Telecaster hanging in it’s new home.
Telecaster removed to show copper pipe pieces used as hanger.
Posted in Hobbies, Home and Homestead, Music | Comments Off on Copper pipe guitar wall hanger