0
comment
on 10/2/2011 12:04 PM
Inspired by the minimalists I tried this out on the arduino: int speakerPin = 11; void outp(byte value) {     analogWrite(speakerPin, value); delayMicroseconds(200); } void setup() {     pinMode(speakerPin, OUTPUT);     // Set up Timer 2 to do pulse width modulation on the speaker     // pin.     // Use internal clock (datasheet p.160)     ASSR &= ~(_BV(EXCLK) | _BV(AS2));     // Set fast PWM mode  (p.157)     TCCR2A |= _BV(WGM21) | _BV(WGM20);     TCCR2B &= ~_BV(WGM22);     // Do non-inverting PWM on pin [...]
>> Read the full article on assertfail.gewalli.se
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper