Important: Cookie Usage

By using this site you consent to the temporary storage of session cookies on your computer.

Session cookies are only valid for the period while you actually have your browser open. As soon as you close your browser the cookies are deleted.

These session cookies are solely used for the smooth running of the website and are not able to identify you or your browsing history in any way.

Reading from Serial on the Arduino

I see many many questions on the Arduino forums from people trying to read data from a serial connection and not fully understanding how it works - and hence failing.

So, how should you read from serial?

Well, what a lot of new users don't realise is that serial data arrives one character at a time, and you have little or no control over just when that data arrives.

Powering your projects

Many people ask about what the best way to power their microcontroller project is.

90% of the circuits you find on the internet for such things as a standalone ATMega328P based (breadboard) Arduino, and similar projects, all seem to rely on the good old 7805 voltage regulator.

While I have nothing against such a time tested workhorse, in this day and age it's hardly ever a good choice as a primary voltage regulator. The same can be said for pretty much any linear voltage regulator.

Why I Pick PIC

People often despair at me for constantly raving on about how great Microchip PIC microcontrollers are, and how much better than everyone else they are.

While I completely agree that each microcontroller has its place in the world, I have yet to find a situation where Microchip don't have a microcontroller which is at least as good as the competition at fulfilling a role, whilst at the same time providing just so much more in the mix as well.

Debounced Input Class

Debouncing of inputs is something that I find a pain to program much of the time. Fitting it around your existing code schema can be a challenge. That's why I most often do my debouncing in hardware.

Hardware debouncing isn't always convenient though - maybe it takes up precious board realestate, or your budget doesn't stretch to the few pence required per button - maybe you have too many buttons. So, I wrote this little simple class to help me out when I need it.

class DebouncedInput
{
  private:
    byte pin;
    int value;
    unsigned long lastChange;

Microsoft sunk to an all-time low

Now I know what you're going to say - what has this to do with electronics hacking? Well, bugger all really, but I just had to vent my spleen.

I have just taken a look at Windows 8, and I must say I think that Microsoft have really really really done the most stupid thing imaginable.

While I'm sure that internally it's an improvement over Windows 7 - it certainly seems quicker and more responsive (but maybe that's only because it's a fresh installation), but who cares about that when you can't actually use it?

SPI VGA Interface

2012-11-17 15.28.06.jpgOur latest bit of playing is to try and build a VGA interface for the Arduino (and anything else with an SPI interface).

Because we love Microchip's PIC microcontrollers so much, we really want to use one of them to generate the video signal instead of (as all the others do) an FPGA chip.

This has proved to be a bit of a challenge.

WavePro Shield

wp1.jpg For the past month we have been working flat out on a new WAV file player for the Arduino.

This one, we believe, is going to be the best one ever made. It's going to be the only fully integrated WAV player for the Arduino which gives you true CD quality audio.

Yes, there are other WAV players around, and there are MP3 players around. None of them quite fit the bill though.

None of the WAV players we have found have given us the audio quality we want. None of the MP3 players we have found work in quite the way we want.

So, here's the WavePro shield.

The Finite State Machine

Many of the programming questions on the Arduino forum can be answered with one simple response:

Implement a "Finite State Machine."

But what actually is a "Finite State Machine"?

Arduino MCPDAC Library

First draft of my MCPDAC library.

Use this to control the Microchip MCP4822 and similar SPI DAC chips.

See the example included with the library for how t use it (it's simple).