Go Down

Topic: arduino wart remover? (Read 1 time) previous topic - next topic

michael_x

Yes:  47 µs cycle is 21.27 kHz
No:
1)   23.51 is not an unsigned long
2)   a few µs to restart loop() and to jump into the delayMicroseconds() function and return

And there are other methods to setup timers and tie them to output pins.

Just adapt Nick Gammons hints on Timer interrupts http://www.gammon.com.au/forum/?id=11488
( valid for a 16MHz Arduino ):

Code: [Select]
ISR(TIMER1_COMPA_vect)
{
static boolean state = false;
 state = !state;  // toggle
 digitalWrite (13, state ? HIGH : LOW);
}
void setup() {
 pinMode (13, OUTPUT);
 
 // set up Timer 1
 TCCR1A = 0;          // normal operation
 TCCR1B = _BV(WGM12) | _BV(CS10);   // CTC, no pre-scaling
 OCR1A =  375;       // compare A register value (376 * clock speed)
 TIMSK1 = _BV (OCIE1A);             // interrupt on Compare A Match
}  // end of setup

void loop() { }

 
edit: added code tag myself ;)

john_m0ers

Hi,  just a thought..
Some tima ago I researched a project called a "rife machine" which used an oscillator at the self resonant frequencies of bacteria
and viruses. There has been alot of work done on this, but you might find it interesting.

regards    john

Runaway Pancake


I did a quick web search, hoping to find a specific example, and came up empty, but the web abounds with pages about electro-therapy, electromedicine, bioelectromagnetic healing, etc.

It's that way with "medical marijuana", too.    :D

Quote
So does anyone have code I could work with to pulse at 2.27 khz?  I figured to get to 2.27KHZ, the cycle should last 47 microsecs. so 23.51 micro secs turned on, and 23.51 turned off?

The period 21kHz is 47usec: maybe brief positive-going pulses, maybe negative-going pulses, maybe they should be Gaussian - 1/2 on & 1/2 off.
"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Docedison

Naaah, use 0 - 100% PWM and tune for max smoke...

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

JimboZA


Naaah, use 0 - 100% PWM and tune for max smoke...

Doc


Good thing you retired Doc- your professional indemnity insurance must have been costing you a fortune  8)
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Go Up