Making This Project With Arduino Instead

Reloadron

Joined Jan 15, 2015
7,962
I read a small part of your link. Let's make this simple. What exactly did you want an Arduino (any Arduino) or for that matter any uC (micro-controller) to do for you? Your link was a blurry mess.

Ron
 

Jerry-Hat-Trick

Joined Aug 31, 2022
853
I've taken a look at the code and what I think it does. My view is that it hugely overcomplicates the fairly simple functionality. Rather than try to edit this code I'd urge you to carefully specify in words what it's doing, or even what you want it to do, and start from scratch. The Arduino IDE has functions which would make this far simpler.
 

MisterBill2

Joined Jan 23, 2018
28,438
How about simply EXPLAINING what you want the project to do?? OR, do a copy and paste from the project article??
This forum is followed by a lot of folks who are incredibly smart by themselves, AND, when you get a hundred brains working on a project you can achieve anenormous amount!!!
 
These are known as "sound light machines" (hence the firmware having the "SLM" moniker) - which play sounds of various frequencies synced up to lights that are "looked at" (not directly, usually with eyelids closed); the lights are mounted on the "inside" of a pair of glasses, and the audio is usually via headphones (nowadays, earbuds, probably).

This particular project originally used an ADAFruit POV (persistence of vision) board that seems like its re-programmed (ie, the microcontroller on-board - an ATtiny2313 - supposedly chosen for the POV kit because it doesn't need an external crystal/resonator, to lower part count) to output sound, and use the light display part as-is (well, extended to the glasses in some manner).

The firmware code in the article (zip file) seems to have the AVR C code for the microcontroller to make it work as a SLM device - and isn't very complex (from a code perspective).

Porting that to the ATMega328 (or any other microcontroller) probably isn't too difficult, but it wouldn't be trivial, either. I didn't look at the article or what ADAFruit had for the discontinued kit completely, but reverse-engineering how the lights were hooked up to the microcontroller probably isn't too difficult from reading the code.

The big issue would likely be getting the frequencies (for the sound and light) right, as you'd want to match that as closely as possible between the microcontrollers, and for that you'd need to study both controllers datasheets, figure out what the internal clock speed is set to, and whether/how you could do the same on the ATMega328 - and then you could work that for an Arduino...

...or just use that Arduino SLM link given instead, as it's probably got everything you need. Or - look that code over, compare it to the 2313 firmware, and make some mashup?

EDIT: I reviewed the whole "Arduino SLM" page, and it is basically everything you need: A complete guide on building the Make Magazine version using an Arduino, with a github repo of code, and other extras included.

Note that the link for the "ArduinoSleepCode" no longer works (I suspect due to the revamp of the arduino.cc site); it can instead be found here:

https://playground.arduino.cc/Learning/ArduinoSleepCode/


I should also mention that SLM devices aren't anything really special - there are tons of various schematics, explanations, etc available on the internet if you look (just google things like "sound light machine brain waves" and similar - you'll find 'em) - they've been something people have played with since the woo days of the late-1960s onward. Some of them have been sold in the backs of magazines like Playboy and Omni in the 1980s for thousands of dollars to the gullible (and probably only contained $5 of parts - one of which was probably a 555/556 - maybe later a PIC).

But building one yourself has a long tradition, too - I recall seeing articles about such things in Popular Electronics and other magazines back then, too.

There was also something called a "Dreamachine" - which was basically a lightbulb suspended inside a rotating cardboard cylinder of "special" cutouts (placed on a record turntable) that, in a dark room, would throw various shadows and shapes spinning around the room which could supposedly do some trippy things to you as well (no idea if maybe those trippy things had some pharma help - but likely)...

Now - if you want something really weird? I ran across some mention of this guy (I forget his name) who, apparently at Arizona State University - built some kind of electronic device that "supposedly" could give you a high like heroin (again - supposedly). IIRC, it was based on ultrasonic waves, generated by fairly high-power transducers with a certain frequency and/or patterns of frequencies - applied to the skull.

I have no idea how much of that was true - but way back when, after I read that - I did some digging. I managed to find a link to an FTP archive of his research papers at ASU, and as anyone would do, I downloaded them all. I have no idea where they are right now - probably on some hard drive in some old PC stuck in my workshop somewhere, collecting dust...

...but what was really odd was that a few weeks later...that archive disappeared. At least, it was no longer online. I think I tried to send the guy an email (to the last email I could find that had an asu.edu address) - but it bounced. I don't even know if the guy is still around, etc - he wasn't very old. But that doesn't mean much. But he had a ton of these research papers (they seemed legit - authored by himself and others). It was all very odd.

I think I tried to look into how to build it - but the cost of the transducers at the time kinda put me off (basically, IIRC, you could use fish-finder transducers - but then you'd need a big amp to drive 'em at ultrasonic frequencies, and be able to vary the frequency, etc - doable, but it was in the hundreds of dollars range, more than I felt like spending, so I just let it lie).
 
Last edited:

MisterBill2

Joined Jan 23, 2018
28,438
I recall reading something like that back in the late 1960's, and then when I finally had access to hardware not being able to find any of the articles. And nothing was available in the seventies! Oh Well!!!
 
Top