• 92 Posts
  • 2.55K Comments
Joined 3 years ago
cake
Cake day: June 10th, 2023

help-circle

  • Left school in Boston. Got a job in Rhode Island. Nine months in and I got bored. Started looking at jobs on Craigslist. Didn’t find anything local. Started scrolling down the cities in the right column. Made it alphabetically down to Seattle. Never been.

    Got the job, moved.

    Lived here for 15 years. Bought a house, met my wife. Found a place where I feel like I always belonged.






  • It takes 29 microseconds for sound to travel 1cm. That’s eons in electronics world. The phone you use is probably doing an operation every .0005us or faster.

    Also, that style of headphone is a lot less complicated than ANC headphones. They just have a microphone/speaker pass through and an envelope-follower that detects peaks in the audio wave. If the peak is over a threshold, shut off the speaker. The headphones block the sound just like classic hearing protection.

    They also may potentially benefit from a small buffer, so everything you’re hearing is a little delayed. Gives the circuit more time to react, though I’m not sure that’s necessary.














  • Thanks for the extended write up! I’m starting to get more of a feel for what the conpiler is doing behind the scenes.

    I was going to ask a follow-up question about why there are instances of generics in traits that are never used:

    // I2C SDA pin
    pub trait SDAPin<I2C> {
        fn setup(&self);
    }
    

    But I think I get it. This allows multiple nearly identical implementations of this trait that vary only by the concrete type used.

    This lets the macro implicitly tie certain hardware pins to certain register banks while maintaining a common setup() function for the SDAPin trait.

    Neat!