-
• #2
At 80Hz you could easily use
Waveform
andanalogWrite
(withforceSoft:true
) - they use the same timebase so will always be properly in sync. You can output a sine wave from a table usingWaveform
and can then useanalogWrite
to output the strobe.With the camera - I think the problem you have is that most video cameras don't use a global shutter (it's a curtain shutter) - so you're going to see 'banding' if you use a strobe light.
-
• #3
Thanks for the inputs :)
I'll order some of the stuff I'm missing to test a build tomorrow, but in the meanwhile I did my best to translate the original code to js
https://github.com/stephaneAG/Espruino_tests/blob/master/SlowDanceTimeFrame/SlowDanceTimeFrame_Espruino_wip.jsConcerning the strobe light & the electromagnet, since the original code doesn't use any waveform, I bet I can rely only on using the following, although I'm not sure how I'd use - if necessary - the 'magDuty' & 'ledDuty' vars ( 'magTime' & 'ledTime' shouldn't be needed since the freq is set thanks to analogWrite's 3rd param )
analogWrite(magPin, 1, {freq:magFrequency}); // L98 analogWrite(lightPin, 1, {freq:ledFrequency}); // L100
Concerning the "water trick", I'm sure I didn't explain it well, so here it is:
https://www.youtube.com/watch?v=mODqQvlrgIQ
and also https://www.youtube.com/watch?v=uENITui5_jU
My goal 'd be to replace the camera by strobing lights ( keeping the effect we see through the camera thanks to the strobes )I'll post updates as they come ;)
+ -
• #4
Ahh - got it. Yes, just two
analogWrite
s should do it fine :) -
• #5
;)
( 'just checked my DHL status: hardware's coming home :D )I'll post tests as soon as I receive & build the stuff ;)
Hi there :)
I was asked to recreate the idea demonstrated in these awesome setups:
[](http://www.instructables.com/file/FGTAMVAIY3CX2AL/)
https://www.kickstarter.com/projects/xercyn/slow-dance-a-frame-that-slows-down-time
http://www.instructables.com/id/Slow-Dance-a-Fusion-of-Art-and-Magic/?ALLSTEPS
http://www.instructables.com/id/TimeFrame-a-Time-Portal-to-Put-on-Your-Desk/?ALLSTEPS
-> of course, Kudos to the respective original author ;)
Now, after a quick read of the schematic involved:
https://raw.githubusercontent.com/cubic-print/timeframe/master/electronics/PCB_schematic_V3.JPG
I could start a new version :)
https://circuits.io/circuits/4045924-slow-dance-time-frame
Now, all that is good, but looking at the code ( whatever the version .. https://github.com/cubic-print/timeframe/tree/master/software) , it seems to be using some register's mambo-jambo tricks specific to the AT328P for precise timing purposes ( .. )
I was wondering if I could achieve driving LED stripes in a "stroby manner" while simultaneously driving correctly the electromagnet using only js ( actual DACs or using PWM .. ) or if I had to look into writing a quick module that'd allow me to do so :)
Long story short, the objects getting vibrations from the electromagnet have to oscillate at 80Hz while the LED stripes have to strobe at 79.5Hz to get a "beat freq" of 0.5hz, perceived by our eyes as a very slow motion ( etc .. ;p )
For the fun of it, if anyone has hints/advices on the above, remember the "water + subwoofer + camera ( filming at 24 fps ) + audio waveform" trick ?
By modulating the waveform from 23Hz to 25Hz, the water appeared to go backward or forward and also gives a really nice effect ..
.. so another question may be how to replace the camera fps' by strobe lights while having those oscillating at a freq enough for our eyes to perceive the motion ? ..
Looking forward to reading some answer on this,
Happy coding !+