Saturday, May 31, 2014

eRCaGuy_ButtonReader Library for Arduino - Debounce and read the current button state, & most recent action ("just pressed" or "just released") easily!


Subscribe by Email!
By Gabriel Staples
Written: 31 May 2014
Last Updated: 25 July 2015
Article History (newest on top)
-added button image & updated download links - 25 July 2015

Other Articles to Check Out:
This Article:

Library History (newest on top):

20141031: major bug fix; added multi-button support with a new 5-button-reader example!
20140531: first release.
Misc. push buttons which can greatly
benefit from digital debouncing. 
(Image source here).

Summary:

I wanted a simple and universal, yet very powerful & reliable library to read a button or switch in such a way that I can easily implement toggled actions and momentary actions, know the true, debounced state of a button or switch at any given time, and specify whether I want an action to take place when the button is *pressed* or *released.* This library makes implementing all of these things easy for me, and I now use it on all of my projects that require reading a button or switch, so I wanted to share it with others. Hopefully you find it useful too. Check out the included examples.  

This code is an elaboration of, and library form of, the main Arduino-sponsored "Debounce" example found here.  Thanks to David A. Mellis, Limor Fried (LadyAda), and Mike Walters for writing that excellent and well-thought-out example code.

Download:

(Optionally) donate, & download via the link just above, or by clicking here then choosing the appropriate download.  Install the library into the Arduino IDE (using Sketch --> Include Library --> Add .ZIP Library), then run the examples to see how to use the library.


***Subscribe by Email!***

Monday, May 12, 2014

Using the Arduino Uno’s built-in 10-bit to 16+-bit ADC (Analog to Digital Converter)


Subscribe by Email!
By Gabriel Staples Written: 13 May 2014
Last Updated: 16 Sept. 2015

History (newest on top):
-16 Sept 2015 - changed title from "10-bit to 21-bit ADC..." to "10-bit to 16+-bit ADC..."
-25 July 2015 - added a brief update below, updated download links
-17 Feb. 2015 - changed latest link to new release: V2.1 alpha, in yellow below
-24 Jan. 2015 - added link to Version 2.0 alpha below...allows sampling rates of ~50+ kHz, and fixed bug to allow >16-bit samples to not have computation errors

A Few Other Articles to Check Out:

This Article:

Using the Arduino Uno’s built-in 10-bit to 16+-bit ADC (Analog to Digital Converter)???
--Wait, what did you say!? I thought that Arduinos only had a 10-bit ADC!  How can you get, for example, 16-bit resolution out of a 10-bit ADC?  Well, the answer is oversampling.  Atmel has written a really good article about it called "AVR121 Enhancing ADC resolution by oversampling."

Before I continue, I'd like to give a special thanks to user "fat16lib," on the Adafruit Forums, who first made this technique known unto me by his post right here, thereby inspiring me to write this, my first ever, library.

Now on to the library:


***Subscribe by Email!***

Sunday, April 20, 2014

Saturday, April 12, 2014

Propeller Static & Dynamic Thrust Calculation - Part 2 of 2 - How Did I Come Up With This Equation?


Subscribe by Email!
By Gabriel Staples Written: 12 April 2014
Last Updated: 1 June 2015
-added Figure #s - 1 June 2015
-made some minor additions & formatting changes, incl. adding more info. about future work & possibly considering some blade element theory techniques - 13 Apr. 2014
-minor units correction - 16 Apr. 2014
-minor addition to section describing prop helical twist - 29 Apr. 2014
-additions & corrections to the bold portions of the "Application & Conjecturing" section - 4 May 2014

Related Articles:

This Article:

Since posting my initial "Propeller Static & Dynamic Thrust Calculation" post, I have had many questions about where this equation comes from, and several requests to explain more.  I have even had college students ask me about the equation.  Additionally, this is my most popular post at the moment and is getting over 700 views per month, with the bulk of those hits being from Google Search results about propeller thrust.  So, I think it's time I explain more about the background of the equation.  Here goes.

First off, here's the nomenclature I will use:


***Subscribe by Email!***

Friday, April 11, 2014

Aim High


Subscribe by Email!
Aim high!  Shoot for the stars and you’ll land on the moon; shoot for the moon and you’ll land on the roof; shoot for the roof and you’ll land in the dumpster. Aim high!

I've heard quotes similar to this, and the other day (22 March 2014) I thought about this and wrote it on the top of a to-do list I had which pertains to Unmanned Aerial Systems-related projects I'm working on.  These are the types of things I try to remind myself regularly.  Aim high.

~Gabriel Staples

Related Article:




***Subscribe by Email!***