What’s a BeagleBone?

The BeagleBone is an easy to use microprocessor breakout project board. Much like the Raspberry Pi, it allows your to run an embedded Linux kernel to execute all kinds of processing in the context of a standalone project.

Beaglebone in black

According to this thorough article comparing the two boards, the BeagleBone is twice as fast as the Raspberry Pi for the same cost. However, the Raspberry Pi has better audio and video capabilities.

Extensibility is also a big factor. BeagleBone has “Capes” and Raspberry Pi extends using an add-on that allows you to use all the Arduino Shields. You’ll need to extend the BeagleBone to gain audio and video features comparable to the Pi.

Simplest way to turn boolean into a LED

Here the simplest way to light a LED from boolean variable:

boolean b = true;
digitalWrite(ledPin, b);

That has just save me a bunch of if…else statements. It makes for cleaner more readable code.

By the way, this is possible because “HIGH” and “true” are both defined as 1 in Arduino.h. So calling digitalWrite(pin, true) is the same as calling digitalWrite(pin, HIGH).

It’s probably not “best practices”, but I’m willing to take a chance this will never change ;-)

How much current can flow through Vin?

Looking into plugging a massive LED array into the Vin of the Arduino, I figure I would look into the current limits, if any, on that pin.

Destroyed Duino
A Destoyed Duino

I stubbled upon the Ruggedduino from a very well written blog post on 10 Ways to Destroy an Arduino. I’m considering buying one. First because I do a lot of Arduino work in the evening (when most errors happen and most bugs are introduced). Second because Applying more than 5v to the 5v pin on the Arduino can potentially damage your computer’s USB port. Getting a Ruggedduino as a main experimental board might not be a bad idea.

So getting back to the Vin max current. The Vin pin on the Arduino is directly connected to the power supply. So you are limited by the power rating of your power supply. Other limiting factors are a diode rated at 1A and the traces on the board which are rated at 2A. So final answer, under 1 amp please. This electronics stack exchange answer cover it.

Another thing to consider is the fact that the Vin pin is after the polarity protection diode of the board’s power input. This mean you are directly connected to the Arduino chip and you can potentially destroy it if you reverse the polarity of your power input. This short article on Fork Electronics covers it.

Which Arduino Pins support analogWrite() PWM?

After spending a few long minutes debugging a sketch and a breadboard, wondering why my analogWrite wasn’t dimming a LED as expected, I recently discovered that the Arduino board does not support analogWrite() on all it’s pins. Only pins 3, 5, 6, 9, 10, and 11 provide PWM output with the analogWrite function.

Then, (another discovery!) I realized that the Arduino board doesn’t really provide a analog voltage output in the strict sense, It fakes it using Pulse Width Modulation (PWM). This works great for LEDs, but probably not in application that require a steady 2.5 volts. The full explanation is on the Arduino PWM tutorial.

Reassuringly all 14 pins of the Arduino (pin 0 to pin 13) provide digitalRead() and digitalWrite() depending on your call to pinMode().

Thing I Learned About The Arduino Today

Two Power Supplies Is Okay

You can drive the Arduino Uno from the external power source and have it plugged in your computer with the USB cable at the same time. Having a recently purchased computer I was worried that having an external power source could feed back into the USB port and somehow overload the computer. This Stack Exchange answer goes over the details and the schematic about why this is possible.

A 9 volt battery can drive the Arduino and a Pixel Strip

Working on a halloween costume, I was testing running the Arduino and a strip of LED pixels from a single 9 volt battery. I works, but I don’t know for how long…

The Vin Pin = The Power Input

The Vin pin is used to drive external boards and accessories. It sports the same voltage as the external power input. In my case I drive for the Plexi Project, I drive the Arduino with a 12v power adaptor and I can drive my LEDs from the Vin. No need to splice the input from the power adaptor separately.