Hello, and welcome me ; ) I'm an absolute forum noob, so I may be utterly frustrating or overly entertaining or perhaps both. I'll cut to the chase. Building my own laser harp, preferably from scratch. It's Already pieced together and housed, functioning and a good amount of code is written.
I'm just not happy with my calibration. It's fairly steady, but bright lights will effect it in odd ways, so, I'm struggling for more control.
Key components: Uno 5mw green laser Ldr Mirror Bipolar stepper 200steps per rev A4988 driver
My problem/desire. 1. Need to EFFICIENTLY store analog input levels from the ldr as my reflected beam spins, passing the beam over the ldr once per rev. A. Efficiently, meaning, I'd like to reserve as much free memory for later as possible for other functions B. I'd preffer the calculations not to affect the speed of the steppers rotation.
- I can store the highest and lowest values it recieves but it is overwriting values, over time until it reaches 1, Which is not the average min.... And that just RUINS EVERYTHING. sigh.
3 I would like to temporarily record each of the 200 steps' values as often as possible, (per revolution) or at least 100 of them, maybe less . in time I will decide. (Over all, I am weary of 200 variables and their effect on the system.)
- And, I would like the system to know which steps the highest and lowest of those values,( per revolution,) were. which I will utilize in multiple ways later.
I may use this refinement of data on power up, and occasional, maybe by a switch,/gesture between songs Or catastrophic events.
I'm embarrassed to show my code since it is a WIP, not complete and I have chunks of useless code and notes everywhere, but I can typically integrate code well. Also, I'm not having any errors so to speak (besides the laser not pointing upward due to other bright lights, but it's rare) and i feel posting my (let's say messy) code straight off the bat may actually complicate a reply. Example code would be most useful (maybe this belongs in a strictly code section.)
Thanks for your support ; )