Sunday, May 1, 2016

Visualizing Music With FFT

This display is a 16x32 neopixel. It is displaying patterns generated by a Processing program doing real-time FFT (Fast Fourier transform). Basically it is visualizing music in the frequency domain using a polar-coordinate particle system.

The hardware makes use of Adafruit 8x8 neopixles, two 5v 10amp supplies, a FadeCandy controller, 16 AWG stranded wire , 20 AWG stranded wire, (2 - Female 2.1x5.5mm DC Power Cable Jack Adapter), and some plastic stand offs.

Friday, April 15, 2016

The Learning Lab Kit on a Shield for Arduino

Received this Learning Lab Kit on a Shield for Arduino from Programming Electronics Academy today and am very pleased.  This shield

The Learning Lab Kit on a Shield for Arduino is meant to help you save time – it basically pre-populates common circuits for you.

Circuits that you might already have learned quite well – like LED, potentiometer, or push buttons.

Instead of searching your shag carpet for the 220 ohm resistor that dropped last week, you simply use the Basic Electronics Arduino Shield – and it connects everything up for you.  No need to breadboard the circuits out.

So when you sit down for 20-30 minutes to practice coding on Arduino – then you spend the majority of the time getting to try new things, and less time repeating something you already know.




I couldn't wait to play with mine today







Want to save some time learning Arduino?
Join the thousands of awesome people to sign up for our 

Sunday, April 10, 2016

NeoPixel 16 Ring Fun

NeoPixels are fun and amazing.  In my project I connected 4 of the AdaFruit NeoPixel - 16 RGBW Leds together.  What caught my attention and curiosity was that you can control each of these RGBW Leds using just one wire.

This feat is accomplished with a very timing-specific protocol. Since the protocol is very sensitive to timing, it requires a real-time microconroller such as an AVR, Arduino, PIC, mbed, etc. It cannot be used with a Linux-based microcomputer or interpreted microcontroller such as the netduino or Basic Stamp.

How the protocol works can be found in the WS2812 data sheet.  For each RGB Led a stream of 24 bits will be sent, 8 bits for each color.  The value of each bit, 1 or 0, is determined by the timing of the square wave.

A logic 0 is represented by a signal that is high for .35 mircorseconds followed by a low of .8 microseconds

A logic 1 is represented by a signal that is high for .7 microseconds followed by a low for  .6 microseconds

So just in the process of updating a 16 LED RGB ring you will be sending 48 bytes of data, 3 bytes for each leds RGB value. Each byte contains a value of 0-255 indicating the value of intensity for that particular color (Red, Green or Blue).

Looking at the diagram above the transmission starts with D1 receiving the first 24 bits.  After that D1 will pass subsequent bits on to D2.  Once D2 receives it's 24 it starts passing subsequent bits onto D3.  Note that this is different than usual shift register operation.  The passing on will continue until the data line is held low for 50 microseconds.  Holding the data line low for 50 microseconds is a reset code indicating next sequence is for the WS2812 to process.



Generating the timing above is no easy feat and requires some very skilled hand-tuned assembly code that issues data to the LED drivers at a specific rate.  Fortunately, Phil Burgess / Paint Your Dragon, wrote a library for Adafruit that allows us mortals to control these beauties.

Below is the code and a video of my setup.  Codebender allows you to peek into the library files by holding down the CTRL key while clicking on the library header file.  In this case you would hold the CTRL key and click on "Adafruit_NeoPixel.h".  This will open a new tab with the NeoPixel library and related files.  From there look on the left hand side and select the Adafruit_NeoPixel.cpp file to explore and learn more about this awesome library.

Don't be afraid  If you have any questions please feel free to ask.



Want to save some time learning Arduino?
Join the thousands of awesome people to sign up for our 

Friday, April 8, 2016

Logging Environmental Data and Charting it with Google Charts

Today I have been experimenting with the Particle Photon and logging environment data to the internet via the Data.SparkFun.com.   Data.SparkFun.com is a free service for posting, storing, and reading sets of data. It’s powered by Phant, an open-source, Node.js-based tool that can be run on any server or computer.

Once the data data feed has some data  I can start charting it using a number of free services. Following Sparkfuns tutorial I am using Googles Charts to graph live data on my web site. Adding a barometric sensor to this wouldn't be hard and would make for some interesting weather studies.


Sparkfun Tutorial

Graphing Live Data With Google Charts Tutorial

Sample Live Chart, updated every 60 seconds, from my experiment

 I'll have this data logger along with a neopixel demo and other presentations on display at our Programming Electronics with Arduino meetup this Saturday 




Want to save some time learning Arduino?
Join the thousands of awesome people to sign up for our 

Tuesday, March 29, 2016

Understanding Data Types for variables

A data type in a programming language is a set of data with values having predefined characteristics. Examples of data types are: integer, floating point unit number, character, string, and pointer. Usually, a limited number of such data types come built into a language. The language usually specifies the range of values for a given data type, how the values are processed by the computer, and how they are stored.

In this video we well learn about the different data types you have access to in the Arduino IDE





Be sure to check out the the free Arduino Crash Course.

Saturday, March 26, 2016

Track A Car Using Tiny Arduino GPS with SD Card

This is a really cool project that was originally on Make as a GPS Cat Tracker.  Michael James, at the Programming Electronics Academy, put together an excellent 10 minute video showing you how easy it is to do this project.



Pretty cool huh?  If you enjoyed that you may also like the free Arduino Crash Course.