General discussion

Discussion in 'General Off-Topic' started by Car crusher, Apr 4, 2014.

  1. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,084
    Re: General discussion chat

    ummmmm, wat?
     
  2. TechnicolorDalek

    TechnicolorDalek
    Expand Collapse

    Joined:
    Dec 6, 2013
    Messages:
    1,026
    Re: General discussion chat

    Lolol ur mum gon be archeoligized
     
  3. daniel_j

    daniel_j
    Expand Collapse

    Joined:
    Aug 3, 2013
    Messages:
    334
    Re: General discussion chat

    Cardinal thinks he somehow got you, little does he know he's just being a fag
     
  4. Cardinal799

    Cardinal799
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    1,068
    Re: General discussion chat

    a fag that expedited logoster's mum's bum get rekt
     
  5. Davidbc

    Davidbc
    Expand Collapse

    Joined:
    Mar 20, 2013
    Messages:
    1,332
    Re: General discussion chat

    *Grabs popcorn*
     
  6. Cardinal799

    Cardinal799
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    1,068
    Re: General discussion chat

    lel i just ate your popcorn get rekt

    I am unstoppable help me.
     
  7. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    Re: General discussion chat

    got a nice fancy analog sensor wired up to a 5v system? great, now don't expect it to work when you swap to a 3.3v system :|
     
  8. Shadowdragon94

    Shadowdragon94
    Expand Collapse

    Joined:
    Jul 9, 2013
    Messages:
    348
    Re: General discussion chat

    randomness
     
  9. Cardinal799

    Cardinal799
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    1,068
    Re: General discussion chat

    I need sleep and imgur isn't helping:


    (imported from here)
     
  10. JDMClark

    JDMClark
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    1,347
    Re: General discussion chat

    So I traded my graphics card in my desktop for this. Call me cray. I love it. Needs read tire but I'm gonna use a smaller tire and rim I have for my other project to drive it around. Motor runs solid. uploadfromtaptalk1404280459772.jpg needs oil change though soon.

    Sent through the stars by my Galaxy with a Note for you!
     
  11. DrowsySam

    DrowsySam
    Expand Collapse

    Joined:
    Jul 30, 2013
    Messages:
    999
    Re: General discussion chat

    Lifan motor?
     
  12. JAM3SwGAM3S

    JAM3SwGAM3S
    Expand Collapse

    Joined:
    Jul 1, 2013
    Messages:
    380
    Re: General discussion chat

    Germany don't have a speed limit on their highways so im pretty sure you can go as fast as you want.
     
  13. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    Re: General discussion chat

    Autobahns only. I want to visit one some day

    - - - Updated - - -

    I am the king of micro-optimisation I have decided.

    Code:
    float adcToCelcius(int adcPin) {
      int rawvoltage= analogRead(adcPin);
      float millivolts= (rawvoltage/1024.0) * 5000;
      float kelvin= (millivolts/10);
      float celsius= kelvin - 273.15;
      return celcius;
    }
    
    original code modified from here to be reusable across multiple sensors (I have 3).

    Terribly inefficient. floating point division (painfully slow even on hardware with a dedicated floating point unit and this is a piece of hardware which does not), floating point multiplication (slow), another floating point division, floating point subtraction (bizarrely slower than division when done purely in software as here) before getting our final value.



    Code:
    const float multiplierVolts = (1.0 /1024.0) * 5000;
    const float multiplierKelvin = 1.0 / 10.0;
    const float totalMultiplier = multiplierVolts * multiplierKelvin;
    
    
    float adcToCelcius(int ADCpin) {
      return (analogRead(ADCpin) * totalMultiplier) - 273.15;
    }
    
    much faster. the const floats will only be calculated once and their value stored in memory for later retrieval. This simplifies the math in our subroutine down to a single floating point multiplication and a single floating point subtraction. Much much faster.




    Also a perfect demonstration of space vs time constraints. My alternative solution is significantly faster however we now have 3 variables of 4 bytes each permanently held within RAM which would not have been there before. 12 bytes isn't alot, but this is code for a small microcontroller not a big desktop system, the one I am using is an AtMega2560 with 8192 bytes of RAM to play with and that is a fair bit considering I also own a chip with just 128 bytes. The previous solution was significantly slower, however kept no additional bytes in RAM permanently (of course it used memory while executing, but that wouldn't remain allocated full time). So the older solution may potentially have a smaller memory impact. The newer solution offers a smaller delay in getting the data I want (and still has room for improvement, I dont need to keep 3 floats in memory :p there is a way to do it with 1)
     
  14. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    Re: General discussion chat

    guys. i just used almost all 8 gigs of my ram! i never thought i would need 8 gigs
    20140702_155957.jpg
     
  15. Davidbc

    Davidbc
    Expand Collapse

    Joined:
    Mar 20, 2013
    Messages:
    1,332
    Re: General discussion chat

    I just found out I could use the bluetooth of my motherboard to connect my dualshock 3 and not use a cable :p
     
  16. Cwazywazy

    Cwazywazy
    Expand Collapse

    Joined:
    Dec 1, 2012
    Messages:
    1,245
    Re: General discussion chat

    Did you.. Did you just take a picture of your screen?
     
  17. TechnicolorDalek

    TechnicolorDalek
    Expand Collapse

    Joined:
    Dec 6, 2013
    Messages:
    1,026
    Re: General discussion chat

    Seriously?
     
  18. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    Re: General discussion chat

    my computer locked up. i couldnt navigate or anything. at least not with out waiting a couple minutes
     
  19. Cardinal799

    Cardinal799
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    1,068
    Re: General discussion chat

    Restart your computer.
     
  20. Narwhal

    Narwhal
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,698
    Re: General discussion chat

    its fine now(i know a fair amount about computers) and yes i restarted
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice