

So You Got an Arduino - abyx
http://www.codelord.net/?p=42

======
sketerpot
When I was first learning microcontroller programming, nobody told you this
stuff. The great thing about the Arduino community is that it makes casual
hacking so much easier to get into.

Another great resource for hardware hacking is the SparkFun tutorials:

<http://www.sparkfun.com/commerce/tutorials.php>

------
paulgb
_There are builtin “software” pull-up resistors_

Cool, didn't know that. I've seen it used in code once, but I couldn't
understand why someone would write to an input pin.

~~~
sketerpot
They're not really software resistors; they're hardware that's controllable
from software. </pedantry>

And this is very useful; this will definitely save some resistor wiring. Now
if only there was some easy way to debounce a switch in software....

~~~
kd5bjo
It's not too bad: keep an exponentially decaying average of the pin state, and
use some hysteresis (different levels for on/off) on that value. You should be
most of the way there.

It'll take (worst case) 8 bits for the average and 1 for the current state.
You could probably still get reasonable results with a 7-bit average so that
the whole thing still fits in a byte of RAM.

~~~
carterschonwald
Is it just me, or does this idiom sound very similar to one of the critiqued
"incorrect" programming idioms in the recently analyzed breathalyzer code?

~~~
kd5bjo
Yes; it's almost identical. It's one of the simplest digital low-pass filters
you can write. Basically, it does the same thing that an analog R/C filter
would do (given sufficient precision and sampling rates).

The issue with the breathalyzer code wasn't that the algorithm was incorrect,
but that the programmer used the wrong algorithm.

------
aswanson
I really wish the ATMega chip family had built in usb functionality. That
would make them a good competitor to the Microchip PIC 18F family.

~~~
samlittlewood
Do these meet your requirements?

ATmega16U4 <http://atmel.com/dyn/products/product_card.asp?part_id=4380>

ATmega32U4 <http://atmel.com/dyn/products/product_card.asp?part_id=4317>

Or use an AT90USBxxx part like on:

<http://www.pjrc.com/teensy/index.html>

~~~
aswanson
Yes, thank you very much.

------
cake
I was hoping to have some examples of projects.

I'm interested in Arduino but have yet to find a good project to begin with.

~~~
torpor
The critter-guitari Pocket Piano is a great shield for Arduino, and it has the
advantage that it gives you a lot of hardware to play with as well ..

[http://www.critterandguitari.com/home/store/arduino-
piano.ph...](http://www.critterandguitari.com/home/store/arduino-piano.php)

I built one for fun, and ended up using it in jam sessions as a serious synth.
Great!

------
Raphael
USB is serial.

