Blogs

Common Arduino Errors and Warnings

This is my attempt to collate and explain the most common errors and warnings you get when compiling code for the Arduino and Arduino-like boards.

Errors

Expected primary expression before '.' token

This is usually because you used a class name instead of an instance of a class. One example would be if you created an instance of the LiquidCrystal class:

LiquidCrystal lcd(4, 5, 6, 7, 8, 9, 10);

And then used something like:

LiquidCrystal.print("foo");

instead of:

Securing Transmission-Daemon

So you have some large files you'd like to distribute. Maybe you're the author (or compiler) of a custom distribution of Linux. Or maybe you make videos, and you'd like to allow people to download MP4 files to watch off line. What better way than using BitTorrent for this? It's distributed, it's fast, it's easy to manage.

And what better system to use than Transmission, the default BitTorrent client that comes with most versions of Linux?

Windows versions ranked by usability

This is my list of windows versions that I rank by my opinion of their usability and abilities "of their time". That is, not ranked by comparing them to current standards, but comparing them purely by how they operated in their hayday. This is purely my opinion, and you will most likely disagree with it.

Personally I don't have much respect for Windows, but it did have a few highlights during its time. So here goes. I award the number one spot to:

Free, quality, wire

No, I'm not offering you free wire. Just telling you a good source for free wire.

With the whole world going HDMI these days, there are plenty of obsolete SCART cables around. You probably have some in your attic or garage, mouldering away in a box.

Strip them down. That's right - remove the connectors and the outer rubber casing, and bingo - you have a great selection of wire. Lots of different colour wires, usually in the 22-28 AWG range, and usually pretty high quality as well. And on top of that there's normally a good few lengths of shielded cable too! Bargain!

Filtering WiFi Noise

I recently needed to connect an ESP8266 board up to an audio control and processing board I was working on. And as you can guess the noise was horrendous. Kind of like when you leave your mobile phone near a radio and someone calls you. Pop, pop, crackle, pop pop...

So, some filtering was in order. In the end I came up with this circuit:

Filter

The values can probably be refined somewhat, but I just used components I had lying around.

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.

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

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.

Pages