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 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):
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:
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.
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.
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).
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.
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: