You are currently browsing the code tag archives.

Kitty Code Review

Posted 2014.06.22 8.44 in Cats, iPhone

New app features undergo intensive code review.

Code Review

Here we see Misha carefully inspecting revisions to a complex XCode project.

A Github Kind of Day

Posted 2012.01.29 9.09 in Computers/Internet/Technology

For all the years I’ve been dabbling with programming-related projects, I’ve always just put the code on my own website so folks could download it there.

Meanwhile there’s all these other tools and things people have built specifically for sharing code, and I’d kind of ignored them because I had my own easy (for me) way of doing it. The problem with just throwing a zip archive on my site here is that people can download it, but they can’t easily make changes or contribute to its development – in other words, it’s not really collaboratively friendly.

So at long last, I’ve got around to looking into Github, or Git — I don’t even know what it’s supposed to be called, in fact. Whatever it is, I got myself an account and set up not one, but two public repositories.

This first is for my little Chronodot library for the Arduino. This gives you full real-time-clock functionality in your Arduino sketch, and also lets you get the current temperature readings from the Chronodot as well.

The Chronodot library for Arduino is available here.

The second is a high performance i2c LCD driver that was originally created by Matt Falcon. He had shared it via the Adafruit support forums, but it had not been updated for the changes in Arduino’s 1.0 IDE. People were asking for those changes, so I went ahead and modified the library to be 1.0 compatible.

The LiquidTWI library for Arduino is available here.

Hacking My Brain

Posted 2011.04.03 21.19 in Computers/Internet/Technology

I just built a Brain Machine kit from Adafruit. Originally designed by Mitch Altman, it reminded me of a bio-feedback brain device I had built some 20-25 years ago, after reading about it in a issue of Radio Electronics magazine.

The basic premise in both cases is that you can guide the brain to synchronize with external stimuli oscillating at a rate that matches one of the brain’s normal wave patterns – Beta (awake / consious), Alpha (dreamy / trancy), Theta (subconsious), Delta (creative), Gamma (intense thought, problem solving).

The Brain Machine is designed so that you can program it with an entire sequence of patterns, changing the waves and durations as desired for a given program purpose. The kit comes with a 14 minute meditation program already written to the microcontroller.

The stimulus given to the brain is in the visual and auditory areas, by way of two red LEDs (one per eye) and a set of standard stereo headphones. The LEDs alternate-pulse at the desired brain-wave frequency while the left and right speakers of the headphones each play a different tone; the offset between the tones (binaural beats) is also the desired brain-wave frequency.

Personally, I found the headphones a bit distracting so I won’t use them as much. Maybe it’s just me but I only experienced the ‘binaural beat’ thing a couple isolated moments, otherwise I just heard two different (slightly annoying) tones. Useful for blocking out external noises, but my home is already a quiet environment, usually.

Using the brain machine is… trippy. I would love to be able to share images of what I saw, but in lieu of that, here are some attempts at describing a few moments.

  • Predominantly I experienced a lot of geometric patterns that were repeated infinitely across my field of view; waves of triangles, squares, pentagonal and hexagonal forms. Sometimes superimposed, eg. my left eye was seeing hexagons while my right was seeing pentagons.
  • Then it was like floating through outer space, surrounded by stars. While flying through a meteor shower. With TRON special-effects. As viewed through a kaliedescope.
  • I became able to see the individual cells of my own eyelids.
  • Then I could see the electrons travelling through my optic nerves, all buzzing about in frantic bio-feedback.
  • Then everything fell away and I could see the entire Milky Way galaxy above me, moving in accelerated time.

It’s amazing just how many colours you can actually experience, given that the only colour used is red. I was seeing blue, green, purple, red, and white, and to a lesser degree, yellow and orange.

After taking a couple trips with the default meditation program, I am thinking it would be cool to create a bunch of different programs. The ATTiny25 chips are inexpensive so you could actually burn a number of them, each with a different program. Then just pop in the one you want at the moment, and let it run.

You could have a chip/program to get your mind stimulated and ready to work; a program for relaxing at the end of the day; a program to get the creative juices flowing; a program to just bounce from one waveform to the next to give your brain a slamming roller-coaster ride. Feed your brain various programs, and see what happens.

Trippy.