Welcome Visitor:

Blog

Serial test sketch

This is a little sketch that I find useful for testing the serial communication on an Arduino-like board. It not only sends data of its own accord (millis() every second), but also echoes back what it receives. That way it will test both transmission and reception, so if one is failing you can easily see.

Hacking the SWA1 Smart WiFi Power Switch

IMG_20180722_182806.jpg

The SWA1 Smart WiFi sockets are great cheap WiFi controlled sockets that you can get on Amazon. Not only are they very convenient, but they are eminently hackable. Hackable to the extreme.

Converting a Commodore C16 Keyboard to USB

Dave "The 8-Bit Guy" Murray recently bought a whole batch of Commodore Vic 20 motherboards and C16 keyboards cheap. Don't ask why. However, he's selling them off cheap, so I decided to snap up one of the keyboards.

Arrays? Pointers? What the C?

Arrays and pointers are always a problem for newcommers to C and C++ programmers. Especially if they have come from higher level, more "dumbed down" languages like Java or Basic.

You may think that an array is an array, right? And an array in one language works the same as an array in another language, cus they're, like, arrays, aren't they? Well, you couldn't be more wrong. Certainly when it comes to arrays in C and C++, anyway.

I guess you're probably used to working with arrays like this (pseudocode):

Expected } at end of input error

A common problem, and one that can cause a new programmer to pull their hair out.

However, it's a problem that always has a simple solution, and with the right tricks it's also easy to find where the problem lies.

Let's take the following little code snippet, which throws up this exact error:

1×10³²⁴ things to do with a chipKIT™ Lenny and a QuickIO. No. 2: Virtual Mouse.

Number two in my series of what to do with a Lenny and a QuickIO.

How about a mouse? Yeah, a mouse. Honest :)

Well, maybe not an actual mouse, but maybe make it control the mouse pointer in an "almost" usable way...?

The two potentiometers on the QuickIO could control the mouse position, and the buttons can be the mouse buttons for clicking, etc. That should work.

1x10³²⁴ things to do with a chipKIT™ Lenny and a QuickIO. No. 1: Autoclicker.

This is the first part of a new series entitled "1x10³²⁴ things to do with a chipKIT™ Lenny and a QuickIO". In it, I'm going to be exploring some of the cool things you could do in just a matter of seconds using the two boards combined.

This first one is an Autoclicker.

Vacuum Fluorescent Displays on Arduino

Vacuum Fluorescent Displays are probably one of the coolest displays of all time. Certainly one of the most popular of recent history. Developed in 1959 by Philips they have endured right through to modern times. You can even still find them in current consumer electronics.

Configuring Yùn WiFi

It's not always obvious how to configure the WiFi on the Arduino Yùn properly, since most of the good settings are hidden away in the "advanced" interface. So I'll do what I can to expose them to you.

First off, when messing with the WiFi, you really want to be connected to the Yùn using an Ethernet cable (you most probably had one provided with your WiFi router when you got it - it's buried at the bottom of a drawer somewhere).

Adding An OLED To My Computer

As part of my work I end up with hundreds of small TFT and OLED displays scattered around doing nothing. One of them, the PG25664CG OLED screen (16 shades of green) I figured would be about the same size and shape as a 5.25" drive bay in a PC.

And guess what? I was right! An absolutely (well, a couple of mm out) perfect match. So I decided I should build one into my computer to display stuff. No idea what stuff yet, but stuff anyway. I'll decide later when I have written the software for it all.

Splitting Up Text in C

A common question I often find is:

How can I split this incoming data into parts?

It's especially asked in conjunction with reading data through serial. So I thought I'd introduce you to two completely different approaches, each with benefits and drawbacks depending on the kind of data you are splitting.

So you have some data coming in through serial, or some similar stream, and you need to cut it up into different parts. The two methods basically consist of either:

What Exactly is a GPIO Pin?

I was hoping to make this the topic of my first ever video tutorial, but I still haven't got round to cleaning my desk of all the junk and setting up a holder for my phone to use as a camera. Plus I am suffering from a bad cold right now and sound awful. So text it is.

I'd like to help you get to know exactly what a digital IO pin of an Arduino actually is and how it works. Many questions I come across along the lines of "How does this work", or "Why do you need to do this", or similar, can be answered easily if you know exactly what goes on inside an IO pin.

Designing a Development Board

So I heard you were thinking about designing your own development board. That's nice. But do you know how?

It's one thing to go "I'd like to build my own development board", but it's quite a long step from there to "I have built my own development board and it works".

There's a number of steps you should go through before you even set pen to paper.

Why build another development board?

The Importance of Sharing Grounds

A lot of the time on the Arduino forums we get questions regarding wiring things together. One common format is:

I want to connect my 12V powered LED strip to my Arduino but I can't get it to communicate. I have checked all the connections and they seem fine. I have a 12V power supply for the LEDs and the Arduino is powered from the computer.

And 9 times out of 10 the first question we have to ask in return is:

Have you connected the grounds together?

Cheap 433MHz Transmitters

I decided the other day that it would be a good idea to spend 99p on a 433MHz transmitter and receiver pair from eBay. Not to use, but to take a look and see just how bad these modules are (and I expected them to be pretty awful too).

Flexible LED Fading

I'd like to introduce you to a method of fading RGB LEDs both smoothly and flexibly.

A common method of fading colours on the Arduino is to use simple for loops, such as:

Why You Can't Use Resistors as a Voltage Regulator

People, all the time, use a simple resistor-based voltage divider to change 5v into 3.3v. You see it all over the place. For instance, when you want to get your 5V Arduino to communicate with a 3.3V ESP8266 - you use two resistors (10K and 22K say) to drop the 5V of the Arduino down to the 3.3V the ESP8266 expects.

And that is all fine and dandy.

Dangers of Counterfeit Power Supplies

I thought I would take a look inside a power supply that I suspected was a counterfeit. See just what is going on with it.  This Samsung power supply was making strange things happen with my phone while it was plugged in. Yes, it charged the phone fine, but it made the touch screen go all screwy, and I suspected it was a rather noisy switcher in it. I had bought it from eBay for next to nothing, so I am expecting it to be somewhat nasty inside.

Guess what? I was right.

Diagnosing Arduino Problems in Linux

Getting Arduino and Arduino-like boards working properly under Linux can be a troublesome task if you are not familiar with how Linux works.

So I am going to introduce you to some of the basic tools you will need to work out why your board isn't working as you'd like it to work.

eBay Volt/Amp LED Meters

I thought the other day I would grab a couple of these cheap little LED volt & amp meters modules you see on eBay. 30V, 10A, red and blue LED displays. Funky little things. I felt I should take a look at them and see just what they are, what they do, how you use them, etc.

Now of course, true to form, the details on eBay are very sketchy about how to use them. This is all it has to say on the page I bought mine from about the wiring:

Pages

superannuation