Lubuntu – two finger right click emulation

I use Mac OS X all day at work, and Linux at home.  One thing I have come to miss was being able to use two fingers to click and have it come up as a right click.  Now I know how to do this in Lubuntu.

First you need to install synclient:
sudo apt install xserver-xorg-input-synaptics

By default, two finger clicking should work now.  If you need two finger scrolling though, you’ll need to turn that on with these commands:
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1

If you are okay with scrolling “normal” you are done.  If you want it to scroll “natural” (like I do), then you have one more step.  You need to change the directional deltas to negative values.  Stock value is 73, so I set them to -73 to start with.  For my laptop this was to quick and I needed to slow it down with a larger valued delta.  I used -120 with these commands:  
synclient VertScrollDelta=-120
synclient HorizScrollDelta=-120

If you need to make more changes, you can see all values by just running the synclient command.

Some useful options are the TapButton1, TapButton2, and TapButton3.  These all control how many fingers are tapping.  If you want a 2 finger tap to do a right click you set it to TapButton2=2 etc.  ClickButton1, 2, 3 are the same concept but controlling what happens when X amount of fingers make a physical click.

It turns out I forgot an important step.  You need to make these active on login or the settings revert on reboot.   To do this, I made one long string and inserted it into an Autostart in Session Settings.  Mine looks like this:
synclient VertTwoFingerScroll=1 VertScrollDelta=-120 HorizTwoFingerScroll=1 HorizScrollDelta=-120

Posted in Computers and Hardware, Hobbies, Technology, Upgrade | Comments Off on Lubuntu – two finger right click emulation

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.

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

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:

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:

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 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;

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
       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