Category Archives: Software

PeggyDraw 2

peggydraw2

 

We are pleased to finally release PeggyDraw 2, a little bit of long-delayed software. It’s a Processing application that you can use to draw simple 1-bit animations on a 25×25 grid. The neat bit, of course, is that you can press the “Save” button, and the file that it saves is actually an Arduino program, ready to be programmed onto a Peggy 2.

 

You can download PeggyDraw 2 right here. It’s fully built in Processing, so that it works on Mac, Windows, and Linux. Also, open source, designed to be adaptable.
Some things to note about this program:

 

  • If you don’t have Processing on your computer, download it here.
  • The editing interface is easy point-and-click. Try it out to see how it works.
  • You can individually pick different delay times per frame, as low as 20 ms, or give every frame the same duration.
  • The frame data is stored in Arduino program memory, so you’re only limited by the flash memory in terms of frame number– over 250 frames fit on an ATmega328P.
  • The output file is located in the PeggyDraw2 sketch directory, inside a directory named “PeggyProgram” “data.” The file is called “PeggyProgram.pde.”
  • You can both save a file and later reload it for editing.
  • The formats used in PeggyDraw 2 should be easily adaptable to write sequences for other types of LED grids, even of different aspect ratio and control software.

And, special thanks to Matt Mets, http://cibomahto.com for assistance with Processing.
Update, 3/19/2011: We’ve posted a new version, PeggyDraw 2 v. 1.1, available here. Note that the output file is now stored in the “data” directory, not a separate “PeggyProgram” directory.

SymmetriSketch: A simple app for playing with symmetry

We were recently contacted by a mathematics instructor, who suggested that it might be interesting to have a program like Snowflake, but with the option of picking and choosing different symmetry properties.

Natural snowflakes have (approximate) sixfold rotation symmetry plus reflection symmetry. However, a lot of things that you can draw by hand have absolutely no resemblance to snowflakes at all– and it is somewhat fun to explicitly play with the rules.

Our new program, SymmetriSketch, sticks to the same basic design principles as Snowflake: it’s cross platform, open source, and able to export a true vector drawing with a closed path. However, SymmetriSketch is a much more flexible program that allows you to play with different symmetries, and create all kinds of different things that would never be mistaken for frozen water.

Here’s what it looks like when the program first opens:

SymmetriSketch 1

The initial shape is an overall pentagon– an object with five-fold rotation symmetry and reflection symmetry. The figure is generated by taking the editable slice– highlighted here and when you start the program– and reflecting and rotating it to complete the full shape that you see.

Within the editable slice, you can also see three highlighted control points that can be dragged around. There is control point at every vertex and at the midpoint of every line segment between two vertices. If you drag a control point that is the midpoint of a line segment, it turns that control point into a new vertex. That new vertex also gets new control points at the midpoints to its neighbors.

Every vertex point can be moved to any location on the screen with the exception of the vertex that is initially at the top point of the pentagon– that vertex is constrained to move along the vertical axis– the axis of reflection symmetry.

SymmetriSketch 6

The controls are purposefully kept simple. There are two symmetry controls– for the order of rotational symmetry and to toggle reflection– which you can change in the lower left hand corner of the screen.

The number, with its +/- controls, refers to the order of discrete rotational symmetry. If the number shown is n, then n-fold rotational symmetry is applied, which means that the displayed object is unchanged when rotated by 360 degrees/n. In the screenshot above, 9-fold rotational symmetry is applied.

Orders from 1 to 99 are allowed– note that 1-fold rotational symmetry is “no symmetry at all” since it requires 360/1 = 360 degrees of rotation to return to the original shape.

The second control is for reflection symmetry, and toggles between “reflect” or “rot. only,” where it either does, or does not apply a mirror reflection across the vertical axis.

SymmetriSketch 3

With reflection symmetry turned off, the figure is drawn with pure rotational symmetry. (This screenshot was taken while editing the shape, and you can see control points, indicated by little circles.)

Continue reading SymmetriSketch: A simple app for playing with symmetry

Programming Meggy Jr RGB

Last week we released an Arduino environment library for the Meggy Jr RGB. The code is an open source project here, and the downloadable package comes several example programs, ranging from very simple to moderately complex. (One of the examples is a new game called Froggy Jr, where you help your a little round green frog cross the street and then a river.)

Today, to make it all a bit more useful, we are releasing the Meggy Jr RGB Programing guide, which you can download Here (600 kB PDF file).

Continue reading Programming Meggy Jr RGB

The Peggy Strikes Back

Automatically generated Peggy Code

Today we have an update on our Peggy 2.0 Light Emitting Pegboard project, with (1) a new and improved version of the Peggy2 Arduino library, (2) links to several awesome examples of Peggy hacks– including a full-motion video hack, and (3) a new GUI application example that lets you display an image on the Peggy without writing a single line of code.
Continue reading The Peggy Strikes Back

An Arduino library for Peggy 2

Peggy 2 Gray Side

Here we describe a basic-function Arduino library for Peggy 2.0.

Note: This article describes the new 0.3b version of the library, dated 7/8/2008.
The original article at this location has been archived here.

The Peggy 2.0 Arduino library brings Peggy 2.0 up to the level of having useful compatibility with the Arduino software environment: you can use high-level commands to control what shows up on the Peggy display. For example, the type of high-level command might be something of the form “SetPoint(x, y)” which would turn on the LED located at position (x,y) in the grid.
Continue reading An Arduino library for Peggy 2

Archived: An Arduino library for Peggy 2.0

Note: This article is out of date but archived here for future reference.
You can find the current version here.

 

Today we present a basic-function Arduino library for Peggy 2.0.

This brings Peggy 2.0 up to the level of having useful compatibility with the Arduino software environment: you can use high-level commands to control what shows up on the Peggy display. For example, the type of high-level command might be something of the form “Peggy_SetPoint(x, y)” which would turn on the LED located at position (x,y) in the grid.

Continue reading Archived: An Arduino library for Peggy 2.0

Run Windows apps– without Windows– using Crossover

LTspice1

One of the nice things about having an Intel-based Mac is that you can, in principle, run a variety of operating systems including Microsoft Windows. You can do this using Apple’s Boot Camp utility, or through virtual machine programs such as Parallels.

I recently came across an esoteric “Windows only” electrical engineering program that I wanted to run on my Mac (LTspice/SwitcherCAD III — more about that later). And, while contemplating the $200-$300 cost of a legitimate Windows license, it might occur to you that the goal in this case is to run a program that runs under Windows– not actually to run Windows itself.

So why not look at Wine? Wine is a venerable software compatibility layer that allows unix-like operating systems to run programs designed for Windows. It turns out that there is even a Parallels-like virtualization environment so that you can run programs programs in Wine alongside Mac programs. It’s called Crossover Mac, and it’s $60 from Codeweavers.

And the verdict? It’s not for everyone, but it’s a great start.
Continue reading Run Windows apps– without Windows– using Crossover