Tag Archives: microcontroller

Sheldon robot: smart sensors

      No Comments on Sheldon robot: smart sensors

Microcontrollers can be busy little beasts. That’s because we load them down with jobs to do  – sometimes too many jobs. In the main loop of an Arduino, AVR or whatever microcontroller takes your fancy, we often spend time polling sensors and then throwing away the data as uninteresting. On the robots I’ve built in the past, for example, that polling… Read more »

Sheldon robot: architecture

      No Comments on Sheldon robot: architecture

Right from the beginning I knew that the Sheldon robot would have a multi-processor architecture. This appeals to me the same way object-oriented programming appeals – you can create a modular system in which each part does a specific task and can be treated like a black box. The structure will be hierarchical. At the top – what I’m going… Read more »

Making tools #2

      No Comments on Making tools #2

Some time ago, I wrote about how I’d hacked together a board to program and experiment with AVR ATMEGA328P microcontrollers. Well, now I’ve stepped things up a bit. Mk.II The key features of the old board were a ‘zero insertion force’ (ZIF) socket for the microcontroller chip and a 2×3 HE10 socket to take the ISP cable from my programmer… Read more »

AVR basics: using the I2C bus #5 – final thoughts

Part 1 – bit rate Part 2 – transmitting Part 3 – sending data Part 4 – receiving data Part 5 – final thoughts The I2C bus isn’t that hard to use and for most applications it’s pretty simple. However, there is a lot more depth to it than we’ve covered here. The purpose of this final post in the… Read more »

AVR basics: SPI on the ATMEGA – Part 2

In Part 1 we got the SPI bus set up on an AVR ATMEGA328P microcontroller. Now let’s start using it. Settings pins Before we get going, we need to set up the pins for the SPI bus on the AVR (which we’re using in master mode). I’m using the ATMEGA328P here, so I’m going to define some macros to make… Read more »

AVR basics: SPI on the ATMEGA – Part 1

When it comes to getting devices to talk to each other you’re spoiled for choice. There’s good, old-fashioned serial via UARTs, I2C (which I like a lot) and what is rapidly becoming my new favourite, the Serial Peripheral Interface (SPI). So let’s take a look at that. [Quick side note: please remember I don’t claim to be an expert. I’m… Read more »

Initial steps: MicroPython on ESP8266

Some time ago I witnessed people getting all kinds of excited about ESP8266 devices. Worth checking out, I thought, and promptly ordered about five boards – specifically the ESP8266 Huzzah boards from Adafruit. They’re not the cheapest, but with Adafruit you always know you’re getting quality and it has features like level-shifted (ie, 5V safe) RX pin and 3V3 output…. Read more »

AVR basics: reading and writing GPIO pins

Once you’ve set up a pin, or a whole port’s worth of pins, as inputs or outputs, it’s time to start writing and reading values. This series is part of my learning process and I hope it will help others who, like me, are embarking on projects such as programming AVR chips. The way I learn things is to write… Read more »